Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add E2E test for LabsUserSettingsTab #10736

Closed
wants to merge 1 commit into from
Closed

Add E2E test for LabsUserSettingsTab #10736

wants to merge 1 commit into from

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented Apr 28, 2023

Close element-hq/element-web#25228

type: task

Signed-off-by: Suguru Hirahara luixxiul@users.noreply.github.com

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

@github-actions github-actions bot added Z-Community-PR Issue is solved by a community member's PR T-Task Refactoring, enabling or disabling functionality, other engineering tasks labels Apr 28, 2023
@luixxiul luixxiul marked this pull request as ready for review April 28, 2023 05:38
@luixxiul luixxiul requested a review from a team as a code owner April 28, 2023 05:38
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
});

it("should be rendered properly", () => {
cy.get(".mx_SettingsTab.mx_LabsUserSettingsTab").percySnapshotElement("User settings tab - Labs", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is a good candidate for a percy snapshot, or an e2e test at all, as the labs screen is intended to change regularly

Copy link
Contributor Author

@luixxiul luixxiul May 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regularly but not daily, right? I believe that taking a whole snapshot would help to prevent a case like element-hq/element-web#24813. Please let me know if a Jest snapshot would be sufficient here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andybalaam I would like to ask your opinion on that too. Thanks in advance.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion a jest test is more suitable for this case - where we can use stable mock data that covers all the cases. Then we can be sure that the case from 24813 will be covered and continue to be covered, independent of what features are in labs at that time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree that a Jest test would probably be the best fit here. We have to review each Percy failure manually, so we should definitely not create tests that we expect to fail regularly.

Thanks for the work @luixxiul !

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks both of you for opinions! Now I am convinced.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add E2E test for labs user settings tab
3 participants