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: validate specPattern root level #19980

Merged

Conversation

estrada9166
Copy link
Member

User facing changelog

Additional details

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 31, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Jan 31, 2022



Test summary

17925 0 211 0Flakiness 4


Run details

Project cypress
Status Passed
Commit e4db6ae
Started Feb 4, 2022 2:29 PM
Ended Feb 4, 2022 2:42 PM
Duration 13:29 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

net_stubbing.cy.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
2 network stubbing > waiting and aliasing > can timeout incrementally waiting on requests
3 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
xhr.cy.js Flakiness
1 ... > can alias a route without stubbing it

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@estrada9166 estrada9166 marked this pull request as ready for review January 31, 2022 18:32
tgriesser
tgriesser previously approved these changes Feb 1, 2022
lmiller1990
lmiller1990 previously approved these changes Feb 1, 2022
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

Nice job, looks good - just some general comments, I wonder if we want to do a full DX review prior to merging this, or do that later? Eg baseUrl might need validating, also it seems like __snapshots__ should be a default ignoreSpecPattern for CT.

'env': {
'cypress-plugin-snapshots': {
'prettier': true,
},
},
'component': {
'ignoreSpecPattern': [
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be the default for CT. @cowboy maybe?

I also think baseUrl should be disallowed top level, it's E2E only. We should defs go over the config changes w/ a fine toothed comb to make sure everything is 💯, but this PR is definitely a good start.


let ctx: DataContext

beforeEach(async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, I wonder if we want a createTestDataContext method that does all this - I think a lot of tests might benefit from it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah! we may want to move to a util, that can be really useful so we can create more unit tests for different dataSources and dataActions

await ctx.fs.remove(temporary)
})

it('find all the *.cy.{ts,js} excluding the e2e', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, we definitely needed these tests.

Copy link
Member

@brian-mann brian-mann left a comment

Choose a reason for hiding this comment

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

component.ignoreSpecPattern should use the ignore option from fast-glob and write a VERY important unit test that verifies that **/node_modules/** is set as the value to prevent accidentally reading in all files in node_modules as it describes in this section:

https://github.com/mrmlnc/fast-glob#how-to-exclude-directory-from-reading

image

@estrada9166 estrada9166 merged commit 5d52758 into 10.0-release Feb 4, 2022
@estrada9166 estrada9166 deleted the alejandro/feat/validate-specPattern-root-level branch February 4, 2022 15:48
tgriesser added a commit that referenced this pull request Feb 4, 2022
* 10.0-release:
  feat: validate specPattern root level (#19980)
  feat(unify): unsupported browsers (#19997)
  feat: persist isSideNavigationOpen (#20026)
  feat: add types for urqlCacheKeys (#20027)
  fix: rename spec.js to spec.cy.js (#20029)
  feat: waiting for dependencies to be installed in wizard (#19955)
  fix: migrate config fields to correct the location (#19940)
  feat: relaunch browser when switching testing types from app (#19961)
  test: final ct-audit tests and component tweaks (#19948)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants