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

[TEST] Add automatic bundle tests #1010

Merged
merged 9 commits into from
Jan 13, 2021

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Jan 7, 2021

We now have a way to check that bundles are generated and the GitHub workflow
checks this each time the build is run.
This test shows that, in 64aa112, we have removed by mistake the CommonJS and ESM
bundles generation.

For the IIFE bundle, we also ensure that a test page using the bundle is able to display
a BPMN diagram. The utils code checking the generated SVG is shared with end-to-end tests.
The test is very fast: it doesn't need a dev server to run, the slower part is
the puppeteer startup.
Adding test has also shown that this page hasn't been migrated correctly when the GlobalOptions
have been refactored in 6335a53.

closes #600

@tbouffard tbouffard added chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first labels Jan 7, 2021
@tbouffard tbouffard force-pushed the 600-add_automatic_tests_for_iife_bundle branch from 002222b to 0343687 Compare January 12, 2021 13:54
@tbouffard tbouffard removed the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Jan 12, 2021
Ensure that a page using the bundle is able to display a BPMN diagram.
The utils code checking the generated SVG is shared with end-to-end tests.

The test is very fast: it doesn't need a dev server to run, the slower part is
the puppeteer startup.
Avoid too much workflow

This reverts commit 8b94542
@tbouffard tbouffard force-pushed the 600-add_automatic_tests_for_iife_bundle branch from 0343687 to 75746a3 Compare January 12, 2021 14:12
@tbouffard tbouffard requested review from a team, csouchet and aibcmars and removed request for a team January 12, 2021 14:12
@tbouffard tbouffard marked this pull request as ready for review January 12, 2021 14:12
@tbouffard tbouffard marked this pull request as draft January 12, 2021 14:31
@tbouffard tbouffard changed the title [TEST] Add IIFE bundle tests [TEST] Add automatic bundle tests Jan 12, 2021
@tbouffard tbouffard marked this pull request as ready for review January 12, 2021 15:33
@@ -115,7 +115,7 @@ if (!buildBundles) {
{ file: pkg.main, format: 'cjs' },
],
};
rollupConfigs = [configIIFE, configIIFEMinified];
rollupConfigs = [configIIFE, configIIFEMinified, configBundles, configBundlesMinified];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member Author

@tbouffard tbouffard Jan 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I removed the other bundles to speedup the generation while testing the new minified IIFE bundle, and we didn't notice the removal 😈

Copy link
Contributor

@aibcmars aibcmars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done :)

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tbouffard tbouffard merged commit 5f730c0 into master Jan 13, 2021
@tbouffard tbouffard deleted the 600-add_automatic_tests_for_iife_bundle branch January 13, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[INFRA] Add automatic tests using the bundles
2 participants