tests/add api json validation #43
Annotations
11 errors, 6 warnings, and 2 notices
tests/pw/tests/api/admins.spec.ts#L34
1) [api_tests] › admins.spec.ts:30:9 › admin api test › get admin report summary @lite ───────────
Error: Result does not match schema: Expected string, received number
Details: {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "number",
"path": [
"withdraw",
"pending"
],
"message": "Expected string, received number"
}
],
"name": "ZodError"
}
32 | expect(response.ok()).toBeTruthy();
33 | expect(responseBody).toBeTruthy();
> 34 | expect(responseBody).toMatchSchema(schemas.reportSummarySchema);
| ^
35 | });
36 |
37 | test('get admin dashboard feed @lite', async () => {
at /home/runner/work/dokan/dokan/tests/pw/tests/api/admins.spec.ts:34:30
|
tests/pw/tests/api/admins.spec.ts#L34
1) [api_tests] › admins.spec.ts:30:9 › admin api test › get admin report summary @lite ───────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Result does not match schema: Expected string, received number
Details: {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "number",
"path": [
"withdraw",
"pending"
],
"message": "Expected string, received number"
}
],
"name": "ZodError"
}
32 | expect(response.ok()).toBeTruthy();
33 | expect(responseBody).toBeTruthy();
> 34 | expect(responseBody).toMatchSchema(schemas.reportSummarySchema);
| ^
35 | });
36 |
37 | test('get admin dashboard feed @lite', async () => {
at /home/runner/work/dokan/dokan/tests/pw/tests/api/admins.spec.ts:34:30
|
tests/pw/tests/api/orders.spec.ts#L48
2) [api_tests] › orders.spec.ts:46:13 › order api test v1 › get single order @lite ───────────────
Error: expect(received).toBeTruthy()
Received: false
46 | test('get single order @lite', async () => {
47 | const [response, responseBody] = await apiUtils.get(endPoints.getSingleOrder(orderId).replace('v1', version));
> 48 | expect(response.ok()).toBeTruthy();
| ^
49 | expect(responseBody).toBeTruthy();
50 | });
51 |
at /home/runner/work/dokan/dokan/tests/pw/tests/api/orders.spec.ts:48:35
|
tests/pw/tests/api/orders.spec.ts#L48
2) [api_tests] › orders.spec.ts:46:13 › order api test v1 › get single order @lite ───────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toBeTruthy()
Received: false
46 | test('get single order @lite', async () => {
47 | const [response, responseBody] = await apiUtils.get(endPoints.getSingleOrder(orderId).replace('v1', version));
> 48 | expect(response.ok()).toBeTruthy();
| ^
49 | expect(responseBody).toBeTruthy();
50 | });
51 |
at /home/runner/work/dokan/dokan/tests/pw/tests/api/orders.spec.ts:48:35
|
tests/pw/tests/api/orders.spec.ts#L48
3) [api_tests] › orders.spec.ts:46:13 › order api test v2 › get single order @lite ───────────────
Error: expect(received).toBeTruthy()
Received: false
46 | test('get single order @lite', async () => {
47 | const [response, responseBody] = await apiUtils.get(endPoints.getSingleOrder(orderId).replace('v1', version));
> 48 | expect(response.ok()).toBeTruthy();
| ^
49 | expect(responseBody).toBeTruthy();
50 | });
51 |
at /home/runner/work/dokan/dokan/tests/pw/tests/api/orders.spec.ts:48:35
|
tests/pw/tests/api/orders.spec.ts#L48
3) [api_tests] › orders.spec.ts:46:13 › order api test v2 › get single order @lite ───────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toBeTruthy()
Received: false
46 | test('get single order @lite', async () => {
47 | const [response, responseBody] = await apiUtils.get(endPoints.getSingleOrder(orderId).replace('v1', version));
> 48 | expect(response.ok()).toBeTruthy();
| ^
49 | expect(responseBody).toBeTruthy();
50 | });
51 |
at /home/runner/work/dokan/dokan/tests/pw/tests/api/orders.spec.ts:48:35
|
|
tests/pw/pages/basePage.ts#L877
1) [e2e_tests] › vendorSettings.spec.ts:79:9 › Vendor settings test › vendor can set catalog settings @lite
Error: locator.check: Clicking the checkbox did not change its state
=========================== logs ===========================
waiting for locator('input#catalog_mode_hide_product_price')
locator resolved to <input value="on" type="checkbox" id="catalog_mode_hide…/>
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:877
875 | async checkLocator(selector: string): Promise<void> {
876 | const locator = this.page.locator(selector);
> 877 | await locator.check({ force: true }); // forced is used to avoid "locator.check: Clicking the checkbox did not change its state" error
| ^
878 | }
879 |
880 | // click locator
at VendorSettingsPage.checkLocator (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:877:23)
at VendorSettingsPage.check (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:678:20)
at VendorSettingsPage.catalogModeSettings (/home/runner/work/dokan/dokan/tests/pw/pages/vendorSettingsPage.ts:347:24)
at VendorSettingsPage.setStoreSettings (/home/runner/work/dokan/dokan/tests/pw/pages/vendorSettingsPage.ts:197:17)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/vendorSettings.spec.ts:81:9
|
tests/pw/pages/basePage.ts#L304
2) [e2e_tests] › withdraws.spec.ts:57:9 › Withdraw test › admin can approve withdraw request @lite
TimeoutError: page.waitForResponse: Timeout 15000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:304
302 | // type & wait for response
303 | async pressAndWaitForResponse(subUrl: string, key: string, code = 200): Promise<Response> {
> 304 | const [response] = await Promise.all([this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.press(key)]);
| ^
305 | return response;
306 | }
307 |
at WithdrawsPage.pressAndWaitForResponse (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:304:57)
at WithdrawsPage.filterWithdraws (/home/runner/work/dokan/dokan/tests/pw/pages/withdrawsPage.ts:57:20)
at WithdrawsPage.updateWithdrawRequest (/home/runner/work/dokan/dokan/tests/pw/pages/withdrawsPage.ts:79:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/withdraws.spec.ts:58:9
|
tests/pw/pages/basePage.ts#L304
3) [e2e_tests] › withdraws.spec.ts:61:9 › Withdraw test › admin can cancel withdraw request @lite
TimeoutError: page.waitForResponse: Timeout 15000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:304
302 | // type & wait for response
303 | async pressAndWaitForResponse(subUrl: string, key: string, code = 200): Promise<Response> {
> 304 | const [response] = await Promise.all([this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.press(key)]);
| ^
305 | return response;
306 | }
307 |
at WithdrawsPage.pressAndWaitForResponse (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:304:57)
at WithdrawsPage.filterWithdraws (/home/runner/work/dokan/dokan/tests/pw/pages/withdrawsPage.ts:57:20)
at WithdrawsPage.updateWithdrawRequest (/home/runner/work/dokan/dokan/tests/pw/pages/withdrawsPage.ts:79:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/withdraws.spec.ts:63:9
|
tests/pw/pages/basePage.ts#L304
4) [e2e_tests] › withdraws.spec.ts:66:9 › Withdraw test › admin can delete withdraw request @lite
TimeoutError: page.waitForResponse: Timeout 15000ms exceeded while waiting for event "response"
at ../../pages/basePage.ts:304
302 | // type & wait for response
303 | async pressAndWaitForResponse(subUrl: string, key: string, code = 200): Promise<Response> {
> 304 | const [response] = await Promise.all([this.page.waitForResponse(resp => resp.url().includes(subUrl) && resp.status() === code), this.press(key)]);
| ^
305 | return response;
306 | }
307 |
at WithdrawsPage.pressAndWaitForResponse (/home/runner/work/dokan/dokan/tests/pw/pages/basePage.ts:304:57)
at WithdrawsPage.filterWithdraws (/home/runner/work/dokan/dokan/tests/pw/pages/withdrawsPage.ts:57:20)
at WithdrawsPage.updateWithdrawRequest (/home/runner/work/dokan/dokan/tests/pw/pages/withdrawsPage.ts:79:9)
at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/withdraws.spec.ts:68:9
|
tests/pw/[api_tests] › products.spec.ts#L1
tests/pw/[api_tests] › products.spec.ts took 5.4s
|
tests/pw/[api_tests] › orders.spec.ts#L1
tests/pw/[api_tests] › orders.spec.ts took 3.4s
|
tests/pw/[api_tests] › stores.spec.ts#L1
tests/pw/[api_tests] › stores.spec.ts took 2.8s
|
tests/pw/[e2e_tests] › withdraws.spec.ts#L1
tests/pw/[e2e_tests] › withdraws.spec.ts took 1.4m
|
tests/pw/[e2e_tests] › products.spec.ts#L1
tests/pw/[e2e_tests] › products.spec.ts took 49.2s
|
tests/pw/[e2e_tests] › orders.spec.ts#L1
tests/pw/[e2e_tests] › orders.spec.ts took 25.9s
|
3 failed
[api_tests] › admins.spec.ts:30:9 › admin api test › get admin report summary @lite ────────────
[api_tests] › orders.spec.ts:46:13 › order api test v1 › get single order @lite ────────────────
[api_tests] › orders.spec.ts:46:13 › order api test v2 › get single order @lite ────────────────
116 passed (1.0m)
|
4 flaky
[e2e_tests] › vendorSettings.spec.ts:79:9 › Vendor settings test › vendor can set catalog settings @lite
[e2e_tests] › withdraws.spec.ts:57:9 › Withdraw test › admin can approve withdraw request @lite
[e2e_tests] › withdraws.spec.ts:61:9 › Withdraw test › admin can cancel withdraw request @lite ─
[e2e_tests] › withdraws.spec.ts:66:9 › Withdraw test › admin can delete withdraw request @lite ─
1 skipped
152 passed (6.1m)
|
The logs for this run have expired and are no longer available.
Loading