From f0dcd196da1186f2e9326902ec389b7f7cde8f2d Mon Sep 17 00:00:00 2001 From: Mariia Lukianets Date: Mon, 23 Dec 2024 14:40:46 +0100 Subject: [PATCH] chrome single test --- nala/studio/studio.test.js | 112 ++++++++++++++++++------------------- nala/utils/pr.run.sh | 3 +- 2 files changed, 58 insertions(+), 57 deletions(-) diff --git a/nala/studio/studio.test.js b/nala/studio/studio.test.js index 12db3d22..da38f9e8 100644 --- a/nala/studio/studio.test.js +++ b/nala/studio/studio.test.js @@ -50,66 +50,66 @@ test.describe('M@S Studio feature test suite', () => { }); }); - // @studio-search-field - Validate search field in mas studio - test(`${features[1].name},${features[1].tags}`, async ({ - page, - baseURL, - }) => { - const { data } = features[1]; - const testPage = `${baseURL}${features[1].path}${miloLibs}${features[1].browserParams}`; - console.info('[Test Page]: ', testPage); + // // @studio-search-field - Validate search field in mas studio + // test(`${features[1].name},${features[1].tags}`, async ({ + // page, + // baseURL, + // }) => { + // const { data } = features[1]; + // const testPage = `${baseURL}${features[1].path}${miloLibs}${features[1].browserParams}`; + // console.info('[Test Page]: ', testPage); - await test.step('step-1: Go to MAS Studio test page', async () => { - await page.goto(testPage); - await page.waitForLoadState('domcontentloaded'); - }); + // await test.step('step-1: Go to MAS Studio test page', async () => { + // await page.goto(testPage); + // await page.waitForLoadState('domcontentloaded'); + // }); - await test.step('step-2: Validate search field rendered', async () => { - await expect(await studio.searchInput).toBeVisible(); - await expect(await studio.searchIcon).toBeVisible(); - await expect(await studio.renderView).toBeVisible(); - const cards = await studio.renderView.locator('merch-card'); - expect(await cards.count()).toBeGreaterThan(1); - }); + // await test.step('step-2: Validate search field rendered', async () => { + // await expect(await studio.searchInput).toBeVisible(); + // await expect(await studio.searchIcon).toBeVisible(); + // await expect(await studio.renderView).toBeVisible(); + // const cards = await studio.renderView.locator('merch-card'); + // expect(await cards.count()).toBeGreaterThan(1); + // }); - await test.step('step-3: Validate search feature', async () => { - await studio.searchInput.fill(data.cardid); - await page.keyboard.press('Enter'); - await page.waitForTimeout(2000); - expect(await studio.getCard(data.cardid, 'suggested')).toBeVisible; - const searchResult = await studio.renderView.locator('merch-card'); - expect(await searchResult.count()).toBe(1); - }); - }); + // await test.step('step-3: Validate search feature', async () => { + // await studio.searchInput.fill(data.cardid); + // await page.keyboard.press('Enter'); + // await page.waitForTimeout(2000); + // expect(await studio.getCard(data.cardid, 'suggested')).toBeVisible; + // const searchResult = await studio.renderView.locator('merch-card'); + // expect(await searchResult.count()).toBe(1); + // }); + // }); - // @studio-edit-title - Validate edit title feature in mas studio - test(`${features[2].name},${features[2].tags}`, async ({ - page, - baseURL, - }) => { - const { data } = features[2]; - const testPage = `${baseURL}${features[2].path}${miloLibs}${features[2].browserParams}${data.cardid}`; - console.info('[Test Page]: ', testPage); + // // @studio-edit-title - Validate edit title feature in mas studio + // test(`${features[2].name},${features[2].tags}`, async ({ + // page, + // baseURL, + // }) => { + // const { data } = features[2]; + // const testPage = `${baseURL}${features[2].path}${miloLibs}${features[2].browserParams}${data.cardid}`; + // console.info('[Test Page]: ', testPage); - await test.step('step-1: Go to MAS Studio test page', async () => { - await page.goto(testPage); - await page.waitForLoadState('domcontentloaded'); - }); + // await test.step('step-1: Go to MAS Studio test page', async () => { + // await page.goto(testPage); + // await page.waitForLoadState('domcontentloaded'); + // }); - await test.step('step-2: Open card editor', async () => { - expect(await studio.getCard(data.cardid, 'suggested')).toBeVisible; - await (await studio.getCard(data.cardid, 'suggested')).dblclick(); - expect(await studio.editorPanel).toBeVisible; - }); - await test.step('step-3: Edit title field', async () => { - expect(await studio.editorPanel.title).toBeVisible; - await expect( - await studio.editorPanel.locator(studio.editorTitle), - ).toHaveAttribute('value', `${data.title}`); - await studio.editorPanel - .locator(studio.editorTitle) - .locator('input') - .fill(data.newTitle); - }); - }); + // await test.step('step-2: Open card editor', async () => { + // expect(await studio.getCard(data.cardid, 'suggested')).toBeVisible; + // await (await studio.getCard(data.cardid, 'suggested')).dblclick(); + // expect(await studio.editorPanel).toBeVisible; + // }); + // await test.step('step-3: Edit title field', async () => { + // expect(await studio.editorPanel.title).toBeVisible; + // await expect( + // await studio.editorPanel.locator(studio.editorTitle), + // ).toHaveAttribute('value', `${data.title}`); + // await studio.editorPanel + // .locator(studio.editorTitle) + // .locator('input') + // .fill(data.newTitle); + // }); + // }); }); diff --git a/nala/utils/pr.run.sh b/nala/utils/pr.run.sh index ef09c803..e2825c90 100644 --- a/nala/utils/pr.run.sh +++ b/nala/utils/pr.run.sh @@ -73,7 +73,8 @@ npx playwright install --with-deps # Run Playwright tests on the specific projects using root-level playwright.config.js # This will be changed later echo "*** Running tests on specific projects ***" -npx playwright test --config=./playwright.config.js ${TAGS} ${EXCLUDE_TAGS} --project=mas-live-chromium --project=mas-live-firefox ${REPORTER} || EXIT_STATUS=$? +npx playwright test --config=./playwright.config.js ${TAGS} ${EXCLUDE_TAGS} --project=mas-live-chromium ${REPORTER} || EXIT_STATUS=$? +#npx playwright test --config=./playwright.config.js ${TAGS} ${EXCLUDE_TAGS} --ui --project=mas-live-chromium ${REPORTER} || EXIT_STATUS=$? # Check if tests passed or failed if [ $EXIT_STATUS -ne 0 ]; then