@remit/ui 0.0.221 → 0.0.223
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.
- package/package.json +14 -3
- package/src/components/DropdownMenu.tsx +100 -0
- package/src/components/EmptyState.tsx +11 -0
- package/src/components/ErrorBanner.render.test.ts +107 -0
- package/src/components/ErrorBanner.stories.tsx +132 -0
- package/src/components/ErrorBanner.tsx +122 -0
- package/src/components/ErrorBannerStack.tsx +34 -0
- package/src/components/ErrorState.render.test.ts +82 -0
- package/src/components/ErrorState.tsx +80 -0
- package/src/components/KeyboardShortcutsModal.tsx +111 -0
- package/src/components/account-service-change-dialog.render.test.ts +1 -41
- package/src/components/account-service-choice.render.test.ts +0 -26
- package/src/components/account-service-toggles.render.test.ts +0 -6
- package/src/components/address-display.render.test.ts +1 -38
- package/src/components/address-tag.render.test.ts +0 -11
- package/src/components/agenda-flow.reach.test.ts +0 -8
- package/src/components/agenda-flow.render.test.ts +0 -31
- package/src/components/agenda-panels.render.test.ts +0 -5
- package/src/components/app-shell-slotted.render.test.ts +0 -118
- package/src/components/attachment-list.render.test.ts +41 -24
- package/src/components/attachment-list.stories.tsx +67 -0
- package/src/components/attachment-list.tsx +112 -35
- package/src/components/attendee-row.render.test.ts +0 -41
- package/src/components/attention-dot.stories.tsx +46 -0
- package/src/components/attention-dot.tsx +23 -0
- package/src/components/banner.render.test.ts +0 -7
- package/src/components/bottom-sheet.render.test.ts +0 -42
- package/src/components/brief-section.render.test.ts +0 -13
- package/src/components/brief-sections.keyboard.test.ts +0 -13
- package/src/components/brief-sections.render.test.ts +0 -22
- package/src/components/calendar-clash-strip.render.test.ts +0 -19
- package/src/components/calendar-grid.render.test.ts +0 -79
- package/src/components/calendar-invite-card.render.test.ts +0 -19
- package/src/components/calendar-list.render.test.ts +0 -21
- package/src/components/calendar-slot-offers.render.test.ts +0 -24
- package/src/components/calendar-suggestion-deck.render.test.ts +0 -18
- package/src/components/calendar-toolbar.render.test.ts +1 -53
- package/src/components/category-badge.render.test.ts +1 -24
- package/src/components/compose-action-bar.render.test.ts +0 -5
- package/src/components/compose-attachments.render.test.ts +0 -38
- package/src/components/event-detail.render.test.ts +0 -27
- package/src/components/event-editor.render.test.ts +0 -4
- package/src/components/event-suggestion-card.render.test.ts +0 -61
- package/src/components/event-suggestion-card.zone-gate.test.ts +1 -7
- package/src/components/filter-clause-chip.tsx +1 -60
- package/src/components/filter-rule-editor.create.test.ts +0 -6
- package/src/components/filter-rule-editor.stories.tsx +24 -138
- package/src/components/filter-rule-editor.tsx +7 -93
- package/src/components/filter-rule.render.test.ts +9 -299
- package/src/components/filter-rule.ts +20 -85
- package/src/components/filter-sheet.render.test.ts +0 -7
- package/src/components/folder-manage-actions.render.test.ts +0 -13
- package/src/components/folder-manager.render.test.ts +0 -31
- package/src/components/folder-mutation-dialog.render.test.ts +0 -83
- package/src/components/folder-rename-dialog.render.test.ts +0 -14
- package/src/components/folder-row.render.test.ts +0 -30
- package/src/components/folder-sync-state.test.ts +0 -61
- package/src/components/folder-tree-picker.create.test.ts +0 -30
- package/src/components/folder-tree-picker.render.test.ts +0 -35
- package/src/components/intelligence-calendar-fixtures.ts +0 -2
- package/src/components/intelligence-calendar.render.test.ts +0 -4
- package/src/components/intelligence-panel.render.test.ts +1 -62
- package/src/components/intelligence-panel.stories.tsx +0 -76
- package/src/components/intelligence-panel.tab-strip.test.ts +0 -1
- package/src/components/intelligence-panel.tsx +6 -176
- package/src/components/intelligence-toggle.render.test.ts +0 -5
- package/src/components/isolated-email-frame.render.test.ts +0 -122
- package/src/components/isolated-email-frame.tsx +55 -3
- package/src/components/keyboard-hint-bar.render.test.ts +0 -7
- package/src/components/label-chip.render.test.ts +0 -28
- package/src/components/label-chip.tsx +1 -1
- package/src/components/mail-header.render.test.ts +0 -20
- package/src/components/mcp-connected-apps-page.stories.tsx +58 -0
- package/src/components/mcp-connected-apps-page.tsx +79 -0
- package/src/components/mcp-consent-page.stories.tsx +39 -0
- package/src/components/mcp-consent-page.tsx +47 -0
- package/src/components/mcp-device-page.stories.tsx +57 -0
- package/src/components/mcp-device-page.tsx +107 -0
- package/src/components/mcp-error-notice.stories.tsx +34 -0
- package/src/components/mcp-error-notice.tsx +23 -0
- package/src/components/mcp-error-page.stories.tsx +17 -0
- package/src/components/mcp-error-page.tsx +15 -0
- package/src/components/mcp-fixtures.ts +16 -0
- package/src/components/mcp-login-page.stories.tsx +37 -0
- package/src/components/mcp-login-page.tsx +58 -0
- package/src/components/mcp-page.stories.tsx +27 -0
- package/src/components/mcp-page.tsx +35 -0
- package/src/components/mcp-permission-list.stories.tsx +21 -0
- package/src/components/mcp-permission-list.tsx +22 -0
- package/src/components/message-body-view.render.test.ts +0 -21
- package/src/components/message-list-pane.brief-filter.test.ts +0 -6
- package/src/components/message-list-pane.render.test.ts +0 -54
- package/src/components/message-list-state.render.test.ts +0 -84
- package/src/components/{quarantine-bug-dialog.tsx → message-report-dialog.tsx} +9 -14
- package/src/components/message-row.render.test.ts +1 -98
- package/src/components/mobile-message-action-bar.render.test.ts +0 -59
- package/src/components/mobile-reading-pane.render.test.ts +0 -48
- package/src/components/mobile-reading-pane.stories.tsx +78 -0
- package/src/components/mobile-reading-pane.tsx +55 -41
- package/src/components/mobile-search-view.render.test.ts +0 -16
- package/src/components/mobile-search-view.stories.tsx +8 -11
- package/src/components/mobile-search-view.tsx +1 -1
- package/src/components/nav-sidebar.keyboard.test.ts +0 -8
- package/src/components/nav-sidebar.render.test.ts +2 -133
- package/src/components/new-folder-form.render.test.ts +0 -26
- package/src/components/outbox-row.render.test.ts +0 -9
- package/src/components/pane-layout.render.test.ts +0 -18
- package/src/components/plain-text-editor.mount.test.ts +0 -16
- package/src/components/popover-menu.render.test.ts +0 -11
- package/src/components/progress-bar.render.test.ts +0 -14
- package/src/components/quarantine-report.test.ts +0 -8
- package/src/components/quarantine-section.render.test.ts +16 -13
- package/src/components/quarantine-section.stories.tsx +11 -8
- package/src/components/reading-pane.render.test.ts +2 -106
- package/src/components/reading-pane.stories.tsx +3 -0
- package/src/components/refresh-button.render.test.ts +0 -9
- package/src/components/rescue-from-spam-flow.render.test.ts +0 -24
- package/src/components/rich-text-editor.mount.test.ts +0 -19
- package/src/components/rich-text-image-node.ts +11 -9
- package/src/components/role-appointment-list.render.test.ts +0 -49
- package/src/components/role-appointment-prompt.render.test.ts +0 -79
- package/src/components/row-actions.render.test.ts +0 -34
- package/src/components/search-bar.render.test.ts +0 -44
- package/src/components/search-chip-input.render.test.ts +0 -71
- package/src/components/search-conversion-notice.stories.tsx +0 -6
- package/src/components/search-conversion-notice.tsx +3 -9
- package/src/components/search-conversion.render.test.ts +0 -52
- package/src/components/search-conversion.ts +2 -18
- package/src/components/search-result-row.tsx +5 -26
- package/src/components/search-results.render.test.ts +0 -68
- package/src/components/search-results.stories.tsx +0 -30
- package/src/components/search-results.tsx +1 -1
- package/src/components/security-select.render.test.ts +1 -14
- package/src/components/selection-top-bar.render.test.ts +0 -180
- package/src/components/selection-wizard-fixtures.ts +0 -2
- package/src/components/selection-wizard.render.test.ts +7 -212
- package/src/components/selection-wizard.stories.tsx +24 -164
- package/src/components/selection-wizard.tsx +10 -86
- package/src/components/self-update.render.test.ts +0 -113
- package/src/components/sender-trust-indicator.render.test.ts +0 -30
- package/src/components/shell-top-bar.render.test.ts +0 -31
- package/src/components/shell-top-bar.stories.tsx +7 -0
- package/src/components/shell-top-bar.tsx +11 -2
- package/src/components/slide-panel.render.test.ts +0 -18
- package/src/components/suggest-list.render.test.ts +0 -6
- package/src/components/swipeable-row.gesture.test.ts +85 -40
- package/src/components/swipeable-row.render.test.ts +0 -7
- package/src/components/swipeable-row.stories.tsx +3 -2
- package/src/components/swipeable-row.tsx +65 -144
- package/src/components/sync-warning-fixtures.ts +22 -0
- package/src/components/sync-warning-report.ts +38 -0
- package/src/components/sync-warning-row.tsx +51 -0
- package/src/components/sync-warning-section.render.test.ts +19 -0
- package/src/components/sync-warning-section.stories.tsx +94 -0
- package/src/components/sync-warning-section.tsx +56 -0
- package/src/components/touch-list-body.render.test.ts +0 -29
- package/src/components/wizard.render.test.ts +0 -22
- package/src/filter-presets.test.ts +1 -107
- package/src/index.ts +40 -34
- package/src/lib/compose-language.test.ts +0 -11
- package/src/lib/email-render-treatment.test.ts +0 -21
- package/src/lib/keymap.test.ts +0 -32
- package/src/lib/property-prefill.ts +2 -2
- package/src/lib/search-rule.test.ts +0 -4
- package/src/lib/search-rule.ts +0 -9
- package/src/lib/sender-derivation.ts +3 -5
- package/src/lib/swipe-config.ts +11 -0
- package/src/lib/use-list-cursor.test.ts +0 -7
- package/src/lib/use-list-keyboard.test.ts +0 -14
- package/src/lib/use-long-press.test.ts +53 -36
- package/src/lib/use-long-press.ts +62 -56
- package/src/lib/use-modal-focus.test.ts +0 -20
- package/src/lib/use-selection.hook.test.ts +0 -13
- package/src/lib/use-selection.test.ts +0 -101
- package/src/lib/use-swipe-navigation.test.ts +162 -0
- package/src/lib/use-swipe-navigation.ts +90 -0
- package/src/lib/wizard-steps.test.ts +18 -79
- package/src/lib/wizard-steps.ts +27 -67
- package/src/mcp-pages.ts +36 -0
- package/src/category-presentation.test.ts +0 -76
- package/src/components/account-service-status.render.test.ts +0 -82
- package/src/components/app-password-hint.render.test.ts +0 -23
- package/src/components/app-top-bar.render.test.ts +0 -59
- package/src/components/auth-card.render.test.ts +0 -24
- package/src/components/auth-footer.render.test.ts +0 -17
- package/src/components/auth-hero.render.test.ts +0 -31
- package/src/components/auto-moved-badge.render.test.ts +0 -65
- package/src/components/button.render.test.ts +0 -29
- package/src/components/calendar-event-chip.render.test.ts +0 -67
- package/src/components/calendar-parse-badge.render.test.ts +0 -40
- package/src/components/checkbox.render.test.ts +0 -65
- package/src/components/compose-form-shell.render.test.ts +0 -106
- package/src/components/dialog.render.test.ts +0 -51
- package/src/components/field-label.render.test.ts +0 -16
- package/src/components/mail-action-toolbar.render.test.ts +0 -43
- package/src/components/nav-link-surface.render.test.ts +0 -126
- package/src/components/new-folder-action.render.test.ts +0 -44
- package/src/components/pane-header.render.test.ts +0 -22
- package/src/components/pull-to-refresh.render.test.ts +0 -46
- package/src/components/recurrence-scope-prompt.render.test.ts +0 -36
- package/src/components/rescue-banner.render.test.ts +0 -32
- package/src/components/rescue-candidate-row.render.test.ts +0 -68
- package/src/components/search-token-chip.render.test.ts +0 -42
- package/src/components/self-update-dot.tsx +0 -32
- package/src/components/settings-primitives.render.test.ts +0 -160
- package/src/lib/email-layout-clamp.test.ts +0 -139
- package/src/lib/label-color.test.ts +0 -25
- package/src/lib/semantic-off.ts +0 -20
- package/src/stories-viewport-globals.test.ts +0 -77
|
@@ -2,7 +2,6 @@ import assert from "node:assert/strict";
|
|
|
2
2
|
import { describe, it } from "node:test";
|
|
3
3
|
import { createElement } from "react";
|
|
4
4
|
import { renderToString } from "react-dom/server";
|
|
5
|
-
import type { BriefCategoryFilter } from "../category-presentation.js";
|
|
6
5
|
import type { BriefFilterId } from "../lib/brief-filters.js";
|
|
7
6
|
import type { ThreadSection } from "./app-shell-types.js";
|
|
8
7
|
import { BriefSections } from "./brief-sections.js";
|
|
@@ -53,28 +52,7 @@ const chipControl = {
|
|
|
53
52
|
onClearFilters: () => undefined,
|
|
54
53
|
};
|
|
55
54
|
|
|
56
|
-
function render(briefCategory: BriefCategoryFilter) {
|
|
57
|
-
return renderToString(
|
|
58
|
-
createElement(BriefSections, {
|
|
59
|
-
sections,
|
|
60
|
-
Row: ComfortableRow,
|
|
61
|
-
briefCategory,
|
|
62
|
-
onSelectThread: () => undefined,
|
|
63
|
-
onSelectBriefCategory: () => undefined,
|
|
64
|
-
...chipControl,
|
|
65
|
-
}),
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
55
|
describe("BriefSections", () => {
|
|
70
|
-
it("renders section labels and rows", () => {
|
|
71
|
-
const html = render("all");
|
|
72
|
-
assert.match(html, /Personal/);
|
|
73
|
-
assert.match(html, /Newsletter/);
|
|
74
|
-
assert.match(html, /Priya Nair/);
|
|
75
|
-
assert.match(html, /Weekly Brief/);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
56
|
// #314: membership is the host's answer, and in the app it is the server's.
|
|
79
57
|
// A list that drops a row it was handed is a second filter layer under the
|
|
80
58
|
// first, narrowing one page by a criterion the request applied to the whole
|
|
@@ -25,27 +25,8 @@ describe("CalendarClashStrip", () => {
|
|
|
25
25
|
assert.match(html, /text-positive/);
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
it("takes the caller's words for the clear case", () => {
|
|
29
|
-
assert.match(
|
|
30
|
-
render([], "Thursday afternoon is empty from 15:15."),
|
|
31
|
-
/empty from 15:15/,
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it("names every clash, with the calendar it came from", () => {
|
|
36
|
-
const html = render([dentist, planning]);
|
|
37
|
-
assert.match(html, /Dentist/);
|
|
38
|
-
assert.match(html, /Sprint planning/);
|
|
39
|
-
assert.match(html, /Personal \(matthijs@\)/);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
28
|
it("counts the collisions rather than leaving the tally to the eye", () => {
|
|
43
29
|
assert.match(render([dentist]), /clashes with something/);
|
|
44
30
|
assert.match(render([dentist, planning]), /clashes with 2 things/);
|
|
45
31
|
});
|
|
46
|
-
|
|
47
|
-
it("draws a collision as danger and a clear span as neither", () => {
|
|
48
|
-
assert.match(render([dentist]), /bg-danger-soft/);
|
|
49
|
-
assert.doesNotMatch(render([]), /danger/);
|
|
50
|
-
});
|
|
51
32
|
});
|
|
@@ -100,7 +100,6 @@ interface Chip {
|
|
|
100
100
|
/** A block filling its slot, as opposed to the all-day band's pill. */
|
|
101
101
|
timed: boolean;
|
|
102
102
|
tabbable: boolean;
|
|
103
|
-
classes: string[];
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
/**
|
|
@@ -138,7 +137,6 @@ function chips(root: HTMLElement): Chip[] {
|
|
|
138
137
|
date: el.closest<HTMLElement>("[data-date]")?.dataset.date ?? "",
|
|
139
138
|
timed: !el.classList.contains("my-px"),
|
|
140
139
|
tabbable: el.getAttribute("tabindex") === "0",
|
|
141
|
-
classes: Array.from(el.classList),
|
|
142
140
|
}));
|
|
143
141
|
}
|
|
144
142
|
|
|
@@ -161,27 +159,6 @@ describe("CalendarGrid placement", () => {
|
|
|
161
159
|
assert.equal(chip(root, "Handover").date, TOMORROW);
|
|
162
160
|
assert.equal(chip(root, "Handover").time, "09:00");
|
|
163
161
|
});
|
|
164
|
-
|
|
165
|
-
it("names the start only, so a column is never a range of digits", () => {
|
|
166
|
-
assert.equal(
|
|
167
|
-
chip(grid({ events: [roadmap] }), "Roadmap review").time,
|
|
168
|
-
"10:00",
|
|
169
|
-
);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it("keeps both sides of an overlap in the day, each in its own hue", () => {
|
|
173
|
-
const root = grid({ events: [roadmap, dentist] });
|
|
174
|
-
const drawn = chips(root);
|
|
175
|
-
assert.equal(drawn.length, 2);
|
|
176
|
-
assert.ok(drawn.every((one) => one.date === TODAY));
|
|
177
|
-
assert.ok(chip(root, "Roadmap review").classes.includes("bg-cal-3-soft"));
|
|
178
|
-
assert.ok(chip(root, "Dentist").classes.includes("bg-cal-5-soft"));
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
it("falls back to the first hue for a calendar nobody coloured", () => {
|
|
182
|
-
const root = grid({ events: [roadmap], colorByCalendarId: {} });
|
|
183
|
-
assert.ok(chip(root, "Roadmap review").classes.includes("bg-cal-1-soft"));
|
|
184
|
-
});
|
|
185
162
|
});
|
|
186
163
|
|
|
187
164
|
const monthDays = (root: HTMLElement): string[] =>
|
|
@@ -308,10 +285,6 @@ describe("CalendarGrid month", () => {
|
|
|
308
285
|
});
|
|
309
286
|
|
|
310
287
|
describe("CalendarGrid all-day band", () => {
|
|
311
|
-
it("gives the week a band of its own, named", () => {
|
|
312
|
-
assert.match(grid().innerHTML, /All day/);
|
|
313
|
-
});
|
|
314
|
-
|
|
315
288
|
it("draws an all-day event as a pill in the band, not a block in a slot", () => {
|
|
316
289
|
const drawn = chip(grid({ events: [conference] }), "Conference");
|
|
317
290
|
assert.equal(drawn.timed, false);
|
|
@@ -335,18 +308,6 @@ describe("CalendarGrid today", () => {
|
|
|
335
308
|
);
|
|
336
309
|
});
|
|
337
310
|
|
|
338
|
-
it("tints today's lane with the accent rather than a colour of its own", () => {
|
|
339
|
-
const lane = grid().querySelector<HTMLElement>(
|
|
340
|
-
`[data-date="${TODAY}"][aria-current="date"]`,
|
|
341
|
-
);
|
|
342
|
-
assert.ok(lane);
|
|
343
|
-
assert.ok(
|
|
344
|
-
Array.from(
|
|
345
|
-
grid().querySelectorAll<HTMLElement>(`[data-date="${TODAY}"]`),
|
|
346
|
-
).some((cell) => cell.classList.contains("bg-accent-soft/40")),
|
|
347
|
-
);
|
|
348
|
-
});
|
|
349
|
-
|
|
350
311
|
it("moves the marker with the clock it was handed", () => {
|
|
351
312
|
const root = grid({ now: `${TOMORROW}T09:30:00+02:00` });
|
|
352
313
|
assert.ok(
|
|
@@ -374,46 +335,6 @@ describe("CalendarGrid empty", () => {
|
|
|
374
335
|
});
|
|
375
336
|
});
|
|
376
337
|
|
|
377
|
-
describe("CalendarGrid selection and state", () => {
|
|
378
|
-
it("rings the selected event and leaves the rest alone", () => {
|
|
379
|
-
const root = grid({
|
|
380
|
-
events: [roadmap, dentist],
|
|
381
|
-
selectedEventId: "dentist",
|
|
382
|
-
});
|
|
383
|
-
assert.ok(chip(root, "Dentist").classes.includes("ring-2"));
|
|
384
|
-
assert.ok(!chip(root, "Roadmap review").classes.includes("ring-2"));
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
it("dims a declined event and strikes its title, the way the chip does", () => {
|
|
388
|
-
const root = grid({
|
|
389
|
-
events: [anEvent({ ...roadmap, myRsvp: "declined" })],
|
|
390
|
-
});
|
|
391
|
-
assert.ok(chip(root, "Roadmap review").classes.includes("opacity-60"));
|
|
392
|
-
assert.match(root.innerHTML, /line-through/);
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
it("dashes a tentative event rather than recolouring it", () => {
|
|
396
|
-
const root = grid({
|
|
397
|
-
events: [anEvent({ ...roadmap, status: "tentative" })],
|
|
398
|
-
});
|
|
399
|
-
const drawn = chip(root, "Roadmap review");
|
|
400
|
-
assert.ok(drawn.classes.includes("border-dashed"));
|
|
401
|
-
assert.ok(drawn.classes.includes("bg-cal-3-soft"));
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
it("marks an event that came out of mail", () => {
|
|
405
|
-
const root = grid({ events: [anEvent({ ...roadmap, threadId: "th_1" })] });
|
|
406
|
-
assert.match(root.innerHTML, /From mail/);
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
it("flags an event whose zone the source never settled", () => {
|
|
410
|
-
const root = grid({
|
|
411
|
-
events: [anEvent({ ...roadmap, zoneCertainty: "ambiguous" })],
|
|
412
|
-
});
|
|
413
|
-
assert.match(root.innerHTML, /Unclear zone/);
|
|
414
|
-
});
|
|
415
|
-
});
|
|
416
|
-
|
|
417
338
|
describe("CalendarGrid reach", () => {
|
|
418
339
|
it("puts every event in the tab order and answers Enter on it", () => {
|
|
419
340
|
const drawn = chips(grid({ events: [roadmap, dentist, conference] }));
|
|
@@ -29,14 +29,6 @@ const render = (props: Partial<CalendarInviteCardProps> = {}) =>
|
|
|
29
29
|
renderToString(createElement(CalendarInviteCard, { ...base, ...props }));
|
|
30
30
|
|
|
31
31
|
describe("CalendarInviteCard", () => {
|
|
32
|
-
it("names the organiser, the calendar and the span", () => {
|
|
33
|
-
const html = render();
|
|
34
|
-
assert.match(html, /Priya Natarajan/);
|
|
35
|
-
assert.match(html, /Work/);
|
|
36
|
-
assert.match(html, /Thursday 11 June, 14:00 – 15:00/);
|
|
37
|
-
assert.match(html, /Billing migration kickoff/);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
32
|
it("states the clash above the button that would accept it", () => {
|
|
41
33
|
const html = render();
|
|
42
34
|
const clash = html.indexOf("Dentist");
|
|
@@ -63,12 +55,6 @@ describe("CalendarInviteCard", () => {
|
|
|
63
55
|
assert.match(render(), /2 coming · 1 maybe · 1 no reply/);
|
|
64
56
|
});
|
|
65
57
|
|
|
66
|
-
it("takes a host's own guest surface instead of the tally", () => {
|
|
67
|
-
const html = render({ guests: createElement("p", null, "Three of four") });
|
|
68
|
-
assert.match(html, /Three of four/);
|
|
69
|
-
assert.doesNotMatch(html, /guests/);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
58
|
it("offers the newer revision rather than an answer to a stale one", () => {
|
|
73
59
|
const html = render({
|
|
74
60
|
invite: { ...kickoffInvite, state: "superseded", sequence: 1 },
|
|
@@ -122,11 +108,6 @@ describe("CalendarInviteCard", () => {
|
|
|
122
108
|
assert.doesNotMatch(html, /No reply/);
|
|
123
109
|
});
|
|
124
110
|
|
|
125
|
-
it("gives a thumb targets it can hit", () => {
|
|
126
|
-
assert.match(render({ touch: true }), /min-h-11/);
|
|
127
|
-
assert.doesNotMatch(render(), /min-h-11/);
|
|
128
|
-
});
|
|
129
|
-
|
|
130
111
|
it("leaves off the answers the host cannot store", () => {
|
|
131
112
|
const html = render({ onTentative: undefined, onReopen: undefined });
|
|
132
113
|
assert.doesNotMatch(html, />Maybe</);
|
|
@@ -45,19 +45,6 @@ const render = (
|
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
describe("CalendarList", () => {
|
|
48
|
-
it("groups calendars under the account that owns them", () => {
|
|
49
|
-
const html = render(["c1"]);
|
|
50
|
-
assert.match(html, /Work/);
|
|
51
|
-
assert.match(html, /Personal/);
|
|
52
|
-
assert.match(html, /Northwind/);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it("fills the swatch of a visible calendar and outlines a hidden one", () => {
|
|
56
|
-
const html = render(["c1"]);
|
|
57
|
-
assert.match(html, /bg-cal-1/);
|
|
58
|
-
assert.match(html, /bg-transparent/);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
48
|
it("offers an all-or-none control per account only when asked", () => {
|
|
62
49
|
assert.doesNotMatch(render(["c1"]), />None</);
|
|
63
50
|
assert.match(render(["c1", "c2"], true), />None</);
|
|
@@ -101,10 +88,6 @@ describe("CalendarList with a paused calendar", () => {
|
|
|
101
88
|
assert.match(html, /calendar sync off/);
|
|
102
89
|
});
|
|
103
90
|
|
|
104
|
-
it("leaves a live calendar unlabelled", () => {
|
|
105
|
-
assert.doesNotMatch(render(["c1"]), /calendar sync off/);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
91
|
it("keeps a paused calendar tickable, so its events stay drawable", () => {
|
|
109
92
|
assert.match(renderPaused(["c1"]), /checked=""/);
|
|
110
93
|
});
|
|
@@ -125,8 +108,4 @@ describe("CalendarList with a subscription that could not be refreshed", () => {
|
|
|
125
108
|
);
|
|
126
109
|
assert.match(html, /Not refreshed: the feed answered HTTP 404/);
|
|
127
110
|
});
|
|
128
|
-
|
|
129
|
-
it("says nothing for a calendar whose last refresh landed", () => {
|
|
130
|
-
assert.doesNotMatch(render(["c1"]), /Not refreshed/);
|
|
131
|
-
});
|
|
132
111
|
});
|
|
@@ -35,13 +35,6 @@ const render = (props: Partial<CalendarSlotOffersProps>) =>
|
|
|
35
35
|
renderToString(createElement(CalendarSlotOffers, { ...base, ...props }));
|
|
36
36
|
|
|
37
37
|
describe("CalendarSlotOffers", () => {
|
|
38
|
-
it("writes each gap as the span it is", () => {
|
|
39
|
-
const html = render({});
|
|
40
|
-
assert.match(html, /10:45/);
|
|
41
|
-
assert.match(html, /11:15/);
|
|
42
|
-
assert.match(html, /15:15/);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
38
|
it("marks a picked slot as pressed rather than by colour alone", () => {
|
|
46
39
|
const html = render({ picked: new Set(["15:15"]) });
|
|
47
40
|
assert.match(html, /aria-pressed="true"/);
|
|
@@ -53,21 +46,4 @@ describe("CalendarSlotOffers", () => {
|
|
|
53
46
|
assert.match(html, /Nothing free that day at this length/);
|
|
54
47
|
assert.doesNotMatch(html, /<button/);
|
|
55
48
|
});
|
|
56
|
-
|
|
57
|
-
it("takes the caller's words for an empty day", () => {
|
|
58
|
-
assert.match(
|
|
59
|
-
render({ slots: [], emptyText: "Thursday is full." }),
|
|
60
|
-
/Thursday is full/,
|
|
61
|
-
);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it("scrolls the chips in a row instead of wrapping them", () => {
|
|
65
|
-
assert.match(render({ scroll: true }), /overflow-x-auto/);
|
|
66
|
-
assert.match(render({}), /flex-wrap/);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("gives a thumb a target it can hit", () => {
|
|
70
|
-
assert.match(render({ touch: true }), /min-h-11/);
|
|
71
|
-
assert.doesNotMatch(render({}), /min-h-11/);
|
|
72
|
-
});
|
|
73
49
|
});
|
|
@@ -33,13 +33,6 @@ describe("CalendarSuggestionDeck", () => {
|
|
|
33
33
|
assert.match(words(), /3 left/);
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
it("says the buttons are there, so a gesture is never the only way", () => {
|
|
37
|
-
assert.match(
|
|
38
|
-
words(),
|
|
39
|
-
/swipe right to accept, left to drop, or use the buttons/,
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
36
|
it("says what an empty deck means rather than drawing a blank frame", () => {
|
|
44
37
|
const empty = words({ hasCard: false });
|
|
45
38
|
assert.match(
|
|
@@ -50,17 +43,6 @@ describe("CalendarSuggestionDeck", () => {
|
|
|
50
43
|
assert.doesNotMatch(empty, /left ·/);
|
|
51
44
|
});
|
|
52
45
|
|
|
53
|
-
it("takes the caller's words for an empty deck", () => {
|
|
54
|
-
assert.match(
|
|
55
|
-
words({ hasCard: false, emptyText: "You are through the queue." }),
|
|
56
|
-
/You are through the queue/,
|
|
57
|
-
);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it("keeps the gesture surface off the vertical axis it does not own", () => {
|
|
61
|
-
assert.match(render(), /touch-pan-y/);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
46
|
it("draws no swipe badge before the drag has committed to anything", () => {
|
|
65
47
|
const html = render({ blocked: true, blockedReason: "Pick a clock" });
|
|
66
48
|
assert.doesNotMatch(html, /Pick a clock/);
|
|
@@ -2,21 +2,9 @@ import assert from "node:assert/strict";
|
|
|
2
2
|
import { describe, it } from "node:test";
|
|
3
3
|
import { createElement } from "react";
|
|
4
4
|
import { renderToString } from "react-dom/server";
|
|
5
|
-
import {
|
|
5
|
+
import { CalendarViewSwitch } from "./calendar-toolbar.js";
|
|
6
6
|
|
|
7
7
|
describe("CalendarViewSwitch", () => {
|
|
8
|
-
it("offers the whole ladder by default", () => {
|
|
9
|
-
const html = renderToString(
|
|
10
|
-
createElement(CalendarViewSwitch, {
|
|
11
|
-
value: "week",
|
|
12
|
-
onChange: () => undefined,
|
|
13
|
-
}),
|
|
14
|
-
);
|
|
15
|
-
for (const label of ["Year", "Month", "Week", "Day", "Agenda"]) {
|
|
16
|
-
assert.match(html, new RegExp(label));
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
8
|
it("marks the current view", () => {
|
|
21
9
|
const html = renderToString(
|
|
22
10
|
createElement(CalendarViewSwitch, {
|
|
@@ -26,44 +14,4 @@ describe("CalendarViewSwitch", () => {
|
|
|
26
14
|
);
|
|
27
15
|
assert.match(html, /checked="" value="day"/);
|
|
28
16
|
});
|
|
29
|
-
|
|
30
|
-
it("narrows the ladder and shortens the labels for a thumb", () => {
|
|
31
|
-
const html = renderToString(
|
|
32
|
-
createElement(CalendarViewSwitch, {
|
|
33
|
-
value: "day",
|
|
34
|
-
onChange: () => undefined,
|
|
35
|
-
views: ["day", "agenda"],
|
|
36
|
-
touch: true,
|
|
37
|
-
}),
|
|
38
|
-
);
|
|
39
|
-
assert.doesNotMatch(html, /Year/);
|
|
40
|
-
assert.match(html, /min-h-11/);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it("marks the current view flat, without a raised surface", () => {
|
|
44
|
-
const html = renderToString(
|
|
45
|
-
createElement(CalendarViewSwitch, {
|
|
46
|
-
value: "week",
|
|
47
|
-
onChange: () => undefined,
|
|
48
|
-
}),
|
|
49
|
-
);
|
|
50
|
-
assert.match(html, /bg-accent-2-soft/);
|
|
51
|
-
assert.doesNotMatch(html, /shadow-sm/);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
describe("CalendarDateNav", () => {
|
|
56
|
-
it("puts Today beside the range it returns to", () => {
|
|
57
|
-
const html = renderToString(
|
|
58
|
-
createElement(CalendarDateNav, {
|
|
59
|
-
title: "8 – 14 June 2026",
|
|
60
|
-
onPrev: () => undefined,
|
|
61
|
-
onNext: () => undefined,
|
|
62
|
-
onToday: () => undefined,
|
|
63
|
-
}),
|
|
64
|
-
);
|
|
65
|
-
assert.match(html, /Today/);
|
|
66
|
-
assert.match(html, /8 – 14 June 2026/);
|
|
67
|
-
assert.match(html, /aria-label="Previous"/);
|
|
68
|
-
});
|
|
69
17
|
});
|
|
@@ -2,36 +2,13 @@ import assert from "node:assert/strict";
|
|
|
2
2
|
import { describe, it } from "node:test";
|
|
3
3
|
import { createElement } from "react";
|
|
4
4
|
import { renderToString } from "react-dom/server";
|
|
5
|
-
import {
|
|
6
|
-
CATEGORY_PRESENTATION,
|
|
7
|
-
getCategoryLabel,
|
|
8
|
-
} from "../category-presentation.js";
|
|
5
|
+
import { getCategoryLabel } from "../category-presentation.js";
|
|
9
6
|
import { CategoryBadge } from "./category-badge.js";
|
|
10
7
|
|
|
11
8
|
describe("getCategoryLabel", () => {
|
|
12
|
-
it("returns null for undefined (no badge)", () => {
|
|
13
|
-
assert.equal(getCategoryLabel(undefined), null);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
9
|
it("returns null for 'personal' (default fallback, no badge)", () => {
|
|
17
10
|
assert.equal(getCategoryLabel("personal"), null);
|
|
18
11
|
});
|
|
19
|
-
|
|
20
|
-
it("gives every other category the word every surface shows", () => {
|
|
21
|
-
assert.deepEqual(
|
|
22
|
-
CATEGORY_PRESENTATION.filter(
|
|
23
|
-
({ category }) => category !== "personal",
|
|
24
|
-
).map(({ category }) => getCategoryLabel(category)),
|
|
25
|
-
[
|
|
26
|
-
"Unclassified",
|
|
27
|
-
"Transactional",
|
|
28
|
-
"Newsletter",
|
|
29
|
-
"Marketing",
|
|
30
|
-
"Social",
|
|
31
|
-
"Automated",
|
|
32
|
-
],
|
|
33
|
-
);
|
|
34
|
-
});
|
|
35
12
|
});
|
|
36
13
|
|
|
37
14
|
describe("CategoryBadge", () => {
|
|
@@ -41,9 +41,4 @@ describe("ComposeActionBar", () => {
|
|
|
41
41
|
assert.match(html, /aria-busy="true"/);
|
|
42
42
|
assert.doesNotMatch(html, /disabled=""/);
|
|
43
43
|
});
|
|
44
|
-
|
|
45
|
-
it("keeps the Send pill at a fixed min-height so it does not clip", () => {
|
|
46
|
-
const html = renderToString(createElement(ComposeActionBar, baseProps));
|
|
47
|
-
assert.match(html, /min-h-11/);
|
|
48
|
-
});
|
|
49
44
|
});
|
|
@@ -2,7 +2,6 @@ import assert from "node:assert/strict";
|
|
|
2
2
|
import { describe, it } from "node:test";
|
|
3
3
|
import { createElement } from "react";
|
|
4
4
|
import { renderToString } from "react-dom/server";
|
|
5
|
-
import { ComposeActionBar } from "./compose-action-bar.js";
|
|
6
5
|
import {
|
|
7
6
|
type ComposeAttachmentItem,
|
|
8
7
|
ComposeAttachments,
|
|
@@ -28,10 +27,6 @@ const item = (
|
|
|
28
27
|
});
|
|
29
28
|
|
|
30
29
|
describe("ComposeAttachments", () => {
|
|
31
|
-
it("renders nothing for a draft with no files", () => {
|
|
32
|
-
assert.equal(render([]), "");
|
|
33
|
-
});
|
|
34
|
-
|
|
35
30
|
it("names each file and its size, with a labelled control to remove it", () => {
|
|
36
31
|
const html = render([item()]);
|
|
37
32
|
assert.match(html, /report\.pdf/);
|
|
@@ -39,13 +34,6 @@ describe("ComposeAttachments", () => {
|
|
|
39
34
|
assert.match(html, /aria-label="Remove report\.pdf"/);
|
|
40
35
|
});
|
|
41
36
|
|
|
42
|
-
it("says a file is still uploading", () => {
|
|
43
|
-
assert.match(
|
|
44
|
-
render([item({ state: { status: "uploading" } })]),
|
|
45
|
-
/Uploading/,
|
|
46
|
-
);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
37
|
it("states a refusal and offers no retry when the same file would be refused again", () => {
|
|
50
38
|
const html = render([
|
|
51
39
|
item({
|
|
@@ -75,29 +63,3 @@ describe("ComposeAttachments", () => {
|
|
|
75
63
|
assert.match(html, /Try again/);
|
|
76
64
|
});
|
|
77
65
|
});
|
|
78
|
-
|
|
79
|
-
describe("ComposeActionBar attach control", () => {
|
|
80
|
-
const baseProps = {
|
|
81
|
-
send: { status: "ready" } as const,
|
|
82
|
-
onSend: () => undefined,
|
|
83
|
-
onBlocked: () => undefined,
|
|
84
|
-
onDiscard: () => undefined,
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
it("offers a file picker taking several files when the composer can attach", () => {
|
|
88
|
-
const html = renderToString(
|
|
89
|
-
createElement(ComposeActionBar, {
|
|
90
|
-
...baseProps,
|
|
91
|
-
onAttach: () => undefined,
|
|
92
|
-
}),
|
|
93
|
-
);
|
|
94
|
-
assert.match(html, /aria-label="Attach files"/);
|
|
95
|
-
assert.match(html, /type="file"/);
|
|
96
|
-
assert.match(html, /multiple=""/);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it("offers no attach control where the composer cannot attach", () => {
|
|
100
|
-
const html = renderToString(createElement(ComposeActionBar, baseProps));
|
|
101
|
-
assert.doesNotMatch(html, /Attach files/);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
@@ -57,24 +57,11 @@ const render = (overrides: Partial<CalendarEventData>, withThread = true) =>
|
|
|
57
57
|
);
|
|
58
58
|
|
|
59
59
|
describe("EventDetail", () => {
|
|
60
|
-
it("offers the way back to the mail the event came from", () => {
|
|
61
|
-
const html = render({});
|
|
62
|
-
assert.match(html, /From this thread/);
|
|
63
|
-
assert.match(html, /Q3 roadmap review — agenda \+ pre-read/);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
60
|
it("offers no thread link for an event nobody mailed about", () => {
|
|
67
61
|
const html = render({ threadId: "", threadSubject: "" });
|
|
68
62
|
assert.doesNotMatch(html, /From this thread/);
|
|
69
63
|
});
|
|
70
64
|
|
|
71
|
-
it("names the repeat rule on a series instance", () => {
|
|
72
|
-
assert.match(
|
|
73
|
-
render({ recurrenceRule: "Every weekday, 09:15" }),
|
|
74
|
-
/Every weekday, 09:15/,
|
|
75
|
-
);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
65
|
it("marks an instance that no longer matches its series rule", () => {
|
|
79
66
|
const html = render({
|
|
80
67
|
recurrenceRule: "Every weekday, 09:15",
|
|
@@ -98,10 +85,6 @@ describe("EventDetail", () => {
|
|
|
98
85
|
assert.doesNotMatch(html, /Europe\/Amsterdam/);
|
|
99
86
|
});
|
|
100
87
|
|
|
101
|
-
it("names the calendar and its account", () => {
|
|
102
|
-
assert.match(render({}), /Northwind/);
|
|
103
|
-
});
|
|
104
|
-
|
|
105
88
|
it("leaves the guest list inert where a name leads nowhere", () => {
|
|
106
89
|
assert.doesNotMatch(render({}), /aria-expanded/);
|
|
107
90
|
});
|
|
@@ -144,14 +127,4 @@ describe("EventDetail with nowhere to write", () => {
|
|
|
144
127
|
assert.doesNotMatch(readOnly, />Edit</);
|
|
145
128
|
assert.doesNotMatch(readOnly, />Delete</);
|
|
146
129
|
});
|
|
147
|
-
|
|
148
|
-
it("still names the event, its calendar and when it is", () => {
|
|
149
|
-
assert.match(readOnly, /Q3 roadmap review/);
|
|
150
|
-
assert.match(readOnly, /Northwind/);
|
|
151
|
-
assert.match(readOnly, /10:00 – 11:30/);
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
it("keeps the way out of the pane", () => {
|
|
155
|
-
assert.match(readOnly, /aria-label="Close event"/);
|
|
156
|
-
});
|
|
157
130
|
});
|
|
@@ -110,10 +110,6 @@ describe("EventEditor", () => {
|
|
|
110
110
|
assert.match(render({ onDelete: () => undefined }), /Delete/);
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
it("names the save action the caller asked for", () => {
|
|
114
|
-
assert.match(render({ saveLabel: "Save changes" }), /Save changes/);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
113
|
it("says so and holds the save when the end is before the start", () => {
|
|
118
114
|
const dom = parse({
|
|
119
115
|
draft: { ...draft, startTime: "23:00", endTime: "01:00" },
|
|
@@ -37,71 +37,10 @@ const render = (overrides: Partial<EventSuggestion>, zoneChoice?: string) =>
|
|
|
37
37
|
}),
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
const twoClocks: Partial<EventSuggestion> = {
|
|
41
|
-
zoneOptions: [
|
|
42
|
-
{
|
|
43
|
-
timeZone: "Europe/Lisbon",
|
|
44
|
-
label: "16:00 in Lisbon",
|
|
45
|
-
note: "17:00 on your own clock.",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
timeZone: "Europe/Amsterdam",
|
|
49
|
-
label: "16:00 in Amsterdam",
|
|
50
|
-
note: "15:00 where she is.",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
};
|
|
54
|
-
|
|
55
40
|
describe("EventSuggestionCard", () => {
|
|
56
|
-
it("says it is a suggestion and not an event", () => {
|
|
57
|
-
const html = render({});
|
|
58
|
-
assert.match(html, /Suggested from mail/);
|
|
59
|
-
assert.match(html, /border-dashed/);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
41
|
it("puts the reading into words rather than a percentage", () => {
|
|
63
42
|
assert.match(render({}), /Read cleanly/);
|
|
64
43
|
assert.match(render({ confidence: 0.7 }), /Read with gaps/);
|
|
65
44
|
assert.match(render({ confidence: 0.2 }), /Barely read/);
|
|
66
45
|
});
|
|
67
|
-
|
|
68
|
-
it("names what it could not settle", () => {
|
|
69
|
-
assert.match(
|
|
70
|
-
render({ ambiguity: "Two Tuesdays fit." }),
|
|
71
|
-
/Two Tuesdays fit\./,
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it("credits the mail it was read out of", () => {
|
|
76
|
-
assert.match(render({}), /Airbnb/);
|
|
77
|
-
assert.match(render({}), /Your reservation in Lisbon is confirmed/);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it("needs a person to press Add", () => {
|
|
81
|
-
assert.match(render({}), />Add</);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
it("asks nothing about the clock when the mail stated one", () => {
|
|
85
|
-
const html = render({});
|
|
86
|
-
assert.doesNotMatch(html, /Which clock is this on\?/);
|
|
87
|
-
assert.doesNotMatch(html, /Pick a clock first/);
|
|
88
|
-
assert.doesNotMatch(html, /aria-describedby/);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it("offers the clocks and dims Add while none is picked", () => {
|
|
92
|
-
const html = render(twoClocks);
|
|
93
|
-
assert.match(html, /Which clock is this on\?/);
|
|
94
|
-
assert.match(html, /16:00 in Lisbon/);
|
|
95
|
-
assert.match(html, /Pick a clock first/);
|
|
96
|
-
assert.match(html, /aria-describedby/);
|
|
97
|
-
assert.match(html, /opacity-55/);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it("undims Add once one of the clocks is picked", () => {
|
|
101
|
-
const html = render(twoClocks, "Europe/Lisbon");
|
|
102
|
-
assert.match(html, /aria-pressed="true"/);
|
|
103
|
-
assert.doesNotMatch(html, /Pick a clock first/);
|
|
104
|
-
assert.doesNotMatch(html, /aria-describedby/);
|
|
105
|
-
assert.doesNotMatch(html, /opacity-55/);
|
|
106
|
-
});
|
|
107
46
|
});
|
|
@@ -13,7 +13,7 @@ import { after, afterEach, before, beforeEach, describe, it } from "node:test";
|
|
|
13
13
|
import type { JSDOM } from "jsdom";
|
|
14
14
|
import { act, createElement } from "react";
|
|
15
15
|
import { createRoot, type Root } from "react-dom/client";
|
|
16
|
-
import type { EventSuggestion
|
|
16
|
+
import type { EventSuggestion } from "./calendar-types.js";
|
|
17
17
|
import {
|
|
18
18
|
EventSuggestionCard,
|
|
19
19
|
settleZone,
|
|
@@ -240,12 +240,6 @@ describe("the same gate on Change first", () => {
|
|
|
240
240
|
});
|
|
241
241
|
|
|
242
242
|
describe("the clocks a suggestion offers", () => {
|
|
243
|
-
it("cannot be an empty list, which would ask with nothing to press", () => {
|
|
244
|
-
// @ts-expect-error
|
|
245
|
-
const none: ZoneOptions = [];
|
|
246
|
-
assert.equal(none.length, 0);
|
|
247
|
-
});
|
|
248
|
-
|
|
249
243
|
it("never asks the question without a clock to answer it with", () => {
|
|
250
244
|
mount(zoneless);
|
|
251
245
|
assert.ok(container.textContent?.includes("Which clock is this on?"));
|