-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting-started.tutorial.ts
More file actions
80 lines (79 loc) · 2.79 KB
/
Copy pathgetting-started.tutorial.ts
File metadata and controls
80 lines (79 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { tutorial, step } from 'tutorial-forge';
export default tutorial('Getting started with Lumen Events', [
step(
'Welcome to Lumen Events. In this short tour, we will create your first event and adjust a workspace setting.',
async () => {
// Pure-narration step: the dashboard simply stays on screen.
},
{ id: 'welcome' },
),
step(
'From the dashboard, open the Events page using the navigation bar.',
async (page) => {
await page.getByRole('link', { name: 'Events', exact: true }).click();
await page.getByRole('heading', { name: 'Events' }).waitFor();
},
{ id: 'open-events' },
),
step(
'To add an event, click the New event button. A dialog opens where you can fill in the details.',
async (page) => {
await page.getByRole('button', { name: 'New event' }).click();
},
{ id: 'open-modal' },
),
step(
'Give the event a descriptive name. This is what attendees will see on their invitations.',
async (page) => {
await page.getByLabel('Event name').fill('Summer Kickoff Party');
},
{ id: 'fill-name' },
),
step(
'Then pick the event type that best matches the format.',
async (page) => {
await page.getByLabel('Event type').selectOption('Workshop');
},
{ id: 'pick-type' },
),
step(
'Click Create event. Saving takes a moment, and the new event appears in the list as a draft.',
async (page) => {
await page.getByRole('button', { name: 'Create event' }).click();
},
{
id: 'create-event',
// The fake save takes 1.5s; wait for the success toast, not a timeout.
waitFor: async (page) => {
await page.locator('#toast.show').waitFor({ timeout: 5000 });
await page.getByRole('cell', { name: 'Summer Kickoff Party' }).waitFor();
},
settleMs: 800,
},
),
step(
'Finally, visit Settings to control reminders and visibility. Here we enable public event pages.',
async (page) => {
await page.getByRole('link', { name: 'Settings' }).click();
await page.getByRole('heading', { name: 'Settings' }).waitFor();
await page.locator('#public-pages').check();
},
{ id: 'settings' },
),
step(
'That is all it takes. Your event is drafted, your workspace is configured, and you are ready to invite attendees.',
async () => {},
{ id: 'wrap-up' },
),
], {
id: 'getting-started',
// Intro/recap cards (#37): the advance-organizer and summary the narration
// already models, made explicit so they render as title/objective and recap
// slates around the video.
objectives: [
'Create your first event',
'Set its name and type',
'Enable public event pages in Settings',
],
summary: 'Your event is drafted and your workspace is configured — you are ready to invite attendees.',
});