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

Functional Tests : Added 8.2.0 #289

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
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
6 changes: 5 additions & 1 deletion .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
PHP_VERSION: '8.1'
- PS_VERSION: '8.1.7'
PHP_VERSION: '8.1'
- PS_VERSION: '8.2.0'
PHP_VERSION: '8.1'
- PS_VERSION: '9.0.x'
PHP_VERSION: '8.2'
- PS_VERSION: 'nightly'
Expand Down Expand Up @@ -77,7 +79,7 @@ jobs:

- name: Run Playwright tests
working-directory: tests/UI/
run: npx playwright test
run: npx playwright test campaigns/03_frontOffice/02_products/01_addProductToList.spec.ts

- name: Upload artifact report
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -114,6 +116,8 @@ jobs:
PHP_VERSION: '8.1'
- PS_VERSION: '8.1.7'
PHP_VERSION: '8.1'
- PS_VERSION: '8.2.0'
PHP_VERSION: '8.1'
- PS_VERSION: '9.0.x'
PHP_VERSION: '8.2'
- PS_VERSION: 'nightly'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,26 @@ test.describe('Wishlist module - Add a product to a list', async () => {
let page: Page;
let wishlistName: string;

test.beforeAll(async ({ browser }) => {
test.beforeAll(async ({ browser }, testInfo) => {
browserContext = await browser.newContext();
page = await browserContext.newPage();
});
test.afterAll(async () => {
page = await browser.newPage({
recordVideo: {
dir: testInfo.outputPath('videos'),
}
});
});
test.afterAll(async ({}, testInfo) => {
const videoPath = testInfo.outputPath('my-video.webm');
await Promise.all([
page.video()!.saveAs(videoPath),
page.close()
]);
testInfo.attachments.push({
name: 'video',
path: videoPath,
contentType: 'video/webm'
});

await page.close();
});

Expand Down
3 changes: 2 additions & 1 deletion tests/UI/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Capture screenshot after each test failure */
screenshot: 'only-on-failure',
screenshot: 'on',
video: 'on',
},

/* Configure projects for major browsers */
Expand Down
Loading