Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Fix and Validate bundle #399

Open
patrickhaug opened this issue Feb 19, 2021 · 4 comments · Fixed by #471
Open

Fix and Validate bundle #399

patrickhaug opened this issue Feb 19, 2021 · 4 comments · Fixed by #471
Assignees
Labels
bug Something isn't working
Projects

Comments

@patrickhaug
Copy link
Contributor

patrickhaug commented Feb 19, 2021

Various process.env references made its way in the bundle in the last release, for example when including a package via CDN and its esm bundle. we need to make sure, that all env references get replaced during build and afterwards we have to verify that said include works. So for core-components for example, this served html code (located in root of core-components):

<!DOCTYPE html>
<html lang="en">
  <head>
    <script
      type="module"
      src="./web-components/corejam-core-components/corejam-core-components.esm.js"
    ></script>
  </head>
  <body>
    <corejam-box>hallo</corejam-box>
  </body>
</html>

should not throw a js error.

@mattvb91 mattvb91 self-assigned this Feb 19, 2021
@mattvb91 mattvb91 added the bug Something isn't working label Feb 19, 2021
@mattvb91 mattvb91 added this to To do in Corejam 1.0 via automation Feb 19, 2021
@mattvb91
Copy link
Member

We still need to build a test to validate this works, cypress still has a few open issues in order to check for uncaught promise exceptions so I can't test the above yet but as soon as its possible we need the cypress tests to validate the bundle

@mattvb91 mattvb91 reopened this Mar 13, 2021
@patrickhaug
Copy link
Contributor Author

So what is your test approach with cypress?

@mattvb91
Copy link
Member

It would just be to build each plugin and then use the above html snippet to call the appropriate entry point esm.js and in cypress we just need to boot and visit that page and check there is no uncaught promises thrown & that we can see the sample "hello" corejam-box rendered that should be enough to validate it on a high level

@mattvb91
Copy link
Member

Although saying that, i havent checked the latest cypress release yet so the issues may actually be solved so we can do that now. ill take a look again

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Corejam 1.0
  
To do
Development

Successfully merging a pull request may close this issue.

2 participants