Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): add e2e tests for widgets #8735

Merged
merged 24 commits into from
May 28, 2022
Merged

feat(tests): add e2e tests for widgets #8735

merged 24 commits into from
May 28, 2022

Conversation

pixeldesu
Copy link
Contributor

What

This PR adds 22 end-to-end test cases for adding all widgets to the widget sidebar.

3 basic tests:

  • checking if the Edit widgets button is present
  • checking if the select is visible after Edit widgets has been pressed (Edit mode)
  • checking if removing widgets works

19 tests for all current widgets

Why

After the recent merge of the widget refactoring/lint issues a lot of regressions happened. Testing if widgets are present after being added at least makes sure that they are not breaking the application completely.

Additional info (optional)

  • I added mk-widget-edit/select/add classes to mark up the elements that are used to add widgets
  • I added more mkw-* classes to the widgets that had them missing
  • The test cases do not check for specific widget functionality, they only check that the wrapped mkw-{widgetName} is present after being added

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label May 26, 2022
@syuilo
Copy link
Member

syuilo commented May 28, 2022

Cool!
Do you know why the e2e test is failing?

@pixeldesu
Copy link
Contributor Author

pixeldesu commented May 28, 2022

@syuilo No clue 😕

Before the final push, that case worked...so I assume that it's something timeout-related mainly and we might need to adjust something here so that it consistently works.

Here's the last action run on my fork before I made the PR, and there it passed fine!
https://github.com/pixeldesu/misskey/runs/6603509947?check_suite_focus=true

This also might be an issue with the basic testsuite, as the beforeEach-hook is the same there.

@syuilo syuilo merged commit 708fba9 into misskey-dev:develop May 28, 2022
@syuilo
Copy link
Member

syuilo commented May 28, 2022

👍🏻👍🏻👍🏻

@pixeldesu pixeldesu deleted the feature/widget-tests branch May 28, 2022 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants