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

Bug - Unable to run single e2e test after pr #3827 #3874

Closed
bamsargeant opened this issue Dec 6, 2022 · 4 comments
Closed

Bug - Unable to run single e2e test after pr #3827 #3874

bamsargeant opened this issue Dec 6, 2022 · 4 comments
Labels
ionitron: needs reproduction This PR or Issue does not have a reproduction case URL

Comments

@bamsargeant
Copy link

bamsargeant commented Dec 6, 2022

Bug

Unable to run a single e2e test

Details

Unable to run single e2e test after upgrading from v2.16.1 to v2.19.3

Command used: npx stencil test --e2e dialog.e2e.ts

Work around

I am able to get the same functionality by adding -- as an extra arg

Command used: npx stencil test --e2e -- dialog.e2e.ts

@ionitron-bot ionitron-bot bot added the triage label Dec 6, 2022
@rwaskiewicz
Copy link
Contributor

Hey @bamsargeant 👋

I'm trying to reproduce this issue, but need a little more information from you. PR #3827 isn't a part of Stencil v2.19.3. Instead, it was released as a part of Stencil v2.20.0 (which was released just yesterday). This makes me think that your issue might be resolved by upgrading to v2.20.0.

I took a quick look by spinning up a minimal reproduction case by running npx init stencil component jest-e2e-test in my terminal. I used npm run generate to create another-cmp and dialog-cmp components, and attempted to reproduce this with both v2.19.0 and v2.20.0.

My directory structure looks like this:

➜  jest-e2e-test tree src/components/
src/components/
├── another-cmp
│   ├── another-cmp.css
│   ├── another-cmp.tsx
│   └── test
│       ├── another-cmp.e2e.ts
│       └── another-cmp.spec.tsx
├── dialog-cmp
│   ├── dialog-cmp.css
│   ├── dialog-cmp.tsx
│   └── test
│       ├── dialog-cmp.e2e.ts
│       └── dialog-cmp.spec.tsx
└── my-component
    ├── my-component.css
    ├── my-component.e2e.ts
    ├── my-component.spec.ts
    ├── my-component.tsx
    └── readme.md

5 directories, 13 files

With v2.19.0, I can reproduce:

➜  jest-e2e-test npm ls @stencil/core
jest-e2e-test@0.0.1 /private/tmp/jest-e2e-test
└── @stencil/core@2.19.3

➜  jest-e2e-test npx stencil test --e2e dialog-cmp.e2e.ts
[40:47.8]  @stencil/core
[40:48.0]  v2.19.3 🌏
[40:48.0]  testing e2e files
[40:48.8]  build, jest-e2e-test, dev mode, started ...
[40:48.9]  transpile started ...
[40:51.1]  transpile finished in 2.23 s
[40:51.1]  copy started ...
[40:51.1]  generate custom elements started ...
[40:51.1]  generate lazy started ...
[40:51.2]  copy finished (0 files) in 104 ms
[40:51.4]  generate custom elements finished in 300 ms
[40:51.4]  generate lazy finished in 298 ms
[40:51.4]  build finished in 2.62 s

[40:51.5]  jest args: --e2e dialog-cmp.e2e.ts --max-workers=8
 PASS  src/components/dialog-cmp/test/dialog-cmp.e2e.ts
 PASS  src/components/my-component/my-component.e2e.ts
 PASS  src/components/another-cmp/test/another-cmp.e2e.ts

Test Suites: 3 passed, 3 of 7 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        1.668 s
Ran all test suites.

With v2.20.0, I cannot reproduce:

➜  jest-e2e-test npx stencil test --e2e dialog-cmp.e2e.ts
[41:06.9]  @stencil/core
[41:07.0]  v2.20.0 🍁
[41:07.0]  testing e2e files
[41:07.8]  build, jest-e2e-test, dev mode, started ...
[41:07.8]  transpile started ...
[41:08.9]  transpile finished in 1.02 s
[41:08.9]  copy started ...
[41:08.9]  generate custom elements started ...
[41:08.9]  generate lazy started ...
[41:09.0]  copy finished (0 files) in 99 ms
[41:09.2]  generate custom elements finished in 292 ms
[41:09.2]  generate lazy finished in 291 ms
[41:09.2]  build finished in 1.39 s

[41:09.2]  jest args: --e2e --max-workers=8 dialog-cmp.e2e.ts
 PASS  src/components/dialog-cmp/test/dialog-cmp.e2e.ts
  dialog-cmp
    ✓ renders (195 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        0.419 s, estimated 1 s
Ran all test suites matching /dialog-cmp.e2e.ts/i.

Can you try upgrading to v2.20.0 and see if that fixes it? If not, can you please create a minimal reproduction case for the team to take a look at?

@rwaskiewicz rwaskiewicz added the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Dec 6, 2022
@ionitron-bot ionitron-bot bot removed the triage label Dec 6, 2022
@rwaskiewicz rwaskiewicz added the ionitron: needs reproduction This PR or Issue does not have a reproduction case URL label Dec 6, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Dec 6, 2022

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

@ionitron-bot ionitron-bot bot removed the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Dec 6, 2022
@bamsargeant
Copy link
Author

@rwaskiewicz Perfecto!

v2.20.0 fixed the issue - many thanks :)

Closing the ticket.

@alicewriteswrongs
Copy link
Contributor

Really glad to hear the fix worked! If you experience any further issues with the Stencil CLI please do file another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ionitron: needs reproduction This PR or Issue does not have a reproduction case URL
Projects
None yet
Development

No branches or pull requests

3 participants