fix failed tests #20
Annotations
13 errors, 5 warnings, and 2 notices
[api_tests] › admins.spec.ts:84:9 › admin api test › get admin logs @pro:
tests/pw/tests/api/admins.spec.ts#L88
1) [api_tests] › admins.spec.ts:84:9 › admin api test › get admin logs @Pro ──────────────────────
Error: Result does not match schema: Expected string, received number
Details: {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "number",
"path": [
8,
"vendor_earning"
],
"message": "Expected string, received number"
}
],
"name": "ZodError"
}
86 | expect(response.ok()).toBeTruthy();
87 | expect(responseBody).toBeTruthy();
> 88 | expect(responseBody).toMatchSchema(schemas.admin.adminLogsSchema);
| ^
89 | });
90 |
91 | test('get admin export logs @Pro', async () => {
at /home/runner/work/dokan/dokan/tests/pw/tests/api/admins.spec.ts:88:30
|
[api_tests] › admins.spec.ts:84:9 › admin api test › get admin logs @pro:
tests/pw/tests/api/admins.spec.ts#L88
1) [api_tests] › admins.spec.ts:84:9 › admin api test › get admin logs @Pro ──────────────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Result does not match schema: Expected string, received number
Details: {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "number",
"path": [
8,
"vendor_earning"
],
"message": "Expected string, received number"
}
],
"name": "ZodError"
}
86 | expect(response.ok()).toBeTruthy();
87 | expect(responseBody).toBeTruthy();
> 88 | expect(responseBody).toMatchSchema(schemas.admin.adminLogsSchema);
| ^
89 | });
90 |
91 | test('get admin export logs @Pro', async () => {
at /home/runner/work/dokan/dokan/tests/pw/tests/api/admins.spec.ts:88:30
|
e2e_api tests
Process completed with exit code 1.
|
[e2e_tests] › coupons.spec.ts:72:9 › Coupons test › customer can apply coupon @pro:
tests/pw/pages/basePage.ts#L1330
1) [e2e_tests] › coupons.spec.ts:72:9 › Coupons test › customer can apply coupon @Pro ────────────
Error: Timed out 15000ms waiting for expect(locator).toContainText(expected)
Locator: locator('div.wc-block-components-notice-banner__content')
Expected string: "Coupon code \"c1_v1\" has been applied to your cart."
Received string: ""
Call log:
- expect.toContainText with timeout 15000ms
- waiting for locator('div.wc-block-components-notice-banner__content')
at ../../pages/basePage.ts:1330
1328 | // assert element to contain text
1329 | async toContainText(selector: string, text: string | RegExp) {
> 1330 | await expect(this.page.locator(selector)).toContainText(text);
| ^
1331 | }
1332 |
1333 | // assert element to have count
at CustomerPage.toContainText (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:1330:51)
at CustomerPage.applyCoupon (/home/runner/work/dokan/dokan/tests/pw/pages/customerPage.ts:278:20)
at CouponsPage.applyCoupon (/home/runner/work/dokan/dokan/tests/pw/pages/couponsPage.ts:107:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/coupons.spec.ts:73:9
|
[e2e_tests] › coupons.spec.ts:72:9 › Coupons test › customer can apply coupon @pro:
tests/pw/pages/basePage.ts#L1330
1) [e2e_tests] › coupons.spec.ts:72:9 › Coupons test › customer can apply coupon @Pro ────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 15000ms waiting for expect(locator).toContainText(expected)
Locator: locator('div.wc-block-components-notice-banner__content')
Expected string: "Coupon code \"c1_v1\" has been applied to your cart."
Received string: ""
Call log:
- expect.toContainText with timeout 15000ms
- waiting for locator('div.wc-block-components-notice-banner__content')
at ../../pages/basePage.ts:1330
1328 | // assert element to contain text
1329 | async toContainText(selector: string, text: string | RegExp) {
> 1330 | await expect(this.page.locator(selector)).toContainText(text);
| ^
1331 | }
1332 |
1333 | // assert element to have count
at CustomerPage.toContainText (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:1330:51)
at CustomerPage.applyCoupon (/home/runner/work/dokan/dokan/tests/pw/pages/customerPage.ts:278:20)
at CouponsPage.applyCoupon (/home/runner/work/dokan/dokan/tests/pw/pages/couponsPage.ts:107:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/coupons.spec.ts:73:9
|
[e2e_tests] › emailVerification.spec.ts:29:9 › Email verifications test › user can see registration notice (2-step authentication) while loggingIn @pro:
tests/pw/pages/basePage.ts#L237
2) [e2e_tests] › emailVerification.spec.ts:29:9 › Email verifications test › user can see registration notice (2-step authentication) while loggingIn @Pro
TimeoutError: page.waitForResponse: Timeout 20000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:237
235 | // click & wait for response
236 | async clickAndWaitForResponseAndLoadState(subUrl: string, selector: string, code = 200): Promise<Response> {
> 237 | const [, response] = await Promise.all([this.page.waitForLoadState('networkidle'), this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.page.locator(selector).click()]);
| ^
238 | expect(response.status()).toBe(code);
239 | return response;
240 | }
at EmailVerificationsPage.clickAndWaitForResponseAndLoadState (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:237:102)
at EmailVerificationsPage.login (/home/runner/work/dokan/dokan/tests/pw/pages/emailVerificationsPage.ts:26:20)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/emailVerification.spec.ts:30:9
|
[e2e_tests] › emailVerification.spec.ts:29:9 › Email verifications test › user can see registration notice (2-step authentication) while loggingIn @pro:
tests/pw/pages/basePage.ts#L237
2) [e2e_tests] › emailVerification.spec.ts:29:9 › Email verifications test › user can see registration notice (2-step authentication) while loggingIn @Pro
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
TimeoutError: page.waitForResponse: Timeout 20000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:237
235 | // click & wait for response
236 | async clickAndWaitForResponseAndLoadState(subUrl: string, selector: string, code = 200): Promise<Response> {
> 237 | const [, response] = await Promise.all([this.page.waitForLoadState('networkidle'), this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.page.locator(selector).click()]);
| ^
238 | expect(response.status()).toBe(code);
239 | return response;
240 | }
at EmailVerificationsPage.clickAndWaitForResponseAndLoadState (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:237:102)
at EmailVerificationsPage.login (/home/runner/work/dokan/dokan/tests/pw/pages/emailVerificationsPage.ts:26:20)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/emailVerification.spec.ts:30:9
|
[e2e_tests] › products.spec.ts:157:9 › Product functionality test › vendor can add product wholesale options @pro:
tests/pw/pages/basePage.ts#L237
3) [e2e_tests] › products.spec.ts:157:9 › Product functionality test › vendor can add product wholesale options @Pro
TimeoutError: page.waitForResponse: Timeout 20000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:237
235 | // click & wait for response
236 | async clickAndWaitForResponseAndLoadState(subUrl: string, selector: string, code = 200): Promise<Response> {
> 237 | const [, response] = await Promise.all([this.page.waitForLoadState('networkidle'), this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.page.locator(selector).click()]);
| ^
238 | expect(response.status()).toBe(code);
239 | return response;
240 | }
at ProductsPage.clickAndWaitForResponseAndLoadState (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:237:102)
at ProductsPage.goToProductEdit (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:455:20)
at ProductsPage.addProductWholesaleOptions (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:605:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/products.spec.ts:158:9
|
[e2e_tests] › products.spec.ts:157:9 › Product functionality test › vendor can add product wholesale options @pro:
tests/pw/pages/basePage.ts#L876
3) [e2e_tests] › products.spec.ts:157:9 › Product functionality test › vendor can add product wholesale options @Pro
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: locator.check: Clicking the checkbox did not change its state
Call log:
- waiting for locator('#wholesale\\[enable_wholesale\\]')
- locator resolved to <input value="yes" type="checkbox" class="wholesaleChec…/>
- attempting click action
- waiting for element to be visible, enabled and stable
- forcing action
- element is visible, enabled and stable
- scrolling into view if needed
- done scrolling
- performing click action
- click action done
- waiting for scheduled navigations to finish
- navigations have finished
at ../../pages/basePage.ts:876
874 | async checkLocator(selector: string): Promise<void> {
875 | const locator = this.page.locator(selector);
> 876 | await locator.check({ force: true }); // forced is used to avoid "locator.check: Clicking the checkbox did not change its state" error
| ^
877 | }
878 |
879 | // click locator
at ProductsPage.checkLocator (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:876:23)
at ProductsPage.check (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:677:20)
at ProductsPage.addProductWholesaleOptions (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:606:20)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/products.spec.ts:158:9
|
[e2e_tests] › products.spec.ts:165:9 › Product functionality test › vendor can add product other options @lite:
tests/pw/pages/basePage.ts#L237
4) [e2e_tests] › products.spec.ts:165:9 › Product functionality test › vendor can add product other options @lite
TimeoutError: page.waitForResponse: Timeout 20000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:237
235 | // click & wait for response
236 | async clickAndWaitForResponseAndLoadState(subUrl: string, selector: string, code = 200): Promise<Response> {
> 237 | const [, response] = await Promise.all([this.page.waitForLoadState('networkidle'), this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.page.locator(selector).click()]);
| ^
238 | expect(response.status()).toBe(code);
239 | return response;
240 | }
at ProductsPage.clickAndWaitForResponseAndLoadState (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:237:102)
at ProductsPage.goToProductEdit (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:455:20)
at ProductsPage.addProductOtherOptions (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:639:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/products.spec.ts:166:9
|
[e2e_tests] › products.spec.ts:165:9 › Product functionality test › vendor can add product other options @lite:
tests/pw/pages/basePage.ts#L1320
4) [e2e_tests] › products.spec.ts:165:9 › Product functionality test › vendor can add product other options @lite
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect.toBeVisible: Error: strict mode violation: locator('//strong//a[contains(text(),\'Small Metal Shoes (Simple)\')]') resolved to 2 elements:
1) <a href="http://localhost:9999/dashboard/products/?…>Small Metal Shoes (Simple)</a> aka getByRole('link', { name: 'Small Metal Shoes (Simple)' }).first()
2) <a href="http://localhost:9999/dashboard/products/?…>Small Metal Shoes (Simple)</a> aka getByRole('link', { name: 'Small Metal Shoes (Simple)' }).nth(1)
Call log:
- expect.toBeVisible with timeout 15000ms
- waiting for locator('//strong//a[contains(text(),\'Small Metal Shoes (Simple)\')]')
at ../../pages/basePage.ts:1320
1318 | // assert element to be visible
1319 | async toBeVisible(selector: string) {
> 1320 | await expect(this.page.locator(selector)).toBeVisible();
| ^
1321 | }
1322 |
1323 | // assert checkbox to be checked
at ProductsPage.toBeVisible (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:1320:51)
at ProductsPage.searchProduct (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:498:20)
at ProductsPage.goToProductEdit (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:453:9)
at ProductsPage.addProductOtherOptions (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:639:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/products.spec.ts:166:9
|
[e2e_tests] › coupons.spec.ts:76:9 › Coupons test › customer can buy product with coupon @pro:
tests/pw/pages/basePage.ts#L1040
5) [e2e_tests] › coupons.spec.ts:76:9 › Coupons test › customer can buy product with coupon @Pro ─
Error: locator.isVisible: Error: strict mode violation: locator('.wc-pao-addon-select') resolved to 2 elements:
1) <select id="addon-15-0" name="addon-15-0" data-restricti…>…</select> aka getByLabel('Add-on Title_zHB8goWrut')
2) <select id="addon-15-1" name="addon-15-1" data-restricti…>…</select> aka getByLabel('Add-on Title_', { exact: true })
Call log:
- checking visibility of locator('.wc-pao-addon-select')
at ../../pages/basePage.ts:1040
1038 | async isVisibleLocator(selector: string): Promise<boolean> {
1039 | const locator = this.page.locator(selector);
> 1040 | return await locator.isVisible();
| ^
1041 | }
1042 |
1043 | // get last matching locator
at CustomerPage.isVisibleLocator (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:1040:30)
at CustomerPage.isVisible (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:390:27)
at CustomerPage.addProductToCartFromSingleProductPage (/home/runner/work/dokan/dokan/tests/pw/pages/customerPage.ts:217:43)
at CustomerPage.addProductToCart (/home/runner/work/dokan/dokan/tests/pw/pages/customerPage.ts:237:17)
at CouponsPage.buyProductWithCoupon (/home/runner/work/dokan/dokan/tests/pw/pages/couponsPage.ts:112:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/coupons.spec.ts:77:9
|
[e2e_tests] › products.spec.ts:153:9 › Product functionality test › vendor can add product rma options @pro:
tests/pw/pages/basePage.ts#L237
6) [e2e_tests] › products.spec.ts:153:9 › Product functionality test › vendor can add product rma options @Pro
TimeoutError: page.waitForResponse: Timeout 20000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:237
235 | // click & wait for response
236 | async clickAndWaitForResponseAndLoadState(subUrl: string, selector: string, code = 200): Promise<Response> {
> 237 | const [, response] = await Promise.all([this.page.waitForLoadState('networkidle'), this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.page.locator(selector).click()]);
| ^
238 | expect(response.status()).toBe(code);
239 | return response;
240 | }
at ProductsPage.clickAndWaitForResponseAndLoadState (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:237:102)
at ProductsPage.goToProductEdit (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:455:20)
at ProductsPage.addProductRmaOptions (/home/runner/work/dokan/dokan/tests/pw/pages/productsPage.ts:584:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/products.spec.ts:154:9
|
e2e_api tests
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3, actions/github-script@v6, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Slow Test:
tests/pw/[api_tests] › products.spec.ts#L1
tests/pw/[api_tests] › products.spec.ts took 10.7s
|
Slow Test:
tests/pw/[api_tests] › supportTickets.spec.ts#L1
tests/pw/[api_tests] › supportTickets.spec.ts took 6.6s
|
Slow Test:
tests/pw/[e2e_tests] › products.spec.ts#L1
tests/pw/[e2e_tests] › products.spec.ts took 5.3m
|
Slow Test:
tests/pw/[e2e_tests] › coupons.spec.ts#L1
tests/pw/[e2e_tests] › coupons.spec.ts took 1.7m
|
🎭 Playwright Run Summary
1 failed
[api_tests] › admins.spec.ts:84:9 › admin api test › get admin logs @Pro ───────────────────────
21 skipped
259 passed (47.1s)
|
🎭 Playwright Run Summary
4 failed
[e2e_tests] › coupons.spec.ts:72:9 › Coupons test › customer can apply coupon @Pro ─────────────
[e2e_tests] › emailVerification.spec.ts:29:9 › Email verifications test › user can see registration notice (2-step authentication) while loggingIn @Pro
[e2e_tests] › products.spec.ts:157:9 › Product functionality test › vendor can add product wholesale options @Pro
[e2e_tests] › products.spec.ts:165:9 › Product functionality test › vendor can add product other options @lite
13 flaky
[e2e_tests] › coupons.spec.ts:76:9 › Coupons test › customer can buy product with coupon @Pro ──
[e2e_tests] › products.spec.ts:153:9 › Product functionality test › vendor can add product rma options @Pro
[e2e_tests] › products.spec.ts:175:9 › Product functionality test › vendor can duplicate product @Pro
[e2e_tests] › refunds.spec.ts:56:9 › Refunds test › admin can perform refund requests bulk actions @Pro
[e2e_tests] › reports.spec.ts:40:9 › Reports test › admin can search all logs @Pro ─────────────
[e2e_tests] › requestForQuoteRules.spec.ts:55:9 › Request for quotation Rules test › admin can perform quote rule bulk actions @Pro
[e2e_tests] › spmv.spec.ts:83:9 › Vendor SPMV test › vendor can clone product @Pro ─────────────
[e2e_tests] › storeCategories.spec.ts:51:9 › Store categories test › admin can set default store category @Pro
[e2e_tests] › storeReviews.spec.ts:56:9 › Store Reviews test › admin can filter store reviews by vendor @Pro
[e2e_tests] › stores.spec.ts:58:9 › Stores test › admin can edit vendor info @lite ─────────────
[e2e_tests] › stores.spec.ts:62:9 › Stores test › admin can view vendor products @lite ─────────
[e2e_tests] › vendorBooking.spec.ts:120:9 › Booking Product test › vendor can add booking for existing customer @Pro
[e2e_tests] › vendorVerifications.spec.ts:31:9 › Verifications test › vendor can send id verification request @Pro
63 skipped
490 passed (9.1m)
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
test-artifact
Expired
|
86.8 MB |
|