-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
* check Express pages are up * check Express pages are up 2 * add firefox option * use expect.soft * restoring package-lock.json version * revert package-lock.json * add express tag * fix lint errors --------- Co-authored-by: Haris Bijli <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Express Nala Daily Run | ||
|
||
on: | ||
schedule: | ||
- cron: '0 16 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
platform_matrix: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
name: Running tests | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
WORKFLOW_NAME: 'Express Nala Daily Run' | ||
DAILY_RUN: 'true' | ||
|
||
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 ${{ matrix.os }} | ||
run: bash dailyrun.sh express | ||
env: | ||
IMS_EMAIL: ${{ secrets.IMS_EMAIL }} | ||
IMS_PASS: ${{ secrets.IMS_PASS }} | ||
HLX_TKN: ${{ secrets.HLX_TKN }} | ||
SLACK_WH: ${{ secrets.SLACK_WH }} | ||
|
||
- name: Display workflow name | ||
run: echo "The workflow name is $WORKFLOW_NAME" | ||
|
||
- name: Persist JSON Artifact | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: nala-results | ||
path: nala-results.json | ||
retention-days: 30 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
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/express', | ||
outputDir: '../test-results', | ||
globalSetup: '../global.setup.js', | ||
/* Maximum time one test can run for. */ | ||
timeout: 30 * 1000, | ||
expect: { | ||
/** | ||
* Maximum time expect() should wait for the condition to be met. | ||
* For example in `await expect(locator).toHaveText();` | ||
*/ | ||
timeout: 5000, | ||
}, | ||
/* 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 ? 1 : 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: process.env.CI ? 4 : 3, | ||
/* Reporter to use. */ | ||
reporter: process.env.CI | ||
? [['github'], ['list'], ['../utils/reporters/base-reporter.js']] | ||
: [['html', { outputFolder: 'test-html-results' }], ['list'], ['../utils/reporters/base-reporter.js']], | ||
/* 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, | ||
|
||
trace: 'on-first-retry', | ||
// eslint-disable-next-line max-len | ||
baseURL: envs['@express_live'] || 'https://main--express--adobecom.hlx.live', | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: 'express-live-chromium', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: envs['@express_live'], | ||
}, | ||
}, | ||
|
||
{ | ||
name: 'express-live-firefox', | ||
use: { | ||
...devices['Desktop Firefox'], | ||
baseURL: envs['@express_live'], | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
module.exports = { | ||
name: 'Important Express pages', | ||
features: [ | ||
{ | ||
tcid: '0', | ||
name: '@express-imp-pages', | ||
path: [ | ||
'', | ||
'create/story/instagram', | ||
'create/video/instagram/reel', | ||
'create/post/instagram', | ||
'create/video/tiktok', | ||
'create/story/facebook', | ||
'create/post/facebook', | ||
'create/video/youtube', | ||
'create/thumbnail/youtube', | ||
'create/banner/youtube', | ||
'create/meme', | ||
'create/poster', | ||
'create/brochure', | ||
'create/invitation', | ||
'create/menu', | ||
'create/card', | ||
'create/certificate', | ||
'create/resume', | ||
'create/invoice', | ||
'feature/image/qr-code-generator', | ||
'create/print/flyer', | ||
'create/print/poster', | ||
'create/print/card', | ||
'create/print/invitation', | ||
'create/print/business-card', | ||
'create/print/t-shirt', | ||
'print', | ||
'feature/content-scheduler', | ||
'create/business-card', | ||
'create/flyer', | ||
'create/logo', | ||
'create/advertisement', | ||
'create/photo-collage', | ||
'create/presentation', | ||
'create/profile-picture', | ||
'create', | ||
'feature/image/editor', | ||
'feature/video/editor', | ||
'templates', | ||
'feature/image/remove-background', | ||
'feature/image/resize', | ||
'feature/image/convert/png-to-jpg', | ||
'feature/image/convert/jpg-to-png', | ||
'feature/image/convert/jpg-to-svg', | ||
'feature/image/crop', | ||
'feature/video/convert/video-to-gif', | ||
'feature/video/crop', | ||
'feature/video/trim', | ||
'feature/video/resize', | ||
'feature/video/merge', | ||
'feature/video/convert/mp4', | ||
'feature/video/animate/audio', | ||
'feature/video/add-caption', | ||
'feature', | ||
'feature/video/remove-background', | ||
'business/teams', | ||
'business', | ||
'nonprofits', | ||
'entitled', | ||
'business#sales-contact-form-1', | ||
'#open-jarvis-chat', | ||
'learn/students', | ||
'pricing', | ||
|
||
], | ||
tags: '@regression @express', | ||
}, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { features } from '../../features/express/important-pages.spec.js'; | ||
|
||
test.describe('Verify pages are up', () => { | ||
for (const path of features[0].path) { | ||
test(`${features[0].name},${path} ${features[0].tags}`, async ({ page, baseURL }) => { | ||
await test.step('Verify response', async () => { | ||
const response = await page.goto(`${baseURL}${path}`, { waitUntil: 'domcontentloaded' }); | ||
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (ubuntu-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (ubuntu-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (ubuntu-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (ubuntu-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (macos-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (macos-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (macos-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
Check failure on line 8 in tests/express/check-important-pages.test.js GitHub Actions / Running tests (macos-latest)[express-live-chromium] › check-important-pages.test.js:6:9 › Verify pages are up › @express-imp-pages
|
||
const statusCode = response.status(); | ||
expect.soft(statusCode).toBe(200); | ||
console.info(`HTTP Status Code: ${statusCode}`); | ||
}); | ||
}); | ||
} | ||
}); |