community-platform icon indicating copy to clipboard operation
community-platform copied to clipboard

refactor: e2e best practice #3475

Open tuliobluz opened this issue 2 months ago • 2 comments

PR Checklist

PR Type

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Developer experience (improves developer workflows for contributing to the project)

Description

Following the issue https://github.com/ONEARMY/community-platform/issues/3475

  • It was removed unnecessary cy.wait then it can save some test running time
  • move cy.deleteCurrentUser to beforeEach instead of after as best practice
  • Removed duplicate generateId code as best practice

Git Issues

Closes #

Screenshots/Videos

If useful, provide screenshot or capture to highlight main changes


What happens next?

Thanks for the contribution! We try to make sure all PRs are reviewed ahead of our monthly maintainers call (first Monday of the month)

If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.

If you need more immediate feedback you can try reaching out on Discord in the Community Platform development channel.

tuliobluz avatar Apr 24 '24 20:04 tuliobluz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.68%. Comparing base (bcb1d1e) to head (c409c9f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3476   +/-   ##
=======================================
  Coverage   66.67%   66.68%           
=======================================
  Files         427      427           
  Lines       13460    13460           
  Branches     2427     2427           
=======================================
+ Hits         8975     8976    +1     
+ Misses       4439     4438    -1     
  Partials       46       46           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 25 '24 13:04 codecov[bot]

4 flaky tests on run #5469 ↗︎

0 90 1 0 Flakiness 4

Details:

refactor: fix unsubscribe component
Project: onearmy-community-platform Commit: c409c9fd17
Status: Passed Duration: 04:40 💡
Started: Apr 29, 2024 3:18 PM Ended: Apr 29, 2024 3:22 PM
Flakiness  howto/write.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[How To] > [Create a how-to] > [By Authenticated] Test Replay Screenshots Video
Flakiness  settings.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[Settings] > [Focus Community Builder] > [Edit a new profile] Test Replay Screenshots Video
Flakiness  profile.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[Profile] > [By User] > [Can contact profiles by default] Test Replay Screenshots Video
Flakiness  map.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
map > member pins > by default should render all `accepted` pins Test Replay Screenshots Video

Review all test suite changes for PR #3476 ↗︎

cypress[bot] avatar Apr 25 '24 13:04 cypress[bot]

This looks great! Do you want to make any other changes for this PR?

When you are done please squash the PR, as we use commits for the Release Notes.

mariojsnunes avatar Apr 28 '24 08:04 mariojsnunes

Thank you so much for this @tuliobluz! Yes, it could probably do with a squash but it looks like this will reduce flakiness on a couple of tests that are annoying in other branches so I'm going to merge this now.

benfurber avatar Apr 29 '24 15:04 benfurber

@all-contributors please add @tuliobluz for code

benfurber avatar Apr 29 '24 16:04 benfurber

@benfurber

I've put up a pull request to add @tuliobluz! :tada:

allcontributors[bot] avatar Apr 29 '24 16:04 allcontributors[bot]

Thanks for merging it, I will try to solve most of the flaky now, haha

tuliobluz avatar Apr 29 '24 20:04 tuliobluz

:tada: This PR is included in version 1.176.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

onearmy-bot avatar Apr 30 '24 13:04 onearmy-bot

@mariojsnunes now I just realized what you mean with squash, sorry. I should have done it before. I will pay attention for the next ones.

tuliobluz avatar Apr 30 '24 15:04 tuliobluz