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

Persist Locale for Web Test Runner #726

Closed
kaiszybiak opened this issue Apr 8, 2022 · 2 comments
Closed

Persist Locale for Web Test Runner #726

kaiszybiak opened this issue Apr 8, 2022 · 2 comments
Assignees
Labels
bug Things that aren't working right in the library.

Comments

@kaiszybiak
Copy link

Describe the bug

Having a system language different than en-US results in failing unit tests

To Reproduce

Steps to reproduce the behavior:

  1. Ensure you have a different system language than en-US. E.g. de-DE
  2. Clone shoelace and execute npm i in the root directory
  3. Execute npm run verify

Multiple unit tests should fail as seen in the provided screenshots, due to a format mismatch.

Demo

No additional changes are required

Screenshots

Bildschirmfoto 2022-04-08 um 14 30 20

Bildschirmfoto 2022-04-08 um 14 30 29

Bildschirmfoto 2022-04-08 um 14 30 40

Browser / OS

No specific Browser is required.

Additional information

Suggestion:

Add the language tag to the web-test-runner.config.js:

  testRunnerHtml: testFramework => `
    <html lang="en-US">
      <head></head>
      <body>
        <script type="module" src="dist/shoelace.js"></script>
        <script type="module" src="${testFramework}"></script>
      </body>
    </html>
  `,
@kaiszybiak kaiszybiak added the bug Things that aren't working right in the library. label Apr 8, 2022
@claviska
Copy link
Member

claviska commented Apr 8, 2022

Good call. Thanks for the suggestion!

@kaiszybiak
Copy link
Author

Good call. Thanks for the suggestion!

This was fast. Thanks 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

No branches or pull requests

2 participants