ncc-erp / ncc-erp-workflow-w2-e2e

0 stars 0 forks source link

update ci config #5

Closed thiendangncc closed 2 months ago

thiendangncc commented 2 months ago
Testomat.io Report 🔴 TEST FAILED
Tests ✔️ 35 tests run
Summary 🔴 3 failed; 🟢 27 passed; 🟡 5 skipped
Duration 🕐 18 minutes, 38 seconds
Testomat.io Report 📊 Run #ac5fb75e
Job 🗂️ Playwright Tests / test
Operating System 🖥️ Linux X64

🟥 Failures (3)

#### 🔴 As user, when PM, Current/Destination HoO approve successfully @user: **I should see the request with approve status on my tasks** > [31mTest timeout of 120000ms exceeded while running "beforeEach" hook.[39m ```diff ################[ Steps ]################ Before Hooks 120005ms beforeEach hook 120003ms browser.newContext 85ms browserContext.newPage 66ms page.goto(/request-templates) 1185ms expect.toHaveURL 56ms locator.getByRole('row', { name: 'Change Office Request' }).getByLabel('Popup modal').click 433ms locator.click(body >> internal:testid=[data-testid="CurrentOffice"s]) 240ms locator.click(body >> internal:testid=[data-testid="CurrentOffice"s] >> internal:text="Đà Nẵng"s) 182ms locator.click(body >> internal:testid=[data-testid="DestinationOffice"s]) 93ms locator.click(body >> internal:testid=[data-testid="DestinationOffice"s] >> internal:text="Vinh"s) 92ms locator.fill(body >> internal:testid=[data-testid="Content"s] >> textarea) 68ms locator.fill(body >> internal:testid=[data-testid="StartDate"s] >> input) 175ms locator.click(body >> internal:testid=[data-testid="StartDate"s] >> [aria-selected="true"]) 136ms locator.fill(body >> internal:testid=[data-testid="EndDate"s] >> input) 79ms locator.click(body >> internal:testid=[data-testid="EndDate"s] >> [aria-selected="true"]) 160ms locator.click(body >> internal:role=button[name="Save"i]) 158ms page.waitForResponse 7627ms browserContext.close 7ms browser.newContext 78ms browserContext.newPage 45ms page.goto(/tasks) 1555ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 19464ms locator.click(body >> internal:role=button[name="Approve"i]) 1865ms locator.click(body >> internal:role=button[name="Confirm"i]) 550ms page.waitForResponse 1311ms locator.waitFor(body) 160ms locator.count(.chakra-skeleton) 7ms locator.waitFor(.chakra-skeleton >> nth=0) 63ms locator.waitFor(.chakra-skeleton >> nth=0) 24366ms page.waitForTimeout 249ms expect.toContainText 57ms expect.toContainText 43ms expect.toContainText 35ms browserContext.close 6ms browser.newContext 85ms browserContext.newPage 80ms page.goto(/tasks) 1612ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 17912ms locator.click(body >> internal:role=button[name="Approve"i]) 527ms locator.click(body >> internal:role=button[name="Confirm"i]) 341ms page.waitForResponse 353ms locator.waitFor(body) 133ms locator.count(.chakra-skeleton) 4ms locator.waitFor(.chakra-skeleton >> nth=0) 28ms locator.waitFor(.chakra-skeleton >> nth=0) 12016ms page.waitForTimeout 230ms expect.toContainText 31ms expect.toContainText 40ms expect.toContainText 32ms browserContext.close 8ms browser.newContext 94ms browserContext.newPage 75ms page.goto(/tasks) 1782ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 19823ms locator.click(body >> internal:role=button[name="Approve"i]) 660ms locator.click(body >> internal:role=button[name="Confirm"i]) 381ms page.waitForResponse -1ms After Hooks 379ms Worker Cleanup 59ms fixture: browser 57ms ################[ Failure ]################ Test timeout of 120000ms exceeded while running "beforeEach" hook. 54 |}); 55 | 56 |test.describe("As user, I want to see a Change Office Request after PM, GDVP1, GDVP2 approved", () => { 57 | let dataNewRequest: ChangeOfficeRequestForm; 58 | test.use({ storageState: authUserFile }); // main context auth > 59 | test.beforeEach(async ({ browser }) => { 60 | await BrowserControl.withAuth(browser, authUserFile, async ({ PageObjects }) => { 61 | dataNewRequest = await userCreateChangeOfficeRequestSteps(PageObjects); 62 | }); 63 | // PM approve 64 | await BrowserControl.withAuth(browser, authPmFile, async ({ PageObjects }) => { at (/home/nccsoft/actions-runner1/_work/ncc-erp-workflow-w2-e2e/ncc-erp-workflow-w2-e2e/src/tests/e2e/changeOfficeRequest.spec.ts:59:8) ``` --- #### 🔴 As user, when PM, Current/Destination HoO approve successfully @user: **I should see the request with approve status on my tasks** > [31mTest timeout of 120000ms exceeded while running "beforeEach" hook.[39m ```diff ################[ Steps ]################ Before Hooks 120175ms beforeEach hook 120173ms fixture: browser 167ms browserType.launch 162ms browser.newContext 133ms browserContext.newPage 86ms page.goto(/request-templates) 1974ms expect.toHaveURL 60ms locator.getByRole('row', { name: 'Change Office Request' }).getByLabel('Popup modal').click 282ms locator.click(body >> internal:testid=[data-testid="CurrentOffice"s]) 275ms locator.click(body >> internal:testid=[data-testid="CurrentOffice"s] >> internal:text="Đà Nẵng"s) 124ms locator.click(body >> internal:testid=[data-testid="DestinationOffice"s]) 98ms locator.click(body >> internal:testid=[data-testid="DestinationOffice"s] >> internal:text="Vinh"s) 89ms locator.fill(body >> internal:testid=[data-testid="Content"s] >> textarea) 52ms locator.fill(body >> internal:testid=[data-testid="StartDate"s] >> input) 147ms locator.click(body >> internal:testid=[data-testid="StartDate"s] >> [aria-selected="true"]) 105ms locator.fill(body >> internal:testid=[data-testid="EndDate"s] >> input) 79ms locator.click(body >> internal:testid=[data-testid="EndDate"s] >> [aria-selected="true"]) 119ms locator.click(body >> internal:role=button[name="Save"i]) 127ms page.waitForResponse 5824ms browserContext.close 8ms browser.newContext 86ms browserContext.newPage 57ms page.goto(/tasks) 2046ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 17837ms locator.click(body >> internal:role=button[name="Approve"i]) 581ms locator.click(body >> internal:role=button[name="Confirm"i]) 359ms page.waitForResponse 339ms locator.waitFor(body) 143ms locator.count(.chakra-skeleton) 11ms locator.waitFor(.chakra-skeleton >> nth=0) 28ms locator.waitFor(.chakra-skeleton >> nth=0) 13298ms page.waitForTimeout 229ms expect.toContainText 46ms expect.toContainText 44ms expect.toContainText 36ms browserContext.close 12ms browser.newContext 79ms browserContext.newPage 50ms page.goto(/tasks) 1374ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 17683ms locator.click(body >> internal:role=button[name="Approve"i]) 511ms locator.click(body >> internal:role=button[name="Confirm"i]) 284ms page.waitForResponse 328ms locator.waitFor(body) 181ms locator.count(.chakra-skeleton) 16ms locator.waitFor(.chakra-skeleton >> nth=0) 15ms locator.waitFor(.chakra-skeleton >> nth=0) 12953ms page.waitForTimeout 267ms expect.toContainText 33ms expect.toContainText 38ms expect.toContainText 44ms browserContext.close 11ms browser.newContext 88ms browserContext.newPage 47ms page.goto(/tasks) 1921ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 18834ms locator.click(body >> internal:role=button[name="Approve"i]) 568ms locator.click(body >> internal:role=button[name="Confirm"i]) 333ms page.waitForResponse 1933ms locator.waitFor(body) 141ms locator.count(.chakra-skeleton) 4ms locator.waitFor(.chakra-skeleton >> nth=0) 15ms locator.waitFor(.chakra-skeleton >> nth=0) 15825ms page.waitForTimeout -1ms After Hooks 715ms expect.toContainText 16ms expect.toContainText 8ms expect.toContainText 17ms Worker Cleanup 73ms fixture: browser 73ms ################[ Failure ]################ Test timeout of 120000ms exceeded while running "beforeEach" hook. 54 |}); 55 | 56 |test.describe("As user, I want to see a Change Office Request after PM, GDVP1, GDVP2 approved", () => { 57 | let dataNewRequest: ChangeOfficeRequestForm; 58 | test.use({ storageState: authUserFile }); // main context auth > 59 | test.beforeEach(async ({ browser }) => { 60 | await BrowserControl.withAuth(browser, authUserFile, async ({ PageObjects }) => { 61 | dataNewRequest = await userCreateChangeOfficeRequestSteps(PageObjects); 62 | }); 63 | // PM approve 64 | await BrowserControl.withAuth(browser, authPmFile, async ({ PageObjects }) => { at (/home/nccsoft/actions-runner1/_work/ncc-erp-workflow-w2-e2e/ncc-erp-workflow-w2-e2e/src/tests/e2e/changeOfficeRequest.spec.ts:59:8) ``` --- #### 🔴 As user, when PM, Current/Destination HoO approve successfully @user: **I should see the request with approve status on my tasks** > [31mTest timeout of 120000ms exceeded.[39m ```diff ################[ Steps ]################ Before Hooks 117805ms beforeEach hook 117617ms fixture: browser 173ms browserType.launch 168ms browser.newContext 133ms browserContext.newPage 57ms page.goto(/request-templates) 1410ms expect.toHaveURL 69ms locator.getByRole('row', { name: 'Change Office Request' }).getByLabel('Popup modal').click 354ms locator.click(body >> internal:testid=[data-testid="CurrentOffice"s]) 241ms locator.click(body >> internal:testid=[data-testid="CurrentOffice"s] >> internal:text="Đà Nẵng"s) 123ms locator.click(body >> internal:testid=[data-testid="DestinationOffice"s]) 96ms locator.click(body >> internal:testid=[data-testid="DestinationOffice"s] >> internal:text="Vinh"s) 73ms locator.fill(body >> internal:testid=[data-testid="Content"s] >> textarea) 50ms locator.fill(body >> internal:testid=[data-testid="StartDate"s] >> input) 163ms locator.click(body >> internal:testid=[data-testid="StartDate"s] >> [aria-selected="true"]) 116ms locator.fill(body >> internal:testid=[data-testid="EndDate"s] >> input) 99ms locator.click(body >> internal:testid=[data-testid="EndDate"s] >> [aria-selected="true"]) 179ms locator.click(body >> internal:role=button[name="Save"i]) 147ms page.waitForResponse 6043ms browserContext.close 9ms browser.newContext 102ms browserContext.newPage 60ms page.goto(/tasks) 1633ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 18158ms locator.click(body >> internal:role=button[name="Approve"i]) 708ms locator.click(body >> internal:role=button[name="Confirm"i]) 311ms page.waitForResponse 353ms locator.waitFor(body) 133ms locator.count(.chakra-skeleton) 9ms locator.waitFor(.chakra-skeleton >> nth=0) 25ms locator.waitFor(.chakra-skeleton >> nth=0) 13933ms page.waitForTimeout 238ms expect.toContainText 57ms expect.toContainText 41ms expect.toContainText 29ms browserContext.close 13ms browser.newContext 127ms browserContext.newPage 85ms page.goto(/tasks) 1674ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 18893ms locator.click(body >> internal:role=button[name="Approve"i]) 589ms locator.click(body >> internal:role=button[name="Confirm"i]) 366ms page.waitForResponse 345ms locator.waitFor(body) 131ms locator.count(.chakra-skeleton) 15ms locator.waitFor(.chakra-skeleton >> nth=0) 41ms locator.waitFor(.chakra-skeleton >> nth=0) 12255ms page.waitForTimeout 223ms expect.toContainText 33ms expect.toContainText 29ms expect.toContainText 50ms browserContext.close 6ms browser.newContext 86ms browserContext.newPage 46ms page.goto(/tasks) 1555ms locator.click(body >> internal:testid=[data-testid="board-item-title"s] >> internal:has-text="Change office from ĐN to V"i >> nth=0) 15945ms locator.click(body >> internal:role=button[name="Approve"i]) 475ms locator.click(body >> internal:role=button[name="Confirm"i]) 308ms page.waitForResponse 1963ms locator.waitFor(body) 167ms locator.count(.chakra-skeleton) 3ms locator.waitFor(.chakra-skeleton >> nth=0) 41ms locator.waitFor(.chakra-skeleton >> nth=0) 13852ms page.waitForTimeout 232ms expect.toContainText 43ms expect.toContainText 48ms expect.toContainText 39ms browserContext.close 10ms fixture: context 129ms browser.newContext 109ms fixture: page 52ms browserContext.newPage 50ms fixture: PageObjects 0ms page.goto(/my-requests) 1727ms locator.getByRole('combobox').nth(1).selectOption 556ms locator.waitFor(body) 130ms After Hooks 190ms fixture: PageObjects 0ms fixture: page 0ms fixture: context 1ms locator.count(.chakra-skeleton) 8ms locator.waitFor(.chakra-skeleton >> nth=0) 116ms video.saveAs 1ms Worker Cleanup 58ms fixture: browser 56ms ################[ Failure ]################ Test timeout of 120000ms exceeded. ``` ---

