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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Investigate failing Stencil component tests in v9 #12631

Open
3 tasks done
christian-bromann opened this issue Apr 7, 2024 · 0 comments
Open
3 tasks done
Labels
Bug 馃悰 help wanted Issues that are free to take by anyone interested v9
Milestone

Comments

@christian-bromann
Copy link
Member

christian-bromann commented Apr 7, 2024

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

WDIO Testrunner

Which capabilities are you using?

n/a

What happened?

In #12593 we had to disable Stencil component tests due to an issue with loading a component file:

Error:  Test failed due to following error(s):
   - stencil.test.tsx: Failed to fetch dynamically imported module: http://localhost:61519/browser-runner/components/StencilComponent.tsx: TypeError: Failed to fetch dynamically imported module: http://localhost:61519/browser-runner/components/StencilComponent.tsx

I believe this has to do with the following code I've added:

findStaticImports(transformedCode)
    .filter((imp) => imp.specifier.includes('&encapsulation=shadow'))
    .forEach((imp) => {
        const cssPath = path.resolve(path.dirname(id), imp.specifier)
        transformedCode = transformedCode.replace(
            imp.code,
            `import ${imp.imports.trim()} from '/@fs/${cssPath}&inline';\n`
        )
    })

My hunch is that the path has to get normalized for Windows.

What is your expected behavior?

Revert this commit: fa3f017

How to reproduce the bug.

n/a

Relevant log output

n/a

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues
@christian-bromann christian-bromann added Bug 馃悰 help wanted Issues that are free to take by anyone interested v9 labels Apr 7, 2024
@christian-bromann christian-bromann added this to the v9 milestone Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 馃悰 help wanted Issues that are free to take by anyone interested v9
Projects
Status: No status
Development

No branches or pull requests

1 participant