-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into migration-smoke-test
merge from main
- Loading branch information
Showing
67 changed files
with
1,561 additions
and
404 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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Run ScreenDiff Manually | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
category: | ||
description: 'Test category to run (leave empty to run all, or specify one: milo,feds,caas,uar,uar-ai)' | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
test-matrix: | ||
name: Running ${{ inputs.category }} tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- platform: macos-latest | ||
categories: ["milo","feds","caas","uar","uar-ai"] | ||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Run Nala | ||
run: | | ||
if [ -n "${{ inputs.category }}" ]; then | ||
bash runScreenDiff.sh ${{ inputs.category }} | ||
else | ||
for category in ${{ join(matrix.categories, ' ') }}; do | ||
bash runScreenDiff.sh $category | ||
done | ||
fi | ||
shell: bash | ||
env: | ||
IMS_EMAIL: ${{ secrets.IMS_EMAIL }} | ||
IMS_PASS: ${{ secrets.IMS_PASS }} | ||
HLX_TKN: ${{ secrets.HLX_TKN }} | ||
SLACK_WH: ${{ secrets.SLACK_WH }} | ||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | ||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | ||
AWS_ROLE_ARN: ${{secrets.AWS_ROLE_ARN}} |
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
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
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
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,80 @@ | ||
// @ts-check | ||
const { devices } = require('@playwright/test'); | ||
|
||
const envs = require('../envs/envs.js'); | ||
|
||
/** | ||
* @see https://playwright.dev/docs/test-configuration | ||
* @type {import('@playwright/test').PlaywrightTestConfig} | ||
*/ | ||
const config = { | ||
testDir: '../tests/', | ||
testMatch: ['cc/**/*.test.js', 'milo/**/*.test.js', 'graybox/**/*.test.js'], | ||
outputDir: '../test-results', | ||
/* Maximum time one test can run for. */ | ||
timeout: 45 * 1000, | ||
expect: { | ||
/** | ||
* Maximum time expect() should wait for the condition to be met. | ||
* For example in `await expect(locator).toHaveText();` | ||
*/ | ||
timeout: 10 * 1000, | ||
}, | ||
/* Run tests in files in parallel */ | ||
fullyParallel: true, | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, | ||
/* Retry on CI only */ | ||
retries: process.env.CI ? 2 : 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: process.env.CI ? 2 : undefined, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: process.env.CI | ||
? [['github'], ['list'], ['../utils/reporters/base-reporter.js'], ['json', { outputFile: '../test-json-results/test-results.json' }]] | ||
: [ | ||
[ | ||
'html', | ||
{ | ||
outputFolder: 'test-html-results', | ||
open: 'never', | ||
}, | ||
], | ||
['list'], | ||
['../utils/reporters/base-reporter.js'], | ||
['json', { outputFile: '../test-json-results/test-results.json' }], | ||
], | ||
|
||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ | ||
actionTimeout: 60000, | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
// baseURL: 'http://localhost:3000', | ||
|
||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
trace: 'on-first-retry', | ||
baseURL: | ||
process.env.BASE_URL | ||
|| envs['@graybox_dc'] | ||
|| 'https://main--cc--adobecom.hlx.live', | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: 'cc-live-chrome', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: envs['@graybox_cc'], | ||
}, | ||
}, | ||
{ | ||
name: 'cc-stage-chrome', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: envs['@adobe_stage'], | ||
}, | ||
}, | ||
], | ||
}; | ||
module.exports = config; |
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,80 @@ | ||
// @ts-check | ||
const { devices } = require('@playwright/test'); | ||
|
||
const envs = require('../envs/envs.js'); | ||
|
||
/** | ||
* @see https://playwright.dev/docs/test-configuration | ||
* @type {import('@playwright/test').PlaywrightTestConfig} | ||
*/ | ||
const config = { | ||
testDir: '../tests/', | ||
testMatch: ['dc/**/*.test.js', 'milo/**/*.test.js', 'graybox/**/*.test.js'], | ||
outputDir: '../test-results', | ||
/* Maximum time one test can run for. */ | ||
timeout: 45 * 1000, | ||
expect: { | ||
/** | ||
* Maximum time expect() should wait for the condition to be met. | ||
* For example in `await expect(locator).toHaveText();` | ||
*/ | ||
timeout: 10 * 1000, | ||
}, | ||
/* Run tests in files in parallel */ | ||
fullyParallel: true, | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, | ||
/* Retry on CI only */ | ||
retries: process.env.CI ? 2 : 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: process.env.CI ? 2 : undefined, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: process.env.CI | ||
? [['github'], ['list'], ['../utils/reporters/base-reporter.js'], ['json', { outputFile: '../test-json-results/test-results.json' }]] | ||
: [ | ||
[ | ||
'html', | ||
{ | ||
outputFolder: 'test-html-results', | ||
open: 'never', | ||
}, | ||
], | ||
['list'], | ||
['../utils/reporters/base-reporter.js'], | ||
['json', { outputFile: '../test-json-results/test-results.json' }], | ||
], | ||
|
||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ | ||
actionTimeout: 60000, | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
// baseURL: 'http://localhost:3000', | ||
|
||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
trace: 'on-first-retry', | ||
baseURL: | ||
process.env.BASE_URL | ||
|| envs['@graybox_homepage'] | ||
|| 'https://www.stage.adobe.com', | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: 'homepage-live-chrome', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: envs['@graybox_homepage'], | ||
}, | ||
}, | ||
{ | ||
name: 'homepage-stage-chrome', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: envs['@adobe_stage'], | ||
}, | ||
}, | ||
], | ||
}; | ||
module.exports = config; |
Oops, something went wrong.