Move integrations switch (#12733)

* Move integrations switch

This is the last thing to move out of 'general' now.

* unused import

* Move tests out to the SetIntegrationManager component

* Only a decade out

* Move playwright test to the new tab

* Update snapshot

* Update other snapshot
This commit is contained in:
David Baker 2024-07-10 20:10:19 +01:00 committed by GitHub
parent 19f9f98564
commit 44b98896a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 243 additions and 141 deletions

View file

@ -18,7 +18,6 @@ import { test, expect } from "../../element-web-test";
const USER_NAME = "Bob";
const USER_NAME_NEW = "Alice";
const IntegrationManager = "scalar.vector.im";
test.describe("General user settings tab", () => {
test.use({
@ -73,17 +72,6 @@ test.describe("General user settings tab", () => {
// Assert that the add button is rendered
await expect(phoneNumbers.getByRole("button", { name: "Add" })).toBeVisible();
const setIntegrationManager = uut.locator(".mx_SetIntegrationManager");
await setIntegrationManager.scrollIntoViewIfNeeded();
await expect(
setIntegrationManager.locator(".mx_SetIntegrationManager_heading_manager", { hasText: IntegrationManager }),
).toBeVisible();
// Make sure integration manager's toggle switch is enabled
await expect(setIntegrationManager.locator(".mx_ToggleSwitch_enabled")).toBeVisible();
await expect(setIntegrationManager.locator(".mx_SetIntegrationManager_heading_manager")).toHaveText(
"Manage integrations(scalar.vector.im)",
);
// Assert the account deactivation button is displayed
const accountManagementSection = uut.getByTestId("account-management-section");
await accountManagementSection.scrollIntoViewIfNeeded();