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

Not running remote asset tests on PR builds and fixing integration tests #43

Merged
merged 2 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- run: npm run build
- run: npm run test:integration
env:
CYPRESS_ENVIRONMENT: staging
INTEGRATION_TEST_CLIENT_ID: ${{ secrets.INTEGRATION_TEST_CLIENT_ID }}
INTEGRATION_TEST_API_KEY: ${{ secrets.INTEGRATION_TEST_API_KEY }}
INTEGRATION_TEST_API_HOST: ${{ secrets.INTEGRATION_TEST_API_HOST }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<title>MX Web Widget SDK UMD Integration Test</title>

<script
src="https://unpkg.com/@mxenabled/web-widget-sdk@0.0.3/dist/umd/index.min.js"
integrity="sha384-uhHDrkG77LXNS/+7BaxWyXdz1fqinSJ7KvICzCjZzJC43MgkEPJFTlLXl+l8S2zf"
src="https://unpkg.com/@mxenabled/web-widget-sdk@0.0.6/dist/umd/index.min.js"
integrity="sha384-5FTG5BiEZ7icBHtzF4eRM/9TOLPblMBMRmcOzF0hRdck09jXQ8bmxjcQZKBuLA82"
crossorigin="anonymous"
></script>

Expand Down
10 changes: 8 additions & 2 deletions cypress/integration/widget_test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
const tests = {
let tests: Record<string, string> = {
"amd (local)": "Widget SDK loaded via local AMD module",
"cjs (local)": "Widget SDK loaded via local CommonJs module",
"es (local)": "Widget SDK loaded via local ES module",
// "umd (cdn)": "Widget SDK loaded via UMD module from CDN",
"umd (local)": "Widget SDK loaded via local UMD module",
}

if (Cypress.env("ENVIRONMENT") !== "staging") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

tests = {
...tests,
"umd (remote)": "Widget SDK loaded via remote UMD module",
}
}

Object.keys(tests).forEach((testFile) => {
describe(tests[testFile], () => {
beforeEach(() => {
Expand Down