Skip to content

chore: lint cypress#2082

Merged
thisislawatts merged 4 commits intomasterfrom
chore/lint-cypress
Feb 19, 2023
Merged

chore: lint cypress#2082
thisislawatts merged 4 commits intomasterfrom
chore/lint-cypress

Conversation

@thisislawatts
Copy link
Contributor

@thisislawatts thisislawatts commented Jan 29, 2023

  • chore: introduce linting to Cypress directory
  • chore: appease linting rules
  • chore: appease linting rules
  • chore: enforce no-assigning-return-values

PR Checklist

PR Type

  • 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 on from #2076, I wondered how our Cypress tests were looking.

This PR aims to:

  • Bring Cypress tests in line with repo wide linting requirements
  • Surface Cypress specific anti-patterns

I am not certain about the work involved with removing the cypress rule violations. This may or may not need to be split across multiple PRs, as I have already found a few focused tests 😬

@thisislawatts thisislawatts changed the title chore/lint cypress chore: lint cypress Jan 29, 2023
@cypress
Copy link

cypress bot commented Jan 29, 2023

1 flaky tests on run #2950 ↗︎

0 70 3 0 Flakiness 1

Details:

Merge branch 'master' into chore/lint-cypress
Project: onearmy-community-platform Commit: a0e10112d6
Status: Passed Duration: 03:17 💡
Started: Feb 19, 2023 5:49 PM Ended: Feb 19, 2023 5:52 PM
Flakiness  src/integration/map.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test
map > [By User] > should show the user a message stating their pin is rejected Screenshot

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@thisislawatts thisislawatts force-pushed the chore/lint-cypress branch 4 times, most recently from 2051471 to bf5d9b1 Compare January 29, 2023 20:53
@thisislawatts
Copy link
Contributor Author

@chrismclarke I have uncovered some Cypress tests that were being skipped. Do you have any context on whether they should/shouldn't pass.
https://app.circleci.com/pipelines/github/ONEARMY/community-platform/3722/workflows/9752aaff-81bc-4c04-b466-68db28df04d1/jobs/24167

@chrismclarke
Copy link
Member

Thanks @thisislawatts - sorry for the slow response, I can't recall anything off-hand for why specific tests were skipped, looking at my local branch I can see two cases of it.skip, both of which have you mentioned as last editor

image

Anything else needed from me on this PR? taking a quick look through the code changes all looks good to me.

I can see some minor lint and conflict issues, let me know if you want me to help get these resolved or if you have any plans to revisit. Otherwise i'd say this should be pretty much good to go

@thisislawatts thisislawatts force-pushed the chore/lint-cypress branch 3 times, most recently from 2dd076c to 9b76d2f Compare February 19, 2023 09:42
@thisislawatts thisislawatts marked this pull request as ready for review February 19, 2023 11:41
@thisislawatts thisislawatts requested a review from a team as a code owner February 19, 2023 11:41
@thisislawatts thisislawatts self-assigned this Feb 19, 2023
test: remove a few hard coded wait
chore: adopt mocha eslint rules for cypress suites

Originally looking for a Cypress rule to flag skipped tests.

Based on the suggestion here:
cypress-io/eslint-plugin-cypress#87 (comment)

chore: remove empty test suite
@chrismclarke chrismclarke requested review from chrismclarke and removed request for a team February 19, 2023 17:43
@thisislawatts
Copy link
Contributor Author

Thanks @chrismclarke, I will push those skipped tests to another PR. It would be more valuable to get these automated checks in to prevent any more .skip or .only slipping past human reviewers :)

Copy link
Member

@chrismclarke chrismclarke left a comment

Choose a reason for hiding this comment

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

Thanks @thisislawatts , sounds good to me. Really nice to have these added checks in for sure

@thisislawatts thisislawatts merged commit 74c705e into master Feb 19, 2023
@thisislawatts thisislawatts deleted the chore/lint-cypress branch February 19, 2023 22:55
@cypress cypress bot mentioned this pull request Feb 19, 2023
@onearmy-bot
Copy link
Collaborator

🎉 This PR is included in version 1.38.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants