Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: update to Cypress 10 #108

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

Merged
haoqunjiang merged 7 commits into main from feat-cy-10
Jun 3, 2022
Merged

feat: update to Cypress 10 #108

haoqunjiang merged 7 commits into main from feat-cy-10
Jun 3, 2022

Conversation

Copy link
Member

@haoqunjiang haoqunjiang commented Jun 3, 2022

No description provided.

baseUrl: 'http://localhost:4173'
},
component: {
specPattern: 'src/**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',
Copy link
Member Author

@haoqunjiang haoqunjiang Jun 3, 2022
edited
Loading

Choose a reason for hiding this comment

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

I chose to explicitly specify specPattern everywhere, for:

  1. Make the convention clearer for newcomers;
  2. Besides the default pattern, I also allowed *.spec.* so that it's easier for users from the old projects to migrate.

Copy link
Contributor

@JessicaSachs JessicaSachs Jun 3, 2022
edited
Loading

Choose a reason for hiding this comment

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

Besides the default pattern, I also allowed .spec. so that it's easier for users from the old projects to migrate.

I believe this is okay for now. I worry about tsconfig files that have global types, but this is a convo for another day.

Copy link
Member Author

haoqunjiang commented Jun 3, 2022
edited
Loading

JessicaSachs reacted with heart emoji

Comment on lines +52 to +53
? ['**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}', 'cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}']
: ['cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}'],
Copy link
Member Author

@haoqunjiang haoqunjiang Jun 3, 2022

Choose a reason for hiding this comment

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

This configuration is not automatically migrated by the Cypress, is not mentioned in the migration guide, and is not included in the create-vue template snapshots, so we might need to remind the user somewhere else.

Copy link
Contributor

@JessicaSachs JessicaSachs Jun 3, 2022
edited
Loading

Choose a reason for hiding this comment

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

I really prefer not using __tests__ but it's a conversation topic for another time.

.spec. will conflict with Vitest, Mocha, and Jest types I believe, which is why we chose .cy. but it's okay, you're right about the struggle people may have with migration.

Copy link
Member Author

@haoqunjiang haoqunjiang Jun 3, 2022

Choose a reason for hiding this comment

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

They will not in our case because of the usage of solution-style tsconfigs.
But yeah, people who are not familiar enough with TypeScript will find this troublesome. So I've changed the default pattern.

@@ -1,10 +1,10 @@
{
"scripts": {
"test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open'",
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run'"
"test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open --e2e'",
Copy link
Member Author

@haoqunjiang haoqunjiang Jun 3, 2022

Choose a reason for hiding this comment

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

Currently --e2e and --component flags are always passed to skip the "Choose testing type" screen.
This is because the commands are test:e2e and test:unit, we expect users to know what types of tests they are looking for.

JessicaSachs reacted with thumbs up emoji
@haoqunjiang haoqunjiang merged commit fd68880 into main Jun 3, 2022
@haoqunjiang haoqunjiang deleted the feat-cy-10 branch June 3, 2022 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@JessicaSachs JessicaSachs Awaiting requested review from JessicaSachs

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /