@crvouga/mockingbird-notifications 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,235 @@
1
+ // src/testids.ts
2
+ var TEST_IDS = {
3
+ /** The UI root. */
4
+ app: "notifications-app",
5
+ // ── Top bar ─────────────────────────────────────────────────────────────────
6
+ topbar: "topbar",
7
+ /** `<select>` of namespaces. */
8
+ namespace: "namespace",
9
+ /** Filter `<input>` (recipient, sender, text). */
10
+ search: "search",
11
+ /** View tabs; `aria-pressed="true"` on the active one. */
12
+ viewDevices: "view-devices",
13
+ viewTimeline: "view-timeline",
14
+ /** "Follow new" checkbox. */
15
+ follow: "follow",
16
+ /** Sound on/off button; `aria-pressed`. */
17
+ sound: "sound-toggle",
18
+ /** Live stream indicator; `data-state="live" | "reconnecting"`. */
19
+ connection: "connection",
20
+ /** One pill per emulator; `data-name`, `data-service`, `data-ok`, `data-count`. */
21
+ source: "source",
22
+ /** Discovery or emulator errors, or the "no emulators" hint; `data-kind="error" | "empty"`. */
23
+ notice: "notice",
24
+ /** Bottom-left message after an action, e.g. "Conversation archived." */
25
+ toast: "toast",
26
+ toastUndo: "toast-undo",
27
+ // ── Channel tabs ─────────────────────────────────────────────────────────────
28
+ /** The `role="tablist"` that switches between devices; `data-layout="grid" | "tabs"`. */
29
+ channelTabs: "channel-tabs",
30
+ /** One `role="tab"`; `data-value="all" | "sms" | "push" | "email" | "chat"`, `aria-selected`, `data-unread` (a count). */
31
+ channelTab: "channel-tab",
32
+ /** Unread badge on a tab whose device is not showing its newest arrivals (absent when 0). */
33
+ channelTabUnread: "channel-tab-unread",
34
+ // ── SMS: Messages ────────────────────────────────────────────────────────────
35
+ /** The phone; `data-screen="threads" | "conversation"`, `data-recipient`, `data-thread`, and `data-via="whatsapp"` while a WhatsApp chat is open. */
36
+ smsDevice: "sms-device",
37
+ /** Phone number `<select>`; option values are E.164 numbers. */
38
+ smsRecipient: "sms-recipient",
39
+ /** Unread SMS badge next to the column title (absent when 0). */
40
+ smsUnreadCount: "sms-unread-count",
41
+ /** One conversation in the list; `data-from` (the sender address), `data-unread`, `data-pinned`, `data-muted`, `data-via`. */
42
+ smsThread: "sms-thread",
43
+ smsThreadName: "sms-thread-name",
44
+ smsThreadPreview: "sms-thread-preview",
45
+ smsThreadTime: "sms-thread-time",
46
+ smsThreadUnread: "sms-thread-unread",
47
+ /** "WhatsApp" label on a WhatsApp conversation in the list. */
48
+ smsThreadVia: "sms-thread-via",
49
+ /** Swipe actions behind a thread (also reachable with the keyboard: focus the thread, press Delete). */
50
+ smsThreadDelete: "sms-thread-delete",
51
+ smsThreadMute: "sms-thread-mute",
52
+ smsThreadPin: "sms-thread-pin",
53
+ smsThreadToggleUnread: "sms-thread-toggle-unread",
54
+ /** Shown when the phone has no messages. */
55
+ smsEmpty: "sms-empty",
56
+ /** An open conversation; `data-from`, `data-via="sms" | "whatsapp"`. */
57
+ smsConversation: "sms-conversation",
58
+ smsConversationTitle: "sms-conversation-title",
59
+ smsBack: "sms-back",
60
+ /** One message; carries the notification attributes plus `data-code` when it holds a one-time code. */
61
+ smsBubble: "sms-bubble",
62
+ smsBubbleMedia: "sms-bubble-media",
63
+ /** The time revealed by swiping the conversation left. */
64
+ smsBubbleTime: "sms-bubble-time",
65
+ /** A reaction added with the long-press menu; `data-tapback`. */
66
+ smsTapback: "sms-tapback",
67
+ /** Centered date stamp between messages. */
68
+ smsTimestamp: "sms-timestamp",
69
+ /** One-time code suggestion above the keyboard; `data-code`. */
70
+ smsCode: "sms-code",
71
+ /** Long-press menu on a bubble. */
72
+ smsMenu: "sms-menu",
73
+ smsMenuCopy: "sms-menu-copy",
74
+ /** One tapback in the menu; `data-tapback="heart" | "like" | "dislike" | "laugh" | "emphasize" | "question"`. */
75
+ smsMenuTapback: "sms-menu-tapback",
76
+ // ── Push: lock screen (iOS) / shade (Android) ───────────────────────────────
77
+ /** The phone; `data-skin="ios" | "android"`, `data-recipient`, `data-platform`. */
78
+ pushDevice: "push-device",
79
+ /** Device token `<select>`. */
80
+ pushRecipient: "push-recipient",
81
+ /** Skin buttons; `data-value`, `aria-pressed`. */
82
+ pushSkin: "push-skin",
83
+ pushUnreadCount: "push-unread-count",
84
+ /** One notification; notification attributes plus `data-expanded`, `data-platform`, `data-app`, `data-stacked`. */
85
+ pushNotification: "push-notification",
86
+ pushNotificationApp: "push-notification-app",
87
+ pushNotificationTitle: "push-notification-title",
88
+ pushNotificationBody: "push-notification-body",
89
+ pushNotificationTime: "push-notification-time",
90
+ pushNotificationImage: "push-notification-image",
91
+ /** The `data` payload, shown when expanded. */
92
+ pushNotificationData: "push-notification-data",
93
+ /** Service, status, badge and sound, shown when expanded. */
94
+ pushNotificationMeta: "push-notification-meta",
95
+ /** iOS: a group of notifications from one app; `data-app`, `data-count`, `data-open`. */
96
+ pushGroup: "push-group",
97
+ /** iOS: "N more notifications" under a collapsed group (click to open it); `data-count`. */
98
+ pushGroupMore: "push-group-more",
99
+ /** iOS: "Show less" on an open group. */
100
+ pushGroupCollapse: "push-group-collapse",
101
+ /** iOS: swipe-left actions. */
102
+ pushClear: "push-clear",
103
+ pushOptions: "push-options",
104
+ /** iOS long-press preview; Android long-press settings. */
105
+ pushPreview: "push-preview",
106
+ pushSettings: "push-settings",
107
+ /** Android "Clear all". */
108
+ pushClearAll: "push-clear-all",
109
+ pushEmpty: "push-empty",
110
+ // ── Email: web mail ─────────────────────────────────────────────────────────
111
+ /** The browser window; `data-screen="inbox" | "message"`, `data-recipient`. */
112
+ emailDevice: "email-device",
113
+ /** Mailbox `<select>`; option values are lower-case addresses. */
114
+ emailRecipient: "email-recipient",
115
+ emailUnreadCount: "email-unread-count",
116
+ /** One inbox row; notification attributes plus `data-starred`. */
117
+ emailRow: "email-row",
118
+ emailRowFrom: "email-row-from",
119
+ emailRowSubject: "email-row-subject",
120
+ emailRowSnippet: "email-row-snippet",
121
+ emailRowDate: "email-row-date",
122
+ emailRowService: "email-row-service",
123
+ emailRowAttachment: "email-row-attachment",
124
+ emailRowStar: "email-row-star",
125
+ /** Hover actions on a row. */
126
+ emailRowArchive: "email-row-archive",
127
+ emailRowDelete: "email-row-delete",
128
+ emailRowToggleRead: "email-row-toggle-read",
129
+ emailRefresh: "email-refresh",
130
+ emailEmpty: "email-empty",
131
+ /** The open message; notification attributes. */
132
+ emailOpen: "email-open",
133
+ emailBack: "email-back",
134
+ emailArchive: "email-archive",
135
+ emailDelete: "email-delete",
136
+ emailMarkUnread: "email-mark-unread",
137
+ emailSubject: "email-subject",
138
+ emailFromName: "email-from-name",
139
+ emailFromAddress: "email-from-address",
140
+ /** "to me, …" line; click to toggle the details. */
141
+ emailTo: "email-to",
142
+ emailDate: "email-date",
143
+ emailDetails: "email-details",
144
+ /** One row of the details; `data-field="from" | "to" | "cc" | "bcc" | "reply-to" | "date" | "subject" | "mailed-by" | "message-id"`. */
145
+ emailDetail: "email-detail",
146
+ /** The HTML body `<iframe>` (same origin: use `frameLocator`). */
147
+ emailBody: "email-body",
148
+ /** The plain-text body when there is no HTML. */
149
+ emailText: "email-text",
150
+ emailAttachments: "email-attachments",
151
+ /** One attachment; `data-filename`, `data-content-type`, `data-size`. */
152
+ emailAttachment: "email-attachment",
153
+ // ── Chat: team chat window ──────────────────────────────────────────────────
154
+ /** The chat window; `data-recipient` (the open channel), `data-workspace`. */
155
+ chatDevice: "chat-device",
156
+ /** Channel `<select>`; option values are channel names (`#alerts`) or webhook paths. */
157
+ chatRecipient: "chat-recipient",
158
+ chatUnreadCount: "chat-unread-count",
159
+ chatWorkspace: "chat-workspace",
160
+ /** One channel in the sidebar; `data-to`, `data-unread` (a count), `aria-current`. */
161
+ chatChannel: "chat-channel",
162
+ /** The open channel's name in the header. */
163
+ chatTitle: "chat-title",
164
+ /** One message; notification attributes plus `data-method`, `data-ephemeral`, `data-thread`. */
165
+ chatMessage: "chat-message",
166
+ chatMessageAuthor: "chat-message-author",
167
+ chatMessageTime: "chat-message-time",
168
+ /** The message text, with mrkdwn formatting applied. */
169
+ chatMessageText: "chat-message-text",
170
+ /** Block Kit blocks; each block inside carries `data-block="<type>"`. */
171
+ chatMessageBlocks: "chat-message-blocks",
172
+ /** Legacy attachments; each one inside carries `data-color`. */
173
+ chatMessageAttachments: "chat-message-attachments",
174
+ /** One reaction; `data-name`, `data-count`. */
175
+ chatMessageReaction: "chat-message-reaction",
176
+ chatEmpty: "chat-empty",
177
+ // ── Timeline + inspector ────────────────────────────────────────────────────
178
+ timeline: "timeline",
179
+ /** One row; notification attributes. Click it to inspect. */
180
+ timelineRow: "timeline-row",
181
+ timelineEmpty: "timeline-empty",
182
+ /** The JSON inspector; notification attributes. Opened by clicking a timeline row or double-clicking any notification. */
183
+ inspector: "inspector",
184
+ inspectorTitle: "inspector-title",
185
+ inspectorClose: "inspector-close",
186
+ inspectorShowOnDevice: "inspector-show-on-device",
187
+ /** One normalized field; `data-field`. */
188
+ inspectorField: "inspector-field",
189
+ /** The full record, normalized fields plus `raw`, as JSON text. */
190
+ inspectorJson: "inspector-json",
191
+ // ── Dashboard (mountDashboard) ───────────────────────────────────────────────
192
+ /** The dashboard root; `data-tab` is the open tab's id. */
193
+ dashboard: "dashboard",
194
+ /** One tab button; `data-tab` (`emulators`, `notifications`, or an embedder's id), `aria-selected`. */
195
+ dashboardTab: "dashboard-tab",
196
+ /** One tab's panel; `data-tab`. Hidden unless its tab is open. */
197
+ dashboardPanel: "dashboard-panel",
198
+ /** Notifications that arrived while another tab was open; `data-count`. Hidden at 0. */
199
+ dashboardBadge: "dashboard-badge"
200
+ };
201
+ var attr = (value) => JSON.stringify(value);
202
+ var selectors = {
203
+ /** `[data-testid="…"]` */
204
+ testId: (id) => `[data-testid=${attr(id)}]`,
205
+ /** The ready UI root: wait for this before asserting. */
206
+ ready: () => `[data-testid=${attr(TEST_IDS.app)}][data-ready="true"]`,
207
+ /** Any element showing this notification (bubble, thread, card, row, open email, timeline row). */
208
+ notification: (id) => `[data-notification-id=${attr(id)}]`,
209
+ /** A message bubble, optionally from one sender. */
210
+ smsBubble: (filter = {}) => `[data-testid=${attr(TEST_IDS.smsBubble)}]${filter.from ? `[data-from=${attr(filter.from)}]` : ""}${filter.id ? `[data-notification-id=${attr(filter.id)}]` : ""}`,
211
+ /** A conversation in the Messages list. */
212
+ smsThread: (from) => `[data-testid=${attr(TEST_IDS.smsThread)}][data-from=${attr(from)}]`,
213
+ /** A channel tab: `"all"`, `"sms"`, `"push"`, `"email"` or `"chat"`. */
214
+ channelTab: (value) => `[data-testid=${attr(TEST_IDS.channelTab)}][data-value=${attr(value)}]`,
215
+ /** A chat message, optionally by id. */
216
+ chatMessage: (id) => `[data-testid=${attr(TEST_IDS.chatMessage)}]${id ? `[data-notification-id=${attr(id)}]` : ""}`,
217
+ /** A channel in the chat sidebar. */
218
+ chatChannel: (to) => `[data-testid=${attr(TEST_IDS.chatChannel)}][data-to=${attr(to)}]`,
219
+ /** A push notification card, optionally by id. */
220
+ pushNotification: (id) => `[data-testid=${attr(TEST_IDS.pushNotification)}]${id ? `[data-notification-id=${attr(id)}]` : ""}`,
221
+ /** An inbox row, optionally by id. */
222
+ emailRow: (id) => `[data-testid=${attr(TEST_IDS.emailRow)}]${id ? `[data-notification-id=${attr(id)}]` : ""}`,
223
+ /** A timeline row, optionally by id. */
224
+ timelineRow: (id) => `[data-testid=${attr(TEST_IDS.timelineRow)}]${id ? `[data-notification-id=${attr(id)}]` : ""}`,
225
+ /** A dashboard tab button by tab id (`emulators`, `notifications`, …). */
226
+ dashboardTab: (id) => `[data-testid=${attr(TEST_IDS.dashboardTab)}][data-tab=${attr(id)}]`,
227
+ /** A dashboard tab's panel by tab id. */
228
+ dashboardPanel: (id) => `[data-testid=${attr(TEST_IDS.dashboardPanel)}][data-tab=${attr(id)}]`
229
+ };
230
+
231
+ export {
232
+ TEST_IDS,
233
+ selectors
234
+ };
235
+ //# sourceMappingURL=chunk-FBJ2DRHH.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/testids.ts"],
4
+ "sourcesContent": ["/**\n * Every `data-testid` the harness UI renders, and selector helpers for browser tests.\n *\n * Elements that show one notification also carry its fields as attributes, so a test can narrow by\n * what it knows instead of by position:\n *\n * data-notification-id data-channel data-service data-source data-to data-from\n * data-status data-created-at data-unread (\"true\" | \"false\")\n * data-via (\"whatsapp\", only on WhatsApp messages)\n *\n * The UI root (`TEST_IDS.app`) reports its state the same way: `data-ready` (\"true\" once the first\n * read finished), `data-view`, `data-namespace`, `data-count`, `data-version`, `data-connected`,\n * `data-sound`, `data-motion`, `data-layout` (\"grid\" = devices side by side, \"tabs\" = one device at\n * a time) and `data-tab` (the selected channel tab: \"all\", \"sms\", \"push\", \"email\" or \"chat\").\n *\n * This module has no dependencies, so Playwright, Cypress or WebdriverIO specs can import it.\n */\nexport const TEST_IDS = {\n /** The UI root. */\n app: \"notifications-app\",\n\n // \u2500\u2500 Top bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n topbar: \"topbar\",\n /** `<select>` of namespaces. */\n namespace: \"namespace\",\n /** Filter `<input>` (recipient, sender, text). */\n search: \"search\",\n /** View tabs; `aria-pressed=\"true\"` on the active one. */\n viewDevices: \"view-devices\",\n viewTimeline: \"view-timeline\",\n /** \"Follow new\" checkbox. */\n follow: \"follow\",\n /** Sound on/off button; `aria-pressed`. */\n sound: \"sound-toggle\",\n /** Live stream indicator; `data-state=\"live\" | \"reconnecting\"`. */\n connection: \"connection\",\n /** One pill per emulator; `data-name`, `data-service`, `data-ok`, `data-count`. */\n source: \"source\",\n /** Discovery or emulator errors, or the \"no emulators\" hint; `data-kind=\"error\" | \"empty\"`. */\n notice: \"notice\",\n /** Bottom-left message after an action, e.g. \"Conversation archived.\" */\n toast: \"toast\",\n toastUndo: \"toast-undo\",\n\n // \u2500\u2500 Channel tabs \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** The `role=\"tablist\"` that switches between devices; `data-layout=\"grid\" | \"tabs\"`. */\n channelTabs: \"channel-tabs\",\n /** One `role=\"tab\"`; `data-value=\"all\" | \"sms\" | \"push\" | \"email\" | \"chat\"`, `aria-selected`, `data-unread` (a count). */\n channelTab: \"channel-tab\",\n /** Unread badge on a tab whose device is not showing its newest arrivals (absent when 0). */\n channelTabUnread: \"channel-tab-unread\",\n\n // \u2500\u2500 SMS: Messages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** The phone; `data-screen=\"threads\" | \"conversation\"`, `data-recipient`, `data-thread`, and `data-via=\"whatsapp\"` while a WhatsApp chat is open. */\n smsDevice: \"sms-device\",\n /** Phone number `<select>`; option values are E.164 numbers. */\n smsRecipient: \"sms-recipient\",\n /** Unread SMS badge next to the column title (absent when 0). */\n smsUnreadCount: \"sms-unread-count\",\n /** One conversation in the list; `data-from` (the sender address), `data-unread`, `data-pinned`, `data-muted`, `data-via`. */\n smsThread: \"sms-thread\",\n smsThreadName: \"sms-thread-name\",\n smsThreadPreview: \"sms-thread-preview\",\n smsThreadTime: \"sms-thread-time\",\n smsThreadUnread: \"sms-thread-unread\",\n /** \"WhatsApp\" label on a WhatsApp conversation in the list. */\n smsThreadVia: \"sms-thread-via\",\n /** Swipe actions behind a thread (also reachable with the keyboard: focus the thread, press Delete). */\n smsThreadDelete: \"sms-thread-delete\",\n smsThreadMute: \"sms-thread-mute\",\n smsThreadPin: \"sms-thread-pin\",\n smsThreadToggleUnread: \"sms-thread-toggle-unread\",\n /** Shown when the phone has no messages. */\n smsEmpty: \"sms-empty\",\n /** An open conversation; `data-from`, `data-via=\"sms\" | \"whatsapp\"`. */\n smsConversation: \"sms-conversation\",\n smsConversationTitle: \"sms-conversation-title\",\n smsBack: \"sms-back\",\n /** One message; carries the notification attributes plus `data-code` when it holds a one-time code. */\n smsBubble: \"sms-bubble\",\n smsBubbleMedia: \"sms-bubble-media\",\n /** The time revealed by swiping the conversation left. */\n smsBubbleTime: \"sms-bubble-time\",\n /** A reaction added with the long-press menu; `data-tapback`. */\n smsTapback: \"sms-tapback\",\n /** Centered date stamp between messages. */\n smsTimestamp: \"sms-timestamp\",\n /** One-time code suggestion above the keyboard; `data-code`. */\n smsCode: \"sms-code\",\n /** Long-press menu on a bubble. */\n smsMenu: \"sms-menu\",\n smsMenuCopy: \"sms-menu-copy\",\n /** One tapback in the menu; `data-tapback=\"heart\" | \"like\" | \"dislike\" | \"laugh\" | \"emphasize\" | \"question\"`. */\n smsMenuTapback: \"sms-menu-tapback\",\n\n // \u2500\u2500 Push: lock screen (iOS) / shade (Android) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** The phone; `data-skin=\"ios\" | \"android\"`, `data-recipient`, `data-platform`. */\n pushDevice: \"push-device\",\n /** Device token `<select>`. */\n pushRecipient: \"push-recipient\",\n /** Skin buttons; `data-value`, `aria-pressed`. */\n pushSkin: \"push-skin\",\n pushUnreadCount: \"push-unread-count\",\n /** One notification; notification attributes plus `data-expanded`, `data-platform`, `data-app`, `data-stacked`. */\n pushNotification: \"push-notification\",\n pushNotificationApp: \"push-notification-app\",\n pushNotificationTitle: \"push-notification-title\",\n pushNotificationBody: \"push-notification-body\",\n pushNotificationTime: \"push-notification-time\",\n pushNotificationImage: \"push-notification-image\",\n /** The `data` payload, shown when expanded. */\n pushNotificationData: \"push-notification-data\",\n /** Service, status, badge and sound, shown when expanded. */\n pushNotificationMeta: \"push-notification-meta\",\n /** iOS: a group of notifications from one app; `data-app`, `data-count`, `data-open`. */\n pushGroup: \"push-group\",\n /** iOS: \"N more notifications\" under a collapsed group (click to open it); `data-count`. */\n pushGroupMore: \"push-group-more\",\n /** iOS: \"Show less\" on an open group. */\n pushGroupCollapse: \"push-group-collapse\",\n /** iOS: swipe-left actions. */\n pushClear: \"push-clear\",\n pushOptions: \"push-options\",\n /** iOS long-press preview; Android long-press settings. */\n pushPreview: \"push-preview\",\n pushSettings: \"push-settings\",\n /** Android \"Clear all\". */\n pushClearAll: \"push-clear-all\",\n pushEmpty: \"push-empty\",\n\n // \u2500\u2500 Email: web mail \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** The browser window; `data-screen=\"inbox\" | \"message\"`, `data-recipient`. */\n emailDevice: \"email-device\",\n /** Mailbox `<select>`; option values are lower-case addresses. */\n emailRecipient: \"email-recipient\",\n emailUnreadCount: \"email-unread-count\",\n /** One inbox row; notification attributes plus `data-starred`. */\n emailRow: \"email-row\",\n emailRowFrom: \"email-row-from\",\n emailRowSubject: \"email-row-subject\",\n emailRowSnippet: \"email-row-snippet\",\n emailRowDate: \"email-row-date\",\n emailRowService: \"email-row-service\",\n emailRowAttachment: \"email-row-attachment\",\n emailRowStar: \"email-row-star\",\n /** Hover actions on a row. */\n emailRowArchive: \"email-row-archive\",\n emailRowDelete: \"email-row-delete\",\n emailRowToggleRead: \"email-row-toggle-read\",\n emailRefresh: \"email-refresh\",\n emailEmpty: \"email-empty\",\n /** The open message; notification attributes. */\n emailOpen: \"email-open\",\n emailBack: \"email-back\",\n emailArchive: \"email-archive\",\n emailDelete: \"email-delete\",\n emailMarkUnread: \"email-mark-unread\",\n emailSubject: \"email-subject\",\n emailFromName: \"email-from-name\",\n emailFromAddress: \"email-from-address\",\n /** \"to me, \u2026\" line; click to toggle the details. */\n emailTo: \"email-to\",\n emailDate: \"email-date\",\n emailDetails: \"email-details\",\n /** One row of the details; `data-field=\"from\" | \"to\" | \"cc\" | \"bcc\" | \"reply-to\" | \"date\" | \"subject\" | \"mailed-by\" | \"message-id\"`. */\n emailDetail: \"email-detail\",\n /** The HTML body `<iframe>` (same origin: use `frameLocator`). */\n emailBody: \"email-body\",\n /** The plain-text body when there is no HTML. */\n emailText: \"email-text\",\n emailAttachments: \"email-attachments\",\n /** One attachment; `data-filename`, `data-content-type`, `data-size`. */\n emailAttachment: \"email-attachment\",\n\n // \u2500\u2500 Chat: team chat window \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** The chat window; `data-recipient` (the open channel), `data-workspace`. */\n chatDevice: \"chat-device\",\n /** Channel `<select>`; option values are channel names (`#alerts`) or webhook paths. */\n chatRecipient: \"chat-recipient\",\n chatUnreadCount: \"chat-unread-count\",\n chatWorkspace: \"chat-workspace\",\n /** One channel in the sidebar; `data-to`, `data-unread` (a count), `aria-current`. */\n chatChannel: \"chat-channel\",\n /** The open channel's name in the header. */\n chatTitle: \"chat-title\",\n /** One message; notification attributes plus `data-method`, `data-ephemeral`, `data-thread`. */\n chatMessage: \"chat-message\",\n chatMessageAuthor: \"chat-message-author\",\n chatMessageTime: \"chat-message-time\",\n /** The message text, with mrkdwn formatting applied. */\n chatMessageText: \"chat-message-text\",\n /** Block Kit blocks; each block inside carries `data-block=\"<type>\"`. */\n chatMessageBlocks: \"chat-message-blocks\",\n /** Legacy attachments; each one inside carries `data-color`. */\n chatMessageAttachments: \"chat-message-attachments\",\n /** One reaction; `data-name`, `data-count`. */\n chatMessageReaction: \"chat-message-reaction\",\n chatEmpty: \"chat-empty\",\n\n // \u2500\u2500 Timeline + inspector \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n timeline: \"timeline\",\n /** One row; notification attributes. Click it to inspect. */\n timelineRow: \"timeline-row\",\n timelineEmpty: \"timeline-empty\",\n /** The JSON inspector; notification attributes. Opened by clicking a timeline row or double-clicking any notification. */\n inspector: \"inspector\",\n inspectorTitle: \"inspector-title\",\n inspectorClose: \"inspector-close\",\n inspectorShowOnDevice: \"inspector-show-on-device\",\n /** One normalized field; `data-field`. */\n inspectorField: \"inspector-field\",\n /** The full record, normalized fields plus `raw`, as JSON text. */\n inspectorJson: \"inspector-json\",\n\n // \u2500\u2500 Dashboard (mountDashboard) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** The dashboard root; `data-tab` is the open tab's id. */\n dashboard: \"dashboard\",\n /** One tab button; `data-tab` (`emulators`, `notifications`, or an embedder's id), `aria-selected`. */\n dashboardTab: \"dashboard-tab\",\n /** One tab's panel; `data-tab`. Hidden unless its tab is open. */\n dashboardPanel: \"dashboard-panel\",\n /** Notifications that arrived while another tab was open; `data-count`. Hidden at 0. */\n dashboardBadge: \"dashboard-badge\",\n} as const\n\nexport type TestId = (typeof TEST_IDS)[keyof typeof TEST_IDS]\n\nconst attr = (value: string) => JSON.stringify(value)\n\n/** CSS selectors for the harness UI. Each one works with `page.locator()` or `querySelector`. */\nexport const selectors = {\n /** `[data-testid=\"\u2026\"]` */\n testId: (id: TestId) => `[data-testid=${attr(id)}]`,\n /** The ready UI root: wait for this before asserting. */\n ready: () => `[data-testid=${attr(TEST_IDS.app)}][data-ready=\"true\"]`,\n /** Any element showing this notification (bubble, thread, card, row, open email, timeline row). */\n notification: (id: string) => `[data-notification-id=${attr(id)}]`,\n /** A message bubble, optionally from one sender. */\n smsBubble: (filter: { from?: string; id?: string } = {}) =>\n `[data-testid=${attr(TEST_IDS.smsBubble)}]${filter.from ? `[data-from=${attr(filter.from)}]` : \"\"}${filter.id ? `[data-notification-id=${attr(filter.id)}]` : \"\"}`,\n /** A conversation in the Messages list. */\n smsThread: (from: string) => `[data-testid=${attr(TEST_IDS.smsThread)}][data-from=${attr(from)}]`,\n /** A channel tab: `\"all\"`, `\"sms\"`, `\"push\"`, `\"email\"` or `\"chat\"`. */\n channelTab: (value: \"all\" | \"sms\" | \"push\" | \"email\" | \"chat\") =>\n `[data-testid=${attr(TEST_IDS.channelTab)}][data-value=${attr(value)}]`,\n /** A chat message, optionally by id. */\n chatMessage: (id?: string) =>\n `[data-testid=${attr(TEST_IDS.chatMessage)}]${id ? `[data-notification-id=${attr(id)}]` : \"\"}`,\n /** A channel in the chat sidebar. */\n chatChannel: (to: string) => `[data-testid=${attr(TEST_IDS.chatChannel)}][data-to=${attr(to)}]`,\n /** A push notification card, optionally by id. */\n pushNotification: (id?: string) =>\n `[data-testid=${attr(TEST_IDS.pushNotification)}]${id ? `[data-notification-id=${attr(id)}]` : \"\"}`,\n /** An inbox row, optionally by id. */\n emailRow: (id?: string) =>\n `[data-testid=${attr(TEST_IDS.emailRow)}]${id ? `[data-notification-id=${attr(id)}]` : \"\"}`,\n /** A timeline row, optionally by id. */\n timelineRow: (id?: string) =>\n `[data-testid=${attr(TEST_IDS.timelineRow)}]${id ? `[data-notification-id=${attr(id)}]` : \"\"}`,\n /** A dashboard tab button by tab id (`emulators`, `notifications`, \u2026). */\n dashboardTab: (id: string) =>\n `[data-testid=${attr(TEST_IDS.dashboardTab)}][data-tab=${attr(id)}]`,\n /** A dashboard tab's panel by tab id. */\n dashboardPanel: (id: string) =>\n `[data-testid=${attr(TEST_IDS.dashboardPanel)}][data-tab=${attr(id)}]`,\n}\n"],
5
+ "mappings": ";AAiBO,IAAM,WAAW;AAAA;AAAA,EAEtB,KAAK;AAAA;AAAA,EAGL,QAAQ;AAAA;AAAA,EAER,WAAW;AAAA;AAAA,EAEX,QAAQ;AAAA;AAAA,EAER,aAAa;AAAA,EACb,cAAc;AAAA;AAAA,EAEd,QAAQ;AAAA;AAAA,EAER,OAAO;AAAA;AAAA,EAEP,YAAY;AAAA;AAAA,EAEZ,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,OAAO;AAAA,EACP,WAAW;AAAA;AAAA;AAAA,EAIX,aAAa;AAAA;AAAA,EA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