Use semantic headings in user settings - discovery (#10838)
* allow testids in settings sections * use semantic headings in LabsUserSettingsTab * put back margin var * use SettingsTab wrapper * use semantic headings for deactivate acc section * use semantic heading in manage integratios * i18n * use currentColor in warning-triangle svg, update use in RoomStatusBar * use semantic headings for discovery section * test manage integration settings * test deactivate account section display * remove SettingsFieldset margins * threepids styles * remove debug * test discovery email and phone
This commit is contained in:
parent
9211da20f4
commit
9f011b955b
19 changed files with 407 additions and 123 deletions
|
@ -21,7 +21,7 @@ import { IRequestTokenResponse } from "matrix-js-sdk/src/client";
|
|||
import { MatrixError } from "matrix-js-sdk/src/http-api";
|
||||
|
||||
import { UserFriendlyError } from "../../../../../src/languageHandler";
|
||||
import { EmailAddress } from "../../../../../src/components/views/settings/discovery/EmailAddresses";
|
||||
import EmailAddresses, { EmailAddress } from "../../../../../src/components/views/settings/discovery/EmailAddresses";
|
||||
import { clearAllModals, getMockClientWithEventEmitter } from "../../../../test-utils";
|
||||
|
||||
const mockGetAccessToken = jest.fn().mockResolvedValue("getAccessToken");
|
||||
|
@ -147,3 +147,23 @@ describe("<EmailAddress/>", () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("<EmailAddresses />", () => {
|
||||
it("should render a loader while loading", async () => {
|
||||
const { container } = render(<EmailAddresses emails={[emailThreepidFixture]} isLoading={true} />);
|
||||
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should render email addresses", async () => {
|
||||
const { container } = render(<EmailAddresses emails={[emailThreepidFixture]} isLoading={false} />);
|
||||
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should handle no email addresses", async () => {
|
||||
const { container } = render(<EmailAddresses emails={[]} isLoading={false} />);
|
||||
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue