Skip to content

Commit

Permalink
Merge branch 'main' into migration-smoke-test
Browse files Browse the repository at this point in the history
merge from main
  • Loading branch information
hadobe committed Feb 7, 2025
2 parents 8cb560d + 36f1db2 commit ec917fe
Show file tree
Hide file tree
Showing 67 changed files with 1,561 additions and 404 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bacom.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bacom.milolibs.run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/blog.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/caas.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cc.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
HLX_TKN: ${{ secrets.HLX_TKN }}
SLACK_WH: ${{ secrets.SLACK_WH }}
- name: Nala Reporting
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/express.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/feds.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helpx.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
HLX_TKN: ${{ secrets.HLX_TKN }}
SLACK_WH: ${{ secrets.SLACK_WH }}
- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/milo.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
HLX_TKN: ${{ secrets.HLX_TKN }}
SLACK_WH: ${{ secrets.SLACK_WH }}
- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/milolib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
HLX_TKN: ${{ secrets.HLX_TKN }}
SLACK_WH: ${{ secrets.SLACK_WH }}
- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/run-screendiff.yml
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}}
2 changes: 1 addition & 1 deletion .github/workflows/saucelabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/self.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
HLX_TKN: ${{ secrets.HLX_TKN }}
SLACK_WH: ${{ secrets.SLACK_WH }}
- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/uar.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: echo "The workflow name is $WORKFLOW_NAME"

- name: Persist JSON Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: nala-results
Expand Down
5 changes: 2 additions & 3 deletions .kodiak/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ notifications:
project: MWPW # Mandatory
filters:
include:
risk_rating: R5
risk_rating: R3
fields:
assignee:
name: nateekar
customfield_11800: MWPW-140779 #epic link
customfield_11800: MWPW-164516 #epic link
watchers:
- casalino
- mauchley
labels:
- "OriginatingProcess=Kodiak"
- "security"
Expand Down
18 changes: 13 additions & 5 deletions configs/bacom-blog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@ const config = {
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']]
: [['html', {
outputFolder: 'test-html-results',
open: 'never',
}], ['list'], ['./utils/reporters/base-reporter.js']],
? [['github'], ['list'], ['../utils/reporters/base-reporter.js']]
: [
[
'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). */
Expand Down
2 changes: 1 addition & 1 deletion configs/graybox-bacom.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const config = {
name: 'bacom-live-chrome',
use: {
...devices['Desktop Chrome'],
baseURL: envs['@bacom_graybox'],
baseURL: envs['@graybox_bacom'],
},
},
{
Expand Down
80 changes: 80 additions & 0 deletions configs/graybox-cc.config.js
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;
80 changes: 80 additions & 0 deletions configs/graybox-homepage.config.js
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;
Loading

0 comments on commit ec917fe

Please sign in to comment.