Refactor RoomStatusBar into MVVM (#31523)
* Refactor RoomStatusBar into MVVM * cleanup * updated snaps * More cleanup * fix loop * fixup * drop comment * lint * cleanup console statements * Starting to move to a MVVM v2 component. * extra * Refactor as a shared-componend / MVVM v2 * some cleanup * i18n for banner * remove removed css * Update playwright tests to have a two stage on the consent bar. * Update snaps * Update snapshots * cleanup * update snaps * refactor to use enum * fix slight differences in pw snaps * Add unit tests * fix snaps * snaps updated * more test cleanups * fix snaps * fixed now? * Disable animationsq * lint lint lint * remove console * lint * fix snap * Refactor based on review comments. * update view model test * oops! * fix snap * Update snaps * snap snap snap * switch to a const map of strings * Use this.disposables * Update translations to be inside shared-components * fix the tac * Also retry * Cleanup * update snaps * update other snaps * snap updates
@@ -83,6 +83,13 @@ test.describe("Room Status Bar", () => {
|
||||
const banner = page.getByRole("region", { name: "Room status bar" });
|
||||
await expect(banner).toBeVisible({ timeout: 15000 });
|
||||
await expect(banner).toMatchScreenshot("consent.png");
|
||||
|
||||
// Click consent
|
||||
await banner.getByRole("link", { name: "View Terms and Conditions" }).click();
|
||||
await page.unroute("**/_matrix/client/**/send**");
|
||||
// Should now be allowed to retry.
|
||||
await banner.getByRole("button", { name: "Retry all" }).click();
|
||||
await expect(banner).not.toBeVisible();
|
||||
},
|
||||
);
|
||||
test.describe("Message fails to send", () => {
|
||||
@@ -161,7 +168,7 @@ test.describe("Room Status Bar", () => {
|
||||
await composer.fill("Hello");
|
||||
await composer.press("Enter");
|
||||
|
||||
const banner = page.getByText("!Some of your messages have");
|
||||
const banner = page.getByRole("status", { name: "Could not start a chat with this user" });
|
||||
await expect(banner).toBeVisible();
|
||||
await expect(banner).toMatchScreenshot("local_room_create_failed.png");
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 17 KiB |