Skip to content

Commit 67b0b13

Browse files
renovate[bot]t3chguylangleyd
authored andcommitted
Update vector-im (compound-web to 8.2.1, design tokens is already at 6.0.0 on develop) (element-hq#30373)
* Update vector-im * Update snapshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Make BaseDialog's div keyboard focusable and fix test. * Update more e2e tests to use switch instead of checkbox * fix useParticipants incorrectly returning an array when a map is expected * Try again to fix calParticipants * try fix RoomHeader tests again by also mocking useParticipants * Revert "try fix RoomHeader tests again by also mocking useParticipants" This reverts commit f83093c. * Try with no dependencies * try mocking useCall rather than just useParticipantCount * Mock the call store rather than the hook * Only mock the call object for tests that expect it. * Revert "Only mock the call object for tests that expect it." This reverts commit 043d812. * Revert "Mock the call store rather than the hook" This reverts commit 644be31. * Revert "try mocking useCall rather than just useParticipantCount" This reverts commit 92034aa. * Revert "Try with no dependencies" This reverts commit fb502a6. * Reapply "try fix RoomHeader tests again by also mocking useParticipants" This reverts commit e456782. * Revert "try fix RoomHeader tests again by also mocking useParticipants" This reverts commit f83093c. * Revert "Try again to fix calParticipants" This reverts commit c45ad30. * Revert "fix useParticipants incorrectly returning an array when a map is expected" This reverts commit e06d76e. * bump compound-web * Update snapshots * Fix bad merge, we don't need the second call to escape. The comment a couple of lines up explains things. * Trigger build to fix licence/cla check --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: David Langley <davidl@element.io>
1 parent 41ebc55 commit 67b0b13

22 files changed

Lines changed: 344 additions & 337 deletions

File tree

playwright/e2e/crypto/toasts.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ test.describe("'Turn on key storage' toast", () => {
126126
await toast.getByRole("button", { name: "Continue" }).click();
127127

128128
// Then we see the Encryption settings dialog with an option to turn on key storage
129-
await expect(page.getByRole("checkbox", { name: "Allow key storage" })).toBeVisible();
129+
await expect(page.getByRole("switch", { name: "Allow key storage" })).toBeVisible();
130130

131131
// And when we close that
132132
await page.getByRole("button", { name: "Close dialog" }).click();
@@ -153,7 +153,7 @@ test.describe("'Turn on key storage' toast", () => {
153153
await page.getByRole("button", { name: "Go to Settings" }).click();
154154

155155
// Then we see Encryption settings again
156-
await expect(page.getByRole("checkbox", { name: "Allow key storage" })).toBeVisible();
156+
await expect(page.getByRole("switch", { name: "Allow key storage" })).toBeVisible();
157157

158158
// And when we close that, see the toast, click Dismiss, and Yes, Dismiss
159159
await page.getByRole("button", { name: "Close dialog" }).click();

playwright/e2e/crypto/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ export async function doTwoWaySasVerification(page: Page, verifier: JSHandle<Ver
300300
export async function enableKeyBackup(app: ElementAppPage): Promise<string> {
301301
const encryptionTab = await app.settings.openUserSettings("Encryption");
302302

303-
const keyStorageToggle = encryptionTab.getByRole("checkbox", { name: "Allow key storage" });
303+
const keyStorageToggle = encryptionTab.getByRole("switch", { name: "Allow key storage" });
304304
if (!(await keyStorageToggle.isChecked())) {
305-
await encryptionTab.getByRole("checkbox", { name: "Allow key storage" }).click();
305+
await encryptionTab.getByRole("switch", { name: "Allow key storage" }).click();
306306
}
307307

308308
await encryptionTab.getByRole("button", { name: "Set up recovery" }).click();
@@ -323,11 +323,11 @@ export async function enableKeyBackup(app: ElementAppPage): Promise<string> {
323323
export async function disableKeyBackup(app: ElementAppPage): Promise<void> {
324324
const encryptionTab = await app.settings.openUserSettings("Encryption");
325325

326-
const keyStorageToggle = encryptionTab.getByRole("checkbox", { name: "Allow key storage" });
326+
const keyStorageToggle = encryptionTab.getByRole("switch", { name: "Allow key storage" });
327327
if (await keyStorageToggle.isChecked()) {
328-
await encryptionTab.getByRole("checkbox", { name: "Allow key storage" }).click();
328+
await encryptionTab.getByRole("switch", { name: "Allow key storage" }).click();
329329
await encryptionTab.getByRole("button", { name: "Delete key storage" }).click();
330-
await encryptionTab.getByRole("checkbox", { name: "Allow key storage" }).isVisible();
330+
await encryptionTab.getByRole("switch", { name: "Allow key storage" }).isVisible();
331331

332332
// Wait for the update to account data to stick
333333
await new Promise((resolve) => setTimeout(resolve, 2000));

playwright/e2e/settings/appearance-user-settings-tab/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Helpers {
8585
* Return the system theme toggle
8686
*/
8787
getMatchSystemThemeCheckbox() {
88-
return this.getThemePanel().getByRole("checkbox", { name: "Match system theme" });
88+
return this.getThemePanel().getByRole("switch", { name: "Match system theme" });
8989
}
9090

9191
/**
@@ -219,7 +219,7 @@ class Helpers {
219219
* Return the compact layout checkbox
220220
*/
221221
getCompactLayoutCheckbox() {
222-
return this.getMessageLayoutPanel().getByRole("checkbox", { name: "Show compact text and messages" });
222+
return this.getMessageLayoutPanel().getByRole("switch", { name: "Show compact text and messages" });
223223
}
224224

225225
/**

playwright/e2e/settings/encryption-user-tab/encryption-tab.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ test.describe("Encryption tab", () => {
117117
await verifySession(app, recoveryKey.encodedPrivateKey);
118118
await util.openEncryptionTab();
119119

120-
await page.getByRole("checkbox", { name: "Allow key storage" }).click();
120+
await page.getByRole("switch", { name: "Allow key storage" }).click();
121121

122122
await expect(
123123
page.getByRole("heading", { name: "Are you sure you want to turn off key storage and delete it?" }),
@@ -136,7 +136,7 @@ test.describe("Encryption tab", () => {
136136

137137
await page.getByRole("button", { name: "Delete key storage" }).click();
138138

139-
await expect(page.getByRole("checkbox", { name: "Allow key storage" })).not.toBeChecked();
139+
await expect(page.getByRole("switch", { name: "Allow key storage" })).not.toBeChecked();
140140

141141
for (const prom of deleteRequestPromises) {
142142
const request = await prom;

test/unit-tests/components/views/dialogs/__snapshots__/DevtoolsDialog-test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ exports[`DevtoolsDialog renders the devtools dialog 1`] = `
3434
>
3535
Room ID: !id
3636
<div
37+
aria-describedby="«r2»"
3738
aria-label="Copy"
3839
class="mx_AccessibleButton mx_CopyableText_copyButton"
3940
role="button"

test/unit-tests/components/views/dialogs/__snapshots__/LogoutDialog-test.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ exports[`LogoutDialog Prompts user to go to settings if there is a backup on the
7474
</details>
7575
</div>
7676
<div
77+
aria-describedby="«rq»"
7778
aria-label="Close dialog"
7879
class="mx_AccessibleButton mx_Dialog_cancelButton"
7980
role="button"
@@ -162,6 +163,7 @@ exports[`LogoutDialog Prompts user to go to settings if there is no backup on th
162163
</details>
163164
</div>
164165
<div
166+
aria-describedby="«r10»"
165167
aria-label="Close dialog"
166168
class="mx_AccessibleButton mx_Dialog_cancelButton"
167169
role="button"

test/unit-tests/components/views/dialogs/__snapshots__/MessageEditHistoryDialog-test.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ exports[`<MessageEditHistory /> should match the snapshot 1`] = `
103103
</div>
104104
</div>
105105
<div
106+
aria-describedby="«r2»"
106107
aria-label="Close dialog"
107108
class="mx_AccessibleButton mx_Dialog_cancelButton"
108109
role="button"
@@ -317,6 +318,7 @@ exports[`<MessageEditHistory /> should support events with 1`] = `
317318
</div>
318319
</div>
319320
<div
321+
aria-describedby="«r8»"
320322
aria-label="Close dialog"
321323
class="mx_AccessibleButton mx_Dialog_cancelButton"
322324
role="button"

test/unit-tests/components/views/dialogs/security/__snapshots__/RestoreKeyBackupDialog-test.tsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ exports[`<RestoreKeyBackupDialog /> should render 1`] = `
286286
</div>
287287
</div>
288288
<div
289+
aria-describedby="«r2»"
289290
aria-label="Close dialog"
290291
class="mx_AccessibleButton mx_Dialog_cancelButton"
291292
role="button"
@@ -484,6 +485,7 @@ exports[`<RestoreKeyBackupDialog /> should restore key backup when the key is ca
484485
</div>
485486
</div>
486487
<div
488+
aria-describedby="«rk»"
487489
aria-label="Close dialog"
488490
class="mx_AccessibleButton mx_Dialog_cancelButton"
489491
role="button"
@@ -550,6 +552,7 @@ exports[`<RestoreKeyBackupDialog /> should restore key backup when the key is in
550552
</div>
551553
</div>
552554
<div
555+
aria-describedby="«rq»"
553556
aria-label="Close dialog"
554557
class="mx_AccessibleButton mx_Dialog_cancelButton"
555558
role="button"

test/unit-tests/components/views/elements/__snapshots__/AppTile-test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
340340
<span>
341341
Using this widget may share data
342342
<div
343-
aria-describedby="«r2j»"
344-
aria-labelledby="«r2i»"
343+
aria-describedby="«r2n»"
344+
aria-labelledby="«r2m»"
345345
class="mx_TextWithTooltip_target mx_TextWithTooltip_target--helpIcon"
346346
>
347347
<svg

test/unit-tests/components/views/elements/__snapshots__/ImageView-test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ exports[`<ImageView /> renders correctly 1`] = `
2121
class="mx_ImageView_toolbar"
2222
>
2323
<div
24+
aria-describedby="«r2»"
2425
aria-label="Zoom out"
2526
class="mx_AccessibleButton mx_ImageView_button mx_ImageView_button_zoomOut"
2627
role="button"

0 commit comments

Comments
 (0)