@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
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
type QuarantineEntry,
|
|
8
8
|
quarantineIssueTitle,
|
|
9
9
|
quarantineReportSections,
|
|
10
|
-
quarantineSummary,
|
|
11
10
|
} from "./quarantine-report.js";
|
|
12
11
|
|
|
13
12
|
const entry: QuarantineEntry = {
|
|
@@ -191,10 +190,3 @@ describe("quarantineIssueTitle", () => {
|
|
|
191
190
|
assert.doesNotMatch(title, /joan@/);
|
|
192
191
|
});
|
|
193
192
|
});
|
|
194
|
-
|
|
195
|
-
describe("quarantineSummary", () => {
|
|
196
|
-
it("explains the stage without parser jargon", () => {
|
|
197
|
-
const summary = quarantineSummary("BodyParse");
|
|
198
|
-
assert.doesNotMatch(summary, /MIME|RFC|mailparser|charset=/i);
|
|
199
|
-
});
|
|
200
|
-
});
|
|
@@ -2,9 +2,12 @@ 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 { MessageReportDialog } from "./message-report-dialog.js";
|
|
6
6
|
import { quarantineDemoEntries } from "./quarantine-fixtures.js";
|
|
7
|
-
import
|
|
7
|
+
import {
|
|
8
|
+
formatQuarantineReport,
|
|
9
|
+
type QuarantineEntry,
|
|
10
|
+
} from "./quarantine-report.js";
|
|
8
11
|
import { QuarantineSection } from "./quarantine-section.js";
|
|
9
12
|
|
|
10
13
|
const noop = () => {};
|
|
@@ -64,25 +67,25 @@ describe("QuarantineSection", () => {
|
|
|
64
67
|
});
|
|
65
68
|
});
|
|
66
69
|
|
|
67
|
-
describe("
|
|
70
|
+
describe("MessageReportDialog", () => {
|
|
68
71
|
it("shows the whole report before anything is filed", () => {
|
|
69
72
|
const html = renderToString(
|
|
70
|
-
createElement(
|
|
71
|
-
|
|
73
|
+
createElement(MessageReportDialog, {
|
|
74
|
+
report: formatQuarantineReport(base),
|
|
72
75
|
onClose: noop,
|
|
73
76
|
onCopy: noop,
|
|
74
77
|
issueUrl: ISSUE_URL,
|
|
75
78
|
}),
|
|
76
79
|
);
|
|
77
80
|
assert.match(html, /UnreadableBody/);
|
|
78
|
-
assert.match(html, /
|
|
81
|
+
assert.match(html, /folder name, or the parser's own error text/);
|
|
79
82
|
assert.match(html, /Copy report/);
|
|
80
83
|
});
|
|
81
84
|
|
|
82
85
|
it("never renders the parser's own error text into the report", () => {
|
|
83
86
|
const html = renderToString(
|
|
84
|
-
createElement(
|
|
85
|
-
|
|
87
|
+
createElement(MessageReportDialog, {
|
|
88
|
+
report: formatQuarantineReport(base),
|
|
86
89
|
onClose: noop,
|
|
87
90
|
onCopy: noop,
|
|
88
91
|
issueUrl: ISSUE_URL,
|
|
@@ -95,8 +98,8 @@ describe("QuarantineBugDialog", () => {
|
|
|
95
98
|
|
|
96
99
|
it("files through the supplied url with hardened external rel", () => {
|
|
97
100
|
const html = renderToString(
|
|
98
|
-
createElement(
|
|
99
|
-
|
|
101
|
+
createElement(MessageReportDialog, {
|
|
102
|
+
report: formatQuarantineReport(base),
|
|
100
103
|
onClose: noop,
|
|
101
104
|
onCopy: noop,
|
|
102
105
|
issueUrl: ISSUE_URL,
|
|
@@ -106,10 +109,10 @@ describe("QuarantineBugDialog", () => {
|
|
|
106
109
|
assert.match(html, /focus-visible:ring-2/);
|
|
107
110
|
});
|
|
108
111
|
|
|
109
|
-
it("renders nothing without
|
|
112
|
+
it("renders nothing without a report", () => {
|
|
110
113
|
const html = renderToString(
|
|
111
|
-
createElement(
|
|
112
|
-
|
|
114
|
+
createElement(MessageReportDialog, {
|
|
115
|
+
report: null,
|
|
113
116
|
onClose: noop,
|
|
114
117
|
onCopy: noop,
|
|
115
118
|
issueUrl: ISSUE_URL,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { MessageReportDialog } from "./message-report-dialog.js";
|
|
4
4
|
import { quarantineDemoEntries } from "./quarantine-fixtures.js";
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
|
+
formatQuarantineReport,
|
|
7
|
+
type QuarantineEntry,
|
|
8
|
+
} from "./quarantine-report.js";
|
|
6
9
|
import { QuarantineSection } from "./quarantine-section.js";
|
|
7
10
|
|
|
8
11
|
const [unterminatedBoundary, unknownCharset, truncatedBody, shapeUnread] =
|
|
@@ -51,8 +54,8 @@ export const CutABugFlow: Story = {
|
|
|
51
54
|
<>
|
|
52
55
|
<QuarantineSection entries={quarantineDemoEntries} onCutBug={setOpen} />
|
|
53
56
|
{copied && <p className="mt-3 text-xs text-positive">Report copied.</p>}
|
|
54
|
-
<
|
|
55
|
-
|
|
57
|
+
<MessageReportDialog
|
|
58
|
+
report={open ? formatQuarantineReport(open) : null}
|
|
56
59
|
issueUrl={demoIssueUrl}
|
|
57
60
|
onClose={() => setOpen(null)}
|
|
58
61
|
onCopy={() => setCopied(true)}
|
|
@@ -69,8 +72,8 @@ export const CutABugFlow: Story = {
|
|
|
69
72
|
*/
|
|
70
73
|
export const BugReportWithoutMessageShape: Story = {
|
|
71
74
|
render: () => (
|
|
72
|
-
<
|
|
73
|
-
|
|
75
|
+
<MessageReportDialog
|
|
76
|
+
report={formatQuarantineReport(shapeUnread)}
|
|
74
77
|
issueUrl={demoIssueUrl}
|
|
75
78
|
onClose={() => {}}
|
|
76
79
|
onCopy={() => {}}
|
|
@@ -80,8 +83,8 @@ export const BugReportWithoutMessageShape: Story = {
|
|
|
80
83
|
|
|
81
84
|
export const BugReport: Story = {
|
|
82
85
|
render: () => (
|
|
83
|
-
<
|
|
84
|
-
|
|
86
|
+
<MessageReportDialog
|
|
87
|
+
report={formatQuarantineReport(unterminatedBoundary)}
|
|
85
88
|
issueUrl={demoIssueUrl}
|
|
86
89
|
onClose={() => {}}
|
|
87
90
|
onCopy={() => {}}
|
|
@@ -2,12 +2,8 @@ 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 {
|
|
6
|
-
import {
|
|
7
|
-
CollapsedMessage,
|
|
8
|
-
ExpandedMessage,
|
|
9
|
-
ReadingPane,
|
|
10
|
-
} from "./reading-pane.js";
|
|
5
|
+
import type { ThreadMessageData } from "./app-shell-types.js";
|
|
6
|
+
import { CollapsedMessage } from "./reading-pane.js";
|
|
11
7
|
|
|
12
8
|
const message: ThreadMessageData = {
|
|
13
9
|
id: "m-1",
|
|
@@ -19,73 +15,6 @@ const message: ThreadMessageData = {
|
|
|
19
15
|
bodyHtml: "<p>body</p>",
|
|
20
16
|
};
|
|
21
17
|
|
|
22
|
-
const thread: ThreadData = {
|
|
23
|
-
subject: "Q3 planning notes",
|
|
24
|
-
messages: [
|
|
25
|
-
{
|
|
26
|
-
id: "msg-1",
|
|
27
|
-
fromName: "Alex Rivera",
|
|
28
|
-
fromEmail: "alex@example.com",
|
|
29
|
-
toLabel: "you",
|
|
30
|
-
dateLabel: "Today, 09:11",
|
|
31
|
-
snippet: "Here's where we landed after the call.",
|
|
32
|
-
bodyHtml: "<p>The roadmap stands and the budget is locked.</p>",
|
|
33
|
-
expanded: true,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
describe("ReadingPane", () => {
|
|
39
|
-
it("renders the subject and the expanded message header with a thread", () => {
|
|
40
|
-
const html = renderToString(createElement(ReadingPane, { thread }));
|
|
41
|
-
assert.match(html, /Q3 planning notes/);
|
|
42
|
-
// The email body now renders through the kit's sanitize → sandboxed
|
|
43
|
-
// IsolatedEmailFrame pipeline (#940), which needs a DOM and so emits no
|
|
44
|
-
// body text under SSR. Assert the expanded message's sender header
|
|
45
|
-
// instead; body rendering is covered by the sanitizer + MessageBodyView
|
|
46
|
-
// tests.
|
|
47
|
-
assert.match(html, /Alex Rivera/);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it("renders the empty state with no thread", () => {
|
|
51
|
-
const html = renderToString(createElement(ReadingPane, {}));
|
|
52
|
-
assert.doesNotMatch(html, /Q3 planning notes/);
|
|
53
|
-
assert.match(html, /Select a thread to read/);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("renders the message verbs and no search field — search is the app top bar's", () => {
|
|
57
|
-
const html = renderToString(createElement(ReadingPane, { thread }));
|
|
58
|
-
assert.match(html, /title="Reply \(r\)"/);
|
|
59
|
-
assert.doesNotMatch(html, /Search mail/);
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
describe("CollapsedMessage row slots (#945)", () => {
|
|
64
|
-
it("renders the fixture date label when no trailing slot is given", () => {
|
|
65
|
-
const html = renderToString(createElement(CollapsedMessage, { message }));
|
|
66
|
-
assert.match(html, /Today, 09:11/);
|
|
67
|
-
assert.match(html, /Jamie Chen/);
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it("renders the app's trailing cluster instead of the date label", () => {
|
|
71
|
-
const html = renderToString(
|
|
72
|
-
createElement(CollapsedMessage, {
|
|
73
|
-
message,
|
|
74
|
-
trailing: createElement("span", null, "STAR-DATE-SLOT"),
|
|
75
|
-
}),
|
|
76
|
-
);
|
|
77
|
-
assert.match(html, /STAR-DATE-SLOT/);
|
|
78
|
-
assert.doesNotMatch(html, /Today, 09:11/);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it("shows the unread dot and bolds the sender when isUnread", () => {
|
|
82
|
-
const html = renderToString(
|
|
83
|
-
createElement(CollapsedMessage, { message, isUnread: true }),
|
|
84
|
-
);
|
|
85
|
-
assert.match(html, /font-semibold/);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
|
|
89
18
|
describe("CollapsedMessage nested-button fix (#1232)", () => {
|
|
90
19
|
it("renders the clickable row as a role=button div so a trailing button doesn't nest inside a button", () => {
|
|
91
20
|
const html = renderToString(
|
|
@@ -114,36 +43,3 @@ describe("CollapsedMessage nested-button fix (#1232)", () => {
|
|
|
114
43
|
assert.doesNotMatch(html, /tabindex=/);
|
|
115
44
|
});
|
|
116
45
|
});
|
|
117
|
-
|
|
118
|
-
describe("ExpandedMessage row slots (#945)", () => {
|
|
119
|
-
it("injects the app body slot instead of the fixture MessageBodyView", () => {
|
|
120
|
-
const html = renderToString(
|
|
121
|
-
createElement(ExpandedMessage, {
|
|
122
|
-
message,
|
|
123
|
-
body: createElement("div", null, "REAL-MESSAGE-BODY"),
|
|
124
|
-
}),
|
|
125
|
-
);
|
|
126
|
-
assert.match(html, /REAL-MESSAGE-BODY/);
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
it("renders the sender badge, action menu and recipient slots", () => {
|
|
130
|
-
const html = renderToString(
|
|
131
|
-
createElement(ExpandedMessage, {
|
|
132
|
-
message,
|
|
133
|
-
senderBadge: createElement("span", null, "BADGE"),
|
|
134
|
-
actionMenu: createElement("span", null, "ACTION-MENU"),
|
|
135
|
-
to: createElement("span", null, "TO-LINE"),
|
|
136
|
-
}),
|
|
137
|
-
);
|
|
138
|
-
assert.match(html, /BADGE/);
|
|
139
|
-
assert.match(html, /ACTION-MENU/);
|
|
140
|
-
assert.match(html, /TO-LINE/);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
it("hides the recipient line when `to` is null", () => {
|
|
144
|
-
const html = renderToString(
|
|
145
|
-
createElement(ExpandedMessage, { message, to: null }),
|
|
146
|
-
);
|
|
147
|
-
assert.doesNotMatch(html, /to Alex Rivera/);
|
|
148
|
-
});
|
|
149
|
-
});
|
|
@@ -284,6 +284,7 @@ const ThreadAttachments = () => {
|
|
|
284
284
|
const [rows, setRows] = useState<AttachmentItem[]>([
|
|
285
285
|
{
|
|
286
286
|
attachmentId: "part-2",
|
|
287
|
+
kind: "file",
|
|
287
288
|
filename: "Q3 board pack.pdf",
|
|
288
289
|
typeLabel: "PDF",
|
|
289
290
|
sizeOctets: 2_411_724,
|
|
@@ -291,6 +292,7 @@ const ThreadAttachments = () => {
|
|
|
291
292
|
},
|
|
292
293
|
{
|
|
293
294
|
attachmentId: "part-3",
|
|
295
|
+
kind: "file",
|
|
294
296
|
filename: "headcount.csv",
|
|
295
297
|
typeLabel: "CSV",
|
|
296
298
|
sizeOctets: 4_180,
|
|
@@ -309,6 +311,7 @@ const ThreadAttachments = () => {
|
|
|
309
311
|
<AttachmentList
|
|
310
312
|
className="mt-4"
|
|
311
313
|
attachments={rows}
|
|
314
|
+
onToggleOpen={() => {}}
|
|
312
315
|
onDownload={(attachmentId) => {
|
|
313
316
|
setStatus(attachmentId, { status: "downloading" });
|
|
314
317
|
setTimeout(() => setStatus(attachmentId, { status: "idle" }), 900);
|
|
@@ -42,15 +42,6 @@ describe("RefreshButton", () => {
|
|
|
42
42
|
assert.match(html, /aria-label="Refresh inbox — refreshing"/);
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
it("shows a quiet dot for new mail only at rest", () => {
|
|
46
|
-
const idle = render({ hasUpdate: true });
|
|
47
|
-
assert.match(idle, /aria-label="Refresh inbox — new mail"/);
|
|
48
|
-
assert.match(idle, /bg-accent-2/);
|
|
49
|
-
|
|
50
|
-
const refreshing = render({ state: "refreshing", hasUpdate: true });
|
|
51
|
-
assert.doesNotMatch(refreshing, /bg-accent-2/);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
45
|
it("confirms success without claiming a failure", () => {
|
|
55
46
|
const html = render({ state: "success" });
|
|
56
47
|
assert.equal(stateOf(html), "success");
|
|
@@ -52,31 +52,11 @@ const renderFlow = (open: boolean): string =>
|
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
describe("RescueFromSpamFlow", () => {
|
|
55
|
-
it("opens on the review step listing every candidate", () => {
|
|
56
|
-
const html = renderFlow(true);
|
|
57
|
-
assert.match(html, /Rescue from Spam/);
|
|
58
|
-
assert.match(html, /Anna de Vries/);
|
|
59
|
-
assert.match(html, /Mum/);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
55
|
it("pre-selects all candidates and shows the live count", () => {
|
|
63
56
|
const html = renderFlow(true);
|
|
64
57
|
assert.match(html, /2 of 2 selected/);
|
|
65
58
|
assert.match(html, /Continue with 2 messages/);
|
|
66
59
|
});
|
|
67
|
-
|
|
68
|
-
it("offers select-all / none and a way back", () => {
|
|
69
|
-
const html = renderFlow(true);
|
|
70
|
-
assert.match(html, /Select all/);
|
|
71
|
-
assert.match(html, /Select none/);
|
|
72
|
-
assert.match(html, /Cancel/);
|
|
73
|
-
assert.match(html, /Why these\?/);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it("never leaks authentication jargon", () => {
|
|
77
|
-
const html = renderFlow(true);
|
|
78
|
-
assert.doesNotMatch(html, /DKIM|SPF|DMARC|spam score|predicate/i);
|
|
79
|
-
});
|
|
80
60
|
});
|
|
81
61
|
|
|
82
62
|
describe("rescueMoveConsequence", () => {
|
|
@@ -93,8 +73,4 @@ describe("rescueMoveConsequence", () => {
|
|
|
93
73
|
"Moves this message out of Spam to Family now. Nothing later.",
|
|
94
74
|
);
|
|
95
75
|
});
|
|
96
|
-
|
|
97
|
-
it("always promises nothing ongoing", () => {
|
|
98
|
-
assert.match(rescueMoveConsequence(9, "Inbox"), /Nothing later\.$/);
|
|
99
|
-
});
|
|
100
76
|
});
|
|
@@ -76,25 +76,6 @@ describe("RichTextEditor", () => {
|
|
|
76
76
|
assert.match(latest.text, /## Quarterly numbers/);
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
it("offers the formatting controls the composer ships with", async () => {
|
|
80
|
-
await act(async () => {
|
|
81
|
-
root = createRoot(container);
|
|
82
|
-
root.render(createElement(RichTextEditor, {}));
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
const labels = [...container.querySelectorAll("button")].map((button) =>
|
|
86
|
-
button.getAttribute("aria-label"),
|
|
87
|
-
);
|
|
88
|
-
assert.deepEqual(labels, [
|
|
89
|
-
"Bold (Ctrl+B)",
|
|
90
|
-
"Italic (Ctrl+I)",
|
|
91
|
-
"Link (Ctrl+K)",
|
|
92
|
-
"Blockquote",
|
|
93
|
-
"Undo (Ctrl+Z)",
|
|
94
|
-
"Redo (Ctrl+Y)",
|
|
95
|
-
]);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
79
|
it("asks for an address rather than inserting an empty link", async () => {
|
|
99
80
|
await act(async () => {
|
|
100
81
|
root = createRoot(container);
|
|
@@ -32,7 +32,7 @@ export class ImageNode extends DecoratorNode<null> {
|
|
|
32
32
|
/** @internal */
|
|
33
33
|
__preview = "";
|
|
34
34
|
|
|
35
|
-
$config() {
|
|
35
|
+
override $config() {
|
|
36
36
|
return this.config("image", {
|
|
37
37
|
importDOM: {
|
|
38
38
|
img: () => ({ conversion: $convertImageElement, priority: 0 }),
|
|
@@ -46,20 +46,20 @@ export class ImageNode extends DecoratorNode<null> {
|
|
|
46
46
|
this.__alt = alt;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
afterCloneFrom(prevNode: this): void {
|
|
49
|
+
override afterCloneFrom(prevNode: this): void {
|
|
50
50
|
super.afterCloneFrom(prevNode);
|
|
51
51
|
this.__src = prevNode.__src;
|
|
52
52
|
this.__alt = prevNode.__alt;
|
|
53
53
|
this.__preview = prevNode.__preview;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
createDOM(config: EditorConfig): HTMLImageElement {
|
|
56
|
+
override createDOM(config: EditorConfig): HTMLImageElement {
|
|
57
57
|
const element = this.buildImage(this.__preview || this.__src);
|
|
58
58
|
addClassNamesToElement(element, config.theme.image);
|
|
59
59
|
return element;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
updateDOM(prevNode: this, element: HTMLImageElement): boolean {
|
|
62
|
+
override updateDOM(prevNode: this, element: HTMLImageElement): boolean {
|
|
63
63
|
const shown = this.__preview || this.__src;
|
|
64
64
|
if ((prevNode.__preview || prevNode.__src) !== shown)
|
|
65
65
|
element.setAttribute("src", shown);
|
|
@@ -67,15 +67,17 @@ export class ImageNode extends DecoratorNode<null> {
|
|
|
67
67
|
return false;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
exportDOM(): DOMExportOutput {
|
|
70
|
+
override exportDOM(): DOMExportOutput {
|
|
71
71
|
return { element: this.buildImage(this.__src) };
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
exportJSON(): SerializedImageNode {
|
|
74
|
+
override exportJSON(): SerializedImageNode {
|
|
75
75
|
return { ...super.exportJSON(), alt: this.getAlt(), src: this.getSrc() };
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
updateFromJSON(
|
|
78
|
+
override updateFromJSON(
|
|
79
|
+
serializedNode: LexicalUpdateJSON<SerializedImageNode>,
|
|
80
|
+
): this {
|
|
79
81
|
return super
|
|
80
82
|
.updateFromJSON(serializedNode)
|
|
81
83
|
.setSrc(serializedNode.src)
|
|
@@ -113,11 +115,11 @@ export class ImageNode extends DecoratorNode<null> {
|
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
/** The text alternative is what a plain-text reader is left with. */
|
|
116
|
-
getTextContent(): string {
|
|
118
|
+
override getTextContent(): string {
|
|
117
119
|
return this.getAlt();
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
isInline(): true {
|
|
122
|
+
override isInline(): true {
|
|
121
123
|
return true;
|
|
122
124
|
}
|
|
123
125
|
|
|
@@ -74,39 +74,6 @@ function clearingOptions(markup: string): string[] {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
describe("RoleAppointmentList", () => {
|
|
77
|
-
it("titles the section with the account email", () => {
|
|
78
|
-
const html = render({ inbox: appointed("mb-inbox") });
|
|
79
|
-
assert.match(html, /Folder roles —/);
|
|
80
|
-
assert.match(html, /you@example.com/);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it("renders a row for every appointable role", () => {
|
|
84
|
-
const html = render({});
|
|
85
|
-
for (const label of [
|
|
86
|
-
"Inbox",
|
|
87
|
-
"Drafts",
|
|
88
|
-
"Sent",
|
|
89
|
-
"Archive",
|
|
90
|
-
"Spam",
|
|
91
|
-
"Trash",
|
|
92
|
-
]) {
|
|
93
|
-
assert.match(html, new RegExp(`Folder for ${label}`));
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it("offers every folder with its message count as a picker option", () => {
|
|
98
|
-
const html = render({});
|
|
99
|
-
assert.match(html, /Concepten · 340 msgs/);
|
|
100
|
-
assert.match(html, /Drafts · 0 msgs/);
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
it("shows the appointed folder's path and count under the role", () => {
|
|
104
|
-
const html = render({ drafts: appointed("mb-concepten") });
|
|
105
|
-
assert.match(html, /title="INBOX\/Concepten"/);
|
|
106
|
-
assert.match(html, /340/);
|
|
107
|
-
assert.match(html, /messages/);
|
|
108
|
-
});
|
|
109
|
-
|
|
110
77
|
it("renders a rename field only for an appointed role", () => {
|
|
111
78
|
const html = render({ drafts: appointed("mb-concepten") });
|
|
112
79
|
assert.match(html, /Display name for Drafts/);
|
|
@@ -202,14 +169,6 @@ describe("RoleAppointmentList", () => {
|
|
|
202
169
|
assert.doesNotMatch(html, /Deleting mail is stopped/);
|
|
203
170
|
});
|
|
204
171
|
|
|
205
|
-
it("drops the name clause when no path was ever recorded", () => {
|
|
206
|
-
const html = render({ trash: { mailboxId: null, source: "Stale" } });
|
|
207
|
-
assert.match(
|
|
208
|
-
html,
|
|
209
|
-
/The folder you chose for Trash is gone from the mail server\./,
|
|
210
|
-
);
|
|
211
|
-
});
|
|
212
|
-
|
|
213
172
|
it("says nothing about a fallback it cannot name", () => {
|
|
214
173
|
const html = render({
|
|
215
174
|
drafts: {
|
|
@@ -328,12 +287,4 @@ describe("a canonical role cannot be unset (#873)", () => {
|
|
|
328
287
|
);
|
|
329
288
|
assert.match(archive, /<option[^>]*disabled[^>]*>Choose a folder</);
|
|
330
289
|
});
|
|
331
|
-
|
|
332
|
-
it("drops the placeholder once a folder fills the role", () => {
|
|
333
|
-
const drafts = picker(
|
|
334
|
-
render({ drafts: appointed("mb-concepten") }),
|
|
335
|
-
"Drafts",
|
|
336
|
-
);
|
|
337
|
-
assert.doesNotMatch(drafts, /Choose a folder/);
|
|
338
|
-
});
|
|
339
290
|
});
|
|
@@ -52,23 +52,6 @@ const render = (props: Partial<RoleAppointmentPromptProps>) =>
|
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
describe("roleAppointmentPromptCopy", () => {
|
|
55
|
-
it("says nothing was deleted, and what reader files deletes in", () => {
|
|
56
|
-
const copy = roleAppointmentPromptCopy("none", {
|
|
57
|
-
kind: "delete",
|
|
58
|
-
count: 12,
|
|
59
|
-
});
|
|
60
|
-
assert.equal(copy.title, "No folder is set as Trash");
|
|
61
|
-
assert.equal(
|
|
62
|
-
copy.description,
|
|
63
|
-
"Nothing has been deleted. reader files deleted mail in the folder you set as Trash, and this account has none.",
|
|
64
|
-
);
|
|
65
|
-
assert.equal(
|
|
66
|
-
copy.pickerPrompt,
|
|
67
|
-
"Which folder does this account use for deleted mail?",
|
|
68
|
-
);
|
|
69
|
-
assert.equal(copy.confirmLabel, "Set as Trash and delete 12 messages");
|
|
70
|
-
});
|
|
71
|
-
|
|
72
55
|
it("counts one message as one message", () => {
|
|
73
56
|
const copy = roleAppointmentPromptCopy("none", {
|
|
74
57
|
kind: "delete",
|
|
@@ -98,17 +81,6 @@ describe("roleAppointmentPromptCopy", () => {
|
|
|
98
81
|
assert.equal(copy.pickerPrompt, "Which folder should reader use instead?");
|
|
99
82
|
});
|
|
100
83
|
|
|
101
|
-
it("degrades the stale wording when no path was ever recorded", () => {
|
|
102
|
-
const copy = roleAppointmentPromptCopy("stale", {
|
|
103
|
-
kind: "delete",
|
|
104
|
-
count: 3,
|
|
105
|
-
});
|
|
106
|
-
assert.equal(
|
|
107
|
-
copy.description,
|
|
108
|
-
"Nothing has been deleted. The folder you set as this account's Trash is no longer on the mail server — another mail app may have renamed or removed it.",
|
|
109
|
-
);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
84
|
it("names the guess and the irreversibility when confirming a guess", () => {
|
|
113
85
|
const copy = roleAppointmentPromptCopy(
|
|
114
86
|
"unconfirmed",
|
|
@@ -127,15 +99,6 @@ describe("roleAppointmentPromptCopy", () => {
|
|
|
127
99
|
assert.equal(copy.confirmLabel, "Set as Trash and empty 512 messages");
|
|
128
100
|
});
|
|
129
101
|
|
|
130
|
-
it("falls back to an uncounted confirm when the count is unknown", () => {
|
|
131
|
-
const copy = roleAppointmentPromptCopy(
|
|
132
|
-
"unconfirmed",
|
|
133
|
-
{ kind: "emptyTrash" },
|
|
134
|
-
{ trashFolderLabel: "Deleted Messages" },
|
|
135
|
-
);
|
|
136
|
-
assert.equal(copy.confirmLabel, "Set as Trash and empty it");
|
|
137
|
-
});
|
|
138
|
-
|
|
139
102
|
it("words the irreversibility as a delete of these rows, not a folder emptying (#876)", () => {
|
|
140
103
|
const copy = roleAppointmentPromptCopy(
|
|
141
104
|
"unconfirmed",
|
|
@@ -151,10 +114,6 @@ describe("roleAppointmentPromptCopy", () => {
|
|
|
151
114
|
});
|
|
152
115
|
|
|
153
116
|
describe("RoleAppointmentPrompt", () => {
|
|
154
|
-
it("renders nothing while closed", () => {
|
|
155
|
-
assert.equal(render({ open: false }), "");
|
|
156
|
-
});
|
|
157
|
-
|
|
158
117
|
it("offers a way out that changes nothing, and no confirm until one is picked", () => {
|
|
159
118
|
const html = render({});
|
|
160
119
|
assert.match(html, />Cancel</);
|
|
@@ -176,14 +135,6 @@ describe("RoleAppointmentPrompt", () => {
|
|
|
176
135
|
assert.match(html, /aria-label="Folders on this account"/);
|
|
177
136
|
});
|
|
178
137
|
|
|
179
|
-
it("names the account only where there is more than one", () => {
|
|
180
|
-
assert.match(
|
|
181
|
-
render({ accountEmail: "you@example.com" }),
|
|
182
|
-
/you@example.com/,
|
|
183
|
-
);
|
|
184
|
-
assert.doesNotMatch(render({}), /you@example\.com/);
|
|
185
|
-
});
|
|
186
|
-
|
|
187
138
|
it("offers a new folder only where the account has no Trash at all", () => {
|
|
188
139
|
const create = async (): Promise<FolderTreeNode> => ({
|
|
189
140
|
id: "mb-new",
|
|
@@ -201,14 +152,6 @@ describe("RoleAppointmentPrompt", () => {
|
|
|
201
152
|
);
|
|
202
153
|
});
|
|
203
154
|
|
|
204
|
-
it("warns in the tone of the pending action, not of the reason", () => {
|
|
205
|
-
assert.match(render({ reason: "none" }), /text-warning/);
|
|
206
|
-
assert.match(
|
|
207
|
-
render({ reason: "unconfirmed", action: { kind: "emptyTrash" } }),
|
|
208
|
-
/text-danger/,
|
|
209
|
-
);
|
|
210
|
-
});
|
|
211
|
-
|
|
212
155
|
it("replaces the body with the in-flight write, and takes the way out away", () => {
|
|
213
156
|
const html = render({
|
|
214
157
|
selectedId: "mb-prullenbak",
|
|
@@ -255,17 +198,6 @@ describe("RoleAppointmentPrompt", () => {
|
|
|
255
198
|
);
|
|
256
199
|
});
|
|
257
200
|
|
|
258
|
-
it("marks the confirm that erases in place as the destructive one", () => {
|
|
259
|
-
assert.match(
|
|
260
|
-
render({ ...refusedInPlace, selectedId: "mb-deleted" }),
|
|
261
|
-
/text-danger/,
|
|
262
|
-
);
|
|
263
|
-
assert.match(
|
|
264
|
-
render({ ...refusedInPlace, selectedId: "mb-prullenbak" }),
|
|
265
|
-
/text-warning/,
|
|
266
|
-
);
|
|
267
|
-
});
|
|
268
|
-
|
|
269
201
|
it("keeps the picker and the selection through a failed appointment", () => {
|
|
270
202
|
const html = render({
|
|
271
203
|
selectedId: "mb-prullenbak",
|
|
@@ -278,15 +210,4 @@ describe("RoleAppointmentPrompt", () => {
|
|
|
278
210
|
assert.match(html, /Set as Trash and delete 12 messages/);
|
|
279
211
|
assert.match(html, /role="alert"/);
|
|
280
212
|
});
|
|
281
|
-
|
|
282
|
-
it("words an unsettled mailbox as a wait, not a failure to retry blindly", () => {
|
|
283
|
-
const html = render({
|
|
284
|
-
selectedId: "mb-prullenbak",
|
|
285
|
-
phase: { kind: "appoint-failed", cause: "mailbox-pending" },
|
|
286
|
-
});
|
|
287
|
-
assert.match(
|
|
288
|
-
html,
|
|
289
|
-
/Prullenbak is still being created on the mail server\. Wait for it to finish, then try again\./,
|
|
290
|
-
);
|
|
291
|
-
});
|
|
292
213
|
});
|
|
@@ -5,40 +5,6 @@ import { renderToString } from "react-dom/server";
|
|
|
5
5
|
import { RowActions } from "./row-actions.js";
|
|
6
6
|
|
|
7
7
|
describe("RowActions", () => {
|
|
8
|
-
it("renders secondary actions as buttons, never disabled", () => {
|
|
9
|
-
const html = renderToString(
|
|
10
|
-
createElement(RowActions, {
|
|
11
|
-
actions: [
|
|
12
|
-
{ label: "Manage", onClick: () => undefined },
|
|
13
|
-
{
|
|
14
|
-
label: "Reconnect",
|
|
15
|
-
variant: "secondary",
|
|
16
|
-
onClick: () => undefined,
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
}),
|
|
20
|
-
);
|
|
21
|
-
assert.match(html, /Manage/);
|
|
22
|
-
assert.match(html, /Reconnect/);
|
|
23
|
-
assert.doesNotMatch(html, /disabled=""/);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it("renders the destructive action as a real button with no disabled attribute", () => {
|
|
27
|
-
const html = renderToString(
|
|
28
|
-
createElement(RowActions, {
|
|
29
|
-
destructive: {
|
|
30
|
-
label: "Delete",
|
|
31
|
-
iconOnly: true,
|
|
32
|
-
onClick: () => undefined,
|
|
33
|
-
confirm: { prompt: "Delete this account?" },
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
36
|
-
);
|
|
37
|
-
assert.match(html, /<button/);
|
|
38
|
-
assert.match(html, /aria-label="Delete"/);
|
|
39
|
-
assert.doesNotMatch(html, /disabled=""/);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
8
|
it("uses aria-busy, not disabled, while an action is busy", () => {
|
|
43
9
|
const html = renderToString(
|
|
44
10
|
createElement(RowActions, {
|