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

[e2e] Update e2e lint rules to match best practices #5263

Closed
1 of 3 tasks
unlikelyzero opened this issue May 25, 2022 · 4 comments
Closed
1 of 3 tasks

[e2e] Update e2e lint rules to match best practices #5263

unlikelyzero opened this issue May 25, 2022 · 4 comments
Labels
type:maintenance tests, chores, or project maintenance

Comments

@unlikelyzero
Copy link
Collaborator

unlikelyzero commented May 25, 2022

Summary

@unlikelyzero unlikelyzero added the type:maintenance tests, chores, or project maintenance label May 25, 2022
@unlikelyzero unlikelyzero added this to To triage in Improve Test Coverage via automation May 25, 2022
@ozyx ozyx self-assigned this May 25, 2022
@unlikelyzero unlikelyzero changed the title [e2e] Update describe lint rules to match best practices [e2e] Update e2e lint rules to match best practices May 26, 2022
@ozyx
Copy link
Member

ozyx commented Jul 26, 2022

Testing Instructions

  • Add a conditional to an e2e test such as an if/else, switch, or ternary statement.

  • npm run lint, and see that the no-conditional-in-test warning is triggered for the added lines

  • Add a nested test.describe of depth 2 to an e2e test such as:

test.describe('foo', () => {
    test.describe('bar', () => {
        // baz
    }
}
  • npm run lint and notice that the max-nested-describe error is triggered for the added lines

@khalidadil
Copy link
Contributor

@ozyx the playwright/no-conditional-in-test throws a warning, not an error. Is that right?

@ozyx
Copy link
Member

ozyx commented Aug 4, 2022

@ozyx the playwright/no-conditional-in-test throws a warning, not an error. Is that right?

Correct, however, our 'npm run lint' fails if any warnings are detected. So we effectively treat all eslint warnings as errors.

@khalidadil
Copy link
Contributor

khalidadil commented Aug 4, 2022

got it! Then I'll mark this as verified.

Verified Fixed in Testathon on 08/04/22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance tests, chores, or project maintenance
Projects
Development

No branches or pull requests

3 participants