🐢 Slowest Tests

* As user, when PM, Current/Destination HoO approve successfully @user: **I should see the request with approve status on my tasks** (2 minutes, 0.19 seconds) * As user, when PM, Current/Destination HoO approve successfully @user: **I should see the request with approve status on my tasks** (2 minutes, 0.007 seconds) * As user, when PM, Current/Destination HoO approve successfully @user: **I should see the request with approve status on my tasks** (2 minutes, 0.002 seconds) * As IT, when PM approve a request successfully @it: **I should reject success** (1 minute, 19.766 seconds) * As IT, when PM approve a request successfully @it: **I should approve success** (1 minute, 18.426 seconds)
thiendangncc commented 2 months ago

Playwright test results

failed  10 failed
passed  17 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  33 tests across 10 suites
duration  14 minutes, 32 seconds
commit  c7e851c

Failed tests chromium › e2e/changeOfficeRequest.spec.ts › As user, I want to see a Change Office Request after PM, GDVP1, GDVP2 approved › As user, when PM, Current/Destination HoO approve successfully @user › I should see the request with approve status on my tasks chromium › e2e/deviceRequest.spec.ts › As user, When I create a new request @user › I should see the request on my requests chromium › e2e/deviceRequest.spec.ts › As pm, I want to received a Device Request from my project › As pm, when user in my project create a new request @pm › I should see the request on my tasks chromium › e2e/deviceRequest.spec.ts › As pm, I want to received a Device Request from my project › As pm, when user in my project create a new request @pm › I should approve success chromium › e2e/deviceRequest.spec.ts › As pm, I want to received a Device Request from my project › As pm, when user in my project create a new request @pm › I should reject success chromium › e2e/deviceRequest.spec.ts › As IT, I want to received a Device Request after PM approved › As IT, when PM approve a request successfully @it › I should see the request on my tasks chromium › e2e/deviceRequest.spec.ts › As IT, I want to received a Device Request after PM approved › As IT, when PM approve a request successfully @it › I should approve success chromium › e2e/deviceRequest.spec.ts › As IT, I want to received a Device Request after PM approved › As IT, when PM approve a request successfully @it › I should reject success chromium › e2e/login.spec.ts › As user, I want to login to w2 @user › should login success chromium › e2e/login.spec.ts › As user, I want to logout @user › should logout success
Flaky tests chromium › e2e/changeOfficeRequest.spec.ts › As gdvp, I want to received a Change Office Request if anyone come to my office › As gdvp, when user in my office create a new request @gdvp › I should reject success
Skipped tests chromium › accessibility/axe.spec.ts › Accessibility Scans › login page a11y chromium › lighthouse/lighthouse.spec.ts › home @lighthouse chromium › visual/login/visual.spec.ts › login page › snapshot chromium › visual/requestTemplate/visual.spec.ts › as user, request template page › snapshot chromium › visual/requestTemplate/visual.spec.ts › as admin, request template page › snapshot