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: e2e tests failing randomly #6157

Open
3 tasks done
danyball opened this issue Feb 13, 2025 · 2 comments
Open
3 tasks done

bug: e2e tests failing randomly #6157

danyball opened this issue Feb 13, 2025 · 2 comments
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil Help Wanted

Comments

@danyball
Copy link

Prerequisites

Stencil Version

4.26.0

Current Behavior

Having 500+ e2e tests and run them in parallel, you will see errors like that in your log:

 ● sdx-input-item › required checkbox › should have a space between label and asterisk when required field

    Timeout - Async callback was not invoked within the 30000 ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000 ms timeout specified by jest.setTimeout.

      at mapper (node_modules/jest-jasmine2/build/queueRunner.js:71:45)

  ● sdx-input-item › required checkbox › should have a space between label and asterisk when required field

    TypeError: Cannot read properties of undefined (reading 'getProperty')

      20 |
      21 |     it("should have a space between label and asterisk when required field", async () => {
    > 22 |       expect(await element.getProperty("required")).toBe(true)
         |                            ^
      23 |       expect(element.innerText).toContain("Checkbox")
      24 |       expect(label.innerText).toBe(" *")
      25 |     })

      at Object.<anonymous> (webcomponents/components/input-group/input-item/input-item.e2e.ts:22:28)

  ● sdx-input-item › checkbox without text › should be clickable

    App did not load within 30000ms. Please ensure the content loads a stencil application.

       9 |
      10 |     beforeEach(async () => {
    > 11 |       page = await newE2EPage({
         |              ^
      12 |         html: `
      13 |           <sdx-input-item type="checkbox" required>Checkbox</sdx-input-item>
      14 |         `,

      at waitForStencil (node_modules/@stencil/core/testing/index.js:10557:11)
      at e2eSetContent (node_modules/@stencil/core/testing/index.js:10550:3)
      at newE2EPage (node_modules/@stencil/core/testing/index.js:10462:7)
      at Object.<anonymous> (webcomponents/components/input-group/input-item/input-item.e2e.ts:11:14)




### Expected Behavior

no errors

### System Info

```shell
System: node 22.12.0
    Platform: darwin (24.3.0)
   CPU Model: Apple M1 Max (10 cpus)
    Compiler: /node_modules/@stencil/core/compiler/stencil.js
       Build: 1739293045
     Stencil: 4.26.0 🐇
  TypeScript: 5.5.4
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

No reproducer found. But there are at least 2 customers with the same errors. Some more info in another ticket from this comment downwards: #6072 (comment)

Code Reproduction URL

no sorry

Additional Information

Working workaround: add runInBand like stencil test --e2e --runInBand

@tishoyanchev
Copy link

@danyball, @christian-bromann
Hi!
Thanks for opening up the issue.
I haven't tried this workaround with runInBand, because I didn't think it's a good solution. I also wasn't sure how to incorporate it into our pipeline, but either way, we are still waiting for a final proper fix for this issue. At the moment, we have removed the tests from github-actions as we were completely blocked by them, but I really hope the stencil team can come up with a solution for this issue.

@christian-bromann christian-bromann added Bug: Validated This PR or Issue is verified to be a bug within Stencil Help Wanted and removed triage labels Feb 13, 2025
@Cliffback
Copy link

Vi have also got this same issue, after upgrading from stencil v4.23 to v4.26 and puppeteer from v22 to v24.2.1. The issue only happens in our GitLab pipeline, and would cause 2-3 random e2e tests timeout when trying to set pageContent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil Help Wanted
Projects
None yet
Development

No branches or pull requests

4 participants