-
-
Notifications
You must be signed in to change notification settings - Fork 833
Add security-user-settings-tab.spec.ts
#10925
Add security-user-settings-tab.spec.ts
#10925
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @luixxiul . Looks good with some small questions.
cy.initTestUser(homeserver, "Hanako"); | ||
}); | ||
|
||
cy.openUserSettings("Security"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This it
-block does not contain any test (or I don't see it). What is the purpose of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have thought cy.openUserSettings
itself included assertions in it and it was worth checking whether Security tab could be opened properly, but this can be surely removed in favor of the test below, which calls openUserSettings("Security")
.
I am going to remove this.
.should("exist") | ||
.closest(".mx_Toast_toast") | ||
.within(() => { | ||
cy.get(".mx_Toast_buttons .mx_AccessibleButton_kind_danger_outline").click(); // Click "Dismiss" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to click a button with the name „Dismiss“ here?
Then the comment would be unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right- I addressed it with 6df45a4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @luixxiul 👍
it("should be rendered properly", () => { | ||
cy.findByRole("button", { name: "Learn more" }).click(); | ||
|
||
cy.get(".mx_AnalyticsLearnMoreDialog_wrapper").percySnapshotElement("AnalyticsLearnMoreDialog"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The snapshot is taken as expected: https://percy.io/dfde73bd/matrix-react-sdk/builds/27689554/changed/1540401406
This PR intends to add
security-user-settings-tab.spec.ts
as a follow-up to #10924. The test this PR suggests to add is simple for now, and other scenarios should be implemented later.This suggests to take a Percy snapshot of
AnalyticsLearnMoreDialog
.type: task
Signed-off-by: Suguru Hirahara luixxiul@users.noreply.github.com
Checklist
This change is marked as an internal change (Task), so will not be included in the changelog.