-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1e0734
commit 375e236
Showing
9 changed files
with
241 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export BROWSERSTACK_USERNAME="etidwell_MODuZE" | ||
export BROWSERSTACK_ACCESS_KEY="xhvfXLoLYtVfFLXRPbwu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# This job is to test different maven profiles in sdk branch against full commit-id provided | ||
# This workflow targets Playwright execution | ||
|
||
name: NodeJS SDK Test workflow on workflow_dispatch | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit_sha: | ||
description: 'The full commit id to build' | ||
required: true | ||
package_url: | ||
description: 'Staging package url' | ||
required: false | ||
|
||
jobs: | ||
comment-run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 3 | ||
matrix: | ||
node: ['14', '16', '18', '20'] | ||
os: [ macos-latest, windows-latest, ubuntu-latest ] | ||
name: NodeJS Playwright Repo ${{ matrix.node }} - ${{ matrix.os }} Sample | ||
env: | ||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
PACKAGE_URL: ${{ github.event.inputs.package_url }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.commit_sha }} | ||
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 | ||
id: status-check-in-progress | ||
env: | ||
job_name: NodeJS Playwright Repo ${{ matrix.node }} - ${{ matrix.os }} Sample | ||
commit_sha: ${{ github.event.inputs.commit_sha }} | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
const result = await github.rest.checks.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: process.env.job_name, | ||
head_sha: process.env.commit_sha, | ||
status: 'in_progress' | ||
}).catch((err) => ({status: err.status, response: err.response})); | ||
console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) | ||
if (result.status !== 201) { | ||
console.log('Failed to create check run') | ||
} | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Setup staging npm package | ||
if: ${{ github.event.inputs.package_url != '' }} | ||
run: | | ||
echo 'Publishing tar.gz to local registry' | ||
curl -o staging_package.tgz "$PACKAGE_URL" | ||
npm install verdaccio -g | ||
verdaccio & | ||
npm config set registry http://localhost:4873 | ||
npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e [email protected] -r http://localhost:4873 | ||
npm publish staging_package.tgz --registry http://localhost:4873/ | ||
shell: bash | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run sample tests | ||
run: npm run sample-test | ||
|
||
- name: Run local tests | ||
run: npm run sample-local-test | ||
|
||
- if: always() | ||
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 | ||
id: status-check-completed | ||
env: | ||
conclusion: ${{ job.status }} | ||
job_name: NodeJS Playwright Repo ${{ matrix.node }} - ${{ matrix.os }} Sample | ||
commit_sha: ${{ github.event.inputs.commit_sha }} | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
const result = await github.rest.checks.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: process.env.job_name, | ||
head_sha: process.env.commit_sha, | ||
status: 'completed', | ||
conclusion: process.env.conclusion | ||
}).catch((err) => ({status: err.status, response: err.response})); | ||
console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) | ||
if (result.status !== 201) { | ||
console.log('Failed to create check run') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
import { messageTest } from '../../../pages/messages_fixture'; | ||
|
||
messageTest.describe('@US Long Term', () => { | ||
messageTest('US Message long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US Message long term non qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_LONG_TERM', amount: 29, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIFrame = await loadMessage(); | ||
await runAxeCoreScan(messageIFrame); | ||
await messageAxeCoreScan(messageIFrame); | ||
}); | ||
messageTest('US Message long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US Message long term qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_LONG_TERM', amount: 100, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIFrame = await loadMessage(); | ||
await runAxeCoreScan(messageIFrame); | ||
await messageAxeCoreScan(messageIFrame); | ||
}); | ||
messageTest('US Message long term checkout', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US Message long term checkout', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_LONG_TERM_CHECKOUT', amount: 100, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIFrame = await loadMessage(); | ||
await runAxeCoreScan(messageIFrame); | ||
await messageAxeCoreScan(messageIFrame); | ||
}); | ||
}); | ||
messageTest.describe('@DE Long Term', () => { | ||
messageTest('DE Message long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE Message long term qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_LONG_TERM', amount: 100, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIFrame = await loadMessage(); | ||
await runAxeCoreScan(messageIFrame); | ||
await messageAxeCoreScan(messageIFrame); | ||
}); | ||
messageTest('DE Message long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE Message long term non qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_LONG_TERM', amount: 29, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIFrame = await loadMessage(); | ||
await runAxeCoreScan(messageIFrame); | ||
await messageAxeCoreScan(messageIFrame); | ||
}); | ||
messageTest('DE Message long term 0APR non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE Message long term 0APR non qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_LONG_TERM_0APR', amount: 29, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIFrame = await loadMessage(); | ||
await runAxeCoreScan(messageIFrame); | ||
await messageAxeCoreScan(messageIFrame); | ||
}); | ||
messageTest('DE Message long term 0APR qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE Message long term 0APR qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_LONG_TERM_0APR', amount: 100, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIFrame = await loadMessage(); | ||
await runAxeCoreScan(messageIFrame); | ||
await messageAxeCoreScan(messageIFrame); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,57 @@ | ||
import { messageTest } from '../../../pages/messages_fixture'; | ||
|
||
messageTest.describe('@US Multi Messages', () => { | ||
messageTest('US long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US long term non qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_MULTI', amount: 20001, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
|
||
messageTest('US long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US long term qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_MULTI', amount: 1501, offer: 'PAY_LATER_LONG_TERM' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
|
||
messageTest('US product list', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US product list', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_MULTI', amount: 200, offer: '' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
|
||
messageTest('US short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US short term non qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_MULTI', amount: 29, offer: 'PAY_LATER_SHORT_TERM' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
|
||
messageTest('US short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('US short term qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_US_MULTI', amount: 200, offer: 'PAY_LATER_SHORT_TERM' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
}); | ||
|
||
messageTest.describe('@DE Multi Messages', () => { | ||
messageTest('DE multi qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE multi qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_MULTI', amount: 200, offer: 'PAY_LATER_SHORT_TERM' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
|
||
messageTest('DE multi non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE multi non qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_MULTI', amount: 29, offer: 'PAY_LATER_SHORT_TERM' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
messageTest('DE pay in 1 qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE pay in 1 qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_PAY_IN_1', amount: 200, offer: 'PAY_LATER_PAY_IN_1' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
messageTest('DE pay in 1 non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => { | ||
messageTest('DE pay in 1 non qualifying', async ({ navigatePage, loadMessage, messageAxeCoreScan }) => { | ||
await navigatePage({ account: 'DEV_DE_PAY_IN_1', amount: 1001.1, offer: 'PAY_LATER_PAY_IN_1' }); | ||
const messageIframe = await loadMessage(); | ||
await runAxeCoreScan(messageIframe); | ||
await messageAxeCoreScan(messageIframe); | ||
}); | ||
}); |
Oops, something went wrong.