Skip to content

Merge branch 'litetests' into e2e-pw #54

Merge branch 'litetests' into e2e-pw

Merge branch 'litetests' into e2e-pw #54

Triggered via push March 8, 2024 07:15
Status Failure
Total duration 9m 16s
Artifacts 1

all-tests.yml

on: push
e2e_api tests
9m 7s
e2e_api tests
Fit to window
Zoom out
Zoom in

Annotations

20 errors, 5 warnings, and 2 notices
[coverage_report] β€Ί _coverage.teardown.ts:21:9 β€Ί get api test coverage β€Ί get coverage: tests/pw/tests/api/_coverage.teardown.ts#L27
1) [coverage_report] β€Ί _coverage.teardown.ts:21:9 β€Ί get api test coverage β€Ί get coverage ───────── TypeError: Cannot read properties of undefined (reading 'routes') 25 | for (const endpoint of endpoints) { 26 | const [, responseBody] = await apiUtils.get(endpoint); > 27 | allRoutes.push(...Object.keys(responseBody.routes)); | ^ 28 | allRouteObjValues.push(...Object.values(responseBody.routes)); 29 | } 30 | const allRouteMethods: string[][] = allRouteObjValues.map(route => route.methods); at /home/runner/work/dokan/dokan/tests/pw/tests/api/_coverage.teardown.ts:27:56
[coverage_report] β€Ί _coverage.teardown.ts:21:9 β€Ί get api test coverage β€Ί get coverage: tests/pw/tests/api/_coverage.teardown.ts#L27
1) [coverage_report] β€Ί _coverage.teardown.ts:21:9 β€Ί get api test coverage β€Ί get coverage ───────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'routes') 25 | for (const endpoint of endpoints) { 26 | const [, responseBody] = await apiUtils.get(endpoint); > 27 | allRoutes.push(...Object.keys(responseBody.routes)); | ^ 28 | allRouteObjValues.push(...Object.values(responseBody.routes)); 29 | } 30 | const allRouteMethods: string[][] = allRouteObjValues.map(route => route.methods); at /home/runner/work/dokan/dokan/tests/pw/tests/api/_coverage.teardown.ts:27:56
[api_setup] β€Ί _auth.setup.ts:36:10 β€Ί setup test environment β€Ί create customer @lite: tests/pw/utils/apiUtils.ts#L781
2) [api_setup] β€Ί _auth.setup.ts:36:10 β€Ί setup test environment β€Ί create customer @lite ─────────── TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:781 779 | const [response, responseBody] = await this.post(endPoints.wc.createCustomer, { data: payload, headers: auth }, false); 780 | let customerId: string; > 781 | if (responseBody.code) { | ^ 782 | expect(response.status()).toBe(400); 783 | 784 | // get customer id if already exists at ApiUtils.createCustomer (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:781:26) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:37:32
[api_setup] β€Ί _auth.setup.ts:36:10 β€Ί setup test environment β€Ί create customer @lite: tests/pw/utils/apiUtils.ts#L781
2) [api_setup] β€Ί _auth.setup.ts:36:10 β€Ί setup test environment β€Ί create customer @lite ─────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:781 779 | const [response, responseBody] = await this.post(endPoints.wc.createCustomer, { data: payload, headers: auth }, false); 780 | let customerId: string; > 781 | if (responseBody.code) { | ^ 782 | expect(response.status()).toBe(400); 783 | 784 | // get customer id if already exists at ApiUtils.createCustomer (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:781:26) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:37:32
[api_setup] β€Ί _auth.setup.ts:41:10 β€Ί setup test environment β€Ί create vendor @lite: tests/pw/utils/apiUtils.ts#L174
3) [api_setup] β€Ί _auth.setup.ts:41:10 β€Ί setup test environment β€Ί create vendor @lite ───────────── TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:174 172 | let sellerId: string; 173 | let storeName: string; > 174 | if (responseBody.code) { | ^ 175 | expect(response.status()).toBe(500); 176 | 177 | // get store id if already exists at ApiUtils.createStore (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:174:26) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:42:30
[api_setup] β€Ί _auth.setup.ts:41:10 β€Ί setup test environment β€Ί create vendor @lite: tests/pw/utils/apiUtils.ts#L174
3) [api_setup] β€Ί _auth.setup.ts:41:10 β€Ί setup test environment β€Ί create vendor @lite ───────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:174 172 | let sellerId: string; 173 | let storeName: string; > 174 | if (responseBody.code) { | ^ 175 | expect(response.status()).toBe(500); 176 | 177 | // get store id if already exists at ApiUtils.createStore (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:174:26) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:42:30
[api_setup] β€Ί _auth.setup.ts:46:10 β€Ί setup test environment β€Ί add vendor2 @lite: tests/pw/utils/apiUtils.ts#L174
4) [api_setup] β€Ί _auth.setup.ts:46:10 β€Ί setup test environment β€Ί add vendor2 @lite ─────────────── TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:174 172 | let sellerId: string; 173 | let storeName: string; > 174 | if (responseBody.code) { | ^ 175 | expect(response.status()).toBe(500); 176 | 177 | // get store id if already exists at ApiUtils.createStore (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:174:26) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:47:30
[api_setup] β€Ί _auth.setup.ts:46:10 β€Ί setup test environment β€Ί add vendor2 @lite: tests/pw/utils/apiUtils.ts#L174
4) [api_setup] β€Ί _auth.setup.ts:46:10 β€Ί setup test environment β€Ί add vendor2 @lite ─────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:174 172 | let sellerId: string; 173 | let storeName: string; > 174 | if (responseBody.code) { | ^ 175 | expect(response.status()).toBe(500); 176 | 177 | // get store id if already exists at ApiUtils.createStore (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:174:26) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:47:30
[api_setup] β€Ί _auth.setup.ts:51:10 β€Ί setup test environment β€Ί dokan pro enabled or not @lite: tests/pw/utils/apiUtils.ts#L1404
5) [api_setup] β€Ί _auth.setup.ts:51:10 β€Ί setup test environment β€Ί dokan pro enabled or not @lite ── TypeError: Cannot read properties of undefined (reading 'map') at ../../utils/apiUtils.ts:1404 1402 | // get plugin active or not 1403 | async checkPluginsExistence(plugins: string[], auth?: auth): Promise<boolean> { > 1404 | const existingPlugins = (await this.getAllPlugins({}, auth)).map((a: { plugin: string }) => a.plugin.split('/')[1]); | ^ 1405 | return helpers.isSubArray(existingPlugins, plugins); 1406 | } 1407 | at ApiUtils.checkPluginsExistence (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:1404:70) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:52:19
[api_setup] β€Ί _auth.setup.ts:51:10 β€Ί setup test environment β€Ί dokan pro enabled or not @lite: tests/pw/utils/apiUtils.ts#L1404
5) [api_setup] β€Ί _auth.setup.ts:51:10 β€Ί setup test environment β€Ί dokan pro enabled or not @lite ── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'map') at ../../utils/apiUtils.ts:1404 1402 | // get plugin active or not 1403 | async checkPluginsExistence(plugins: string[], auth?: auth): Promise<boolean> { > 1404 | const existingPlugins = (await this.getAllPlugins({}, auth)).map((a: { plugin: string }) => a.plugin.split('/')[1]); | ^ 1405 | return helpers.isSubArray(existingPlugins, plugins); 1406 | } 1407 | at ApiUtils.checkPluginsExistence (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:1404:70) at /home/runner/work/dokan/dokan/tests/pw/tests/api/_auth.setup.ts:52:19
[e2e_setup] β€Ί _env.setup.ts:56:10 β€Ί setup site & woocommerce & dokan settings β€Ί check active dokan modules @pro: tests/pw/utils/apiUtils.ts#L737
1) [e2e_setup] β€Ί _env.setup.ts:56:10 β€Ί setup site & woocommerce & dokan settings β€Ί check active dokan modules @Pro TypeError: Cannot read properties of undefined (reading 'map') at ../../utils/apiUtils.ts:737 735 | async getAllModuleIds(params = {}, auth?: auth): Promise<string[]> { 736 | const allModules = await this.getAllModules(params, auth); > 737 | const allModuleIds = allModules.map((o: { id: unknown }) => o.id); | ^ 738 | return allModuleIds; 739 | } 740 | at ApiUtils.getAllModuleIds (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:737:41) at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:58:31
[e2e_setup] β€Ί _env.setup.ts:56:10 β€Ί setup site & woocommerce & dokan settings β€Ί check active dokan modules @pro: tests/pw/utils/apiUtils.ts#L737
1) [e2e_setup] β€Ί _env.setup.ts:56:10 β€Ί setup site & woocommerce & dokan settings β€Ί check active dokan modules @Pro Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'map') at ../../utils/apiUtils.ts:737 735 | async getAllModuleIds(params = {}, auth?: auth): Promise<string[]> { 736 | const allModules = await this.getAllModules(params, auth); > 737 | const allModuleIds = allModules.map((o: { id: unknown }) => o.id); | ^ 738 | return allModuleIds; 739 | } 740 | at ApiUtils.getAllModuleIds (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:737:41) at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:58:31
[e2e_setup] β€Ί _env.setup.ts:62:10 β€Ί setup site & woocommerce & dokan settings β€Ί set tax rate @lite: tests/pw/utils/apiUtils.ts#L1701
2) [e2e_setup] β€Ί _env.setup.ts:62:10 β€Ί setup site & woocommerce & dokan settings β€Ί set tax rate @lite TypeError: Cannot read properties of undefined (reading 'map') at ../../utils/apiUtils.ts:1701 1699 | 1700 | // delete previous tax rates > 1701 | const allTaxRateIds = (await this.getAllTaxRates(auth)).map((o: { id: unknown }) => o.id); | ^ 1702 | if (allTaxRateIds.length) { 1703 | await this.updateBatchTaxRates('delete', allTaxRateIds, auth); 1704 | } at ApiUtils.setUpTaxRate (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:1701:65) at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:63:9
[e2e_setup] β€Ί _env.setup.ts:62:10 β€Ί setup site & woocommerce & dokan settings β€Ί set tax rate @lite: tests/pw/utils/apiUtils.ts#L1701
2) [e2e_setup] β€Ί _env.setup.ts:62:10 β€Ί setup site & woocommerce & dokan settings β€Ί set tax rate @lite Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'map') at ../../utils/apiUtils.ts:1701 1699 | 1700 | // delete previous tax rates > 1701 | const allTaxRateIds = (await this.getAllTaxRates(auth)).map((o: { id: unknown }) => o.id); | ^ 1702 | if (allTaxRateIds.length) { 1703 | await this.updateBatchTaxRates('delete', allTaxRateIds, auth); 1704 | } at ApiUtils.setUpTaxRate (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:1701:65) at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:63:9
[e2e_setup] β€Ί _env.setup.ts:66:10 β€Ί setup site & woocommerce & dokan settings β€Ί set shipping methods @lite: tests/pw/tests/e2e/_env.setup.ts#L68
3) [e2e_setup] β€Ί _env.setup.ts:66:10 β€Ί setup site & woocommerce & dokan settings β€Ί set shipping methods @lite TypeError: Cannot read properties of undefined (reading 'map') 66 | setup('set shipping methods @lite', async () => { 67 | // delete previous shipping zones > 68 | const allShippingZoneIds = (await apiUtils.getAllShippingZones()).map((a: { id: string }) => a.id); | ^ 69 | // allShippingZoneIds = helpers.removeItem(allShippingZoneIds, 0) // avoid remove default zone id 70 | if (allShippingZoneIds?.length) { 71 | for (const shippingZoneId of allShippingZoneIds) { at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:68:75
[e2e_setup] β€Ί _env.setup.ts:66:10 β€Ί setup site & woocommerce & dokan settings β€Ί set shipping methods @lite: tests/pw/tests/e2e/_env.setup.ts#L68
3) [e2e_setup] β€Ί _env.setup.ts:66:10 β€Ί setup site & woocommerce & dokan settings β€Ί set shipping methods @lite Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'map') 66 | setup('set shipping methods @lite', async () => { 67 | // delete previous shipping zones > 68 | const allShippingZoneIds = (await apiUtils.getAllShippingZones()).map((a: { id: string }) => a.id); | ^ 69 | // allShippingZoneIds = helpers.removeItem(allShippingZoneIds, 0) // avoid remove default zone id 70 | if (allShippingZoneIds?.length) { 71 | for (const shippingZoneId of allShippingZoneIds) { at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:68:75
[e2e_setup] β€Ί _env.setup.ts:100:10 β€Ί setup site & woocommerce & dokan settings β€Ί add categories and attributes @lite: tests/pw/tests/e2e/_env.setup.ts#L102
4) [e2e_setup] β€Ί _env.setup.ts:100:10 β€Ί setup site & woocommerce & dokan settings β€Ί add categories and attributes @lite TypeError: Cannot read properties of undefined (reading 'map') 100 | setup('add categories and attributes @lite', async () => { 101 | // delete previous categories > 102 | const allCategoryIds = (await apiUtils.getAllCategories()).map((a: { id: string }) => a.id); | ^ 103 | await apiUtils.updateBatchCategories('delete', allCategoryIds); 104 | 105 | // delete previous attributes at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:102:68
[e2e_setup] β€Ί _env.setup.ts:100:10 β€Ί setup site & woocommerce & dokan settings β€Ί add categories and attributes @lite: tests/pw/tests/e2e/_env.setup.ts#L102
4) [e2e_setup] β€Ί _env.setup.ts:100:10 β€Ί setup site & woocommerce & dokan settings β€Ί add categories and attributes @lite Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'map') 100 | setup('add categories and attributes @lite', async () => { 101 | // delete previous categories > 102 | const allCategoryIds = (await apiUtils.getAllCategories()).map((a: { id: string }) => a.id); | ^ 103 | await apiUtils.updateBatchCategories('delete', allCategoryIds); 104 | 105 | // delete previous attributes at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:102:68
[e2e_setup] β€Ί _env.setup.ts:119:10 β€Ί setup site & woocommerce & dokan settings β€Ί disable simple-auction ajax bid check @pro: tests/pw/utils/apiUtils.ts#L1381
5) [e2e_setup] β€Ί _env.setup.ts:119:10 β€Ί setup site & woocommerce & dokan settings β€Ί disable simple-auction ajax bid check @Pro TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:1381 1379 | async getSinglePlugin(plugin: string, auth?: auth): Promise<[responseBody, string, string]> { 1380 | const [response, responseBody] = await this.get(endPoints.wp.getSinglePlugin(plugin), { headers: auth }, false); > 1381 | if (responseBody.code) { | ^ 1382 | expect(response.status()).toBe(404); 1383 | return [responseBody, plugin, 'not exists']; 1384 | } at ApiUtils.getSinglePlugin (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:1381:26) at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:121:30
[e2e_setup] β€Ί _env.setup.ts:119:10 β€Ί setup site & woocommerce & dokan settings β€Ί disable simple-auction ajax bid check @pro: tests/pw/utils/apiUtils.ts#L1381
5) [e2e_setup] β€Ί _env.setup.ts:119:10 β€Ί setup site & woocommerce & dokan settings β€Ί disable simple-auction ajax bid check @Pro Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TypeError: Cannot read properties of undefined (reading 'code') at ../../utils/apiUtils.ts:1381 1379 | async getSinglePlugin(plugin: string, auth?: auth): Promise<[responseBody, string, string]> { 1380 | const [response, responseBody] = await this.get(endPoints.wp.getSinglePlugin(plugin), { headers: auth }, false); > 1381 | if (responseBody.code) { | ^ 1382 | expect(response.status()).toBe(404); 1383 | return [responseBody, plugin, 'not exists']; 1384 | } at ApiUtils.getSinglePlugin (/home/runner/work/dokan/dokan/tests/pw/utils/apiUtils.ts:1381:26) at /home/runner/work/dokan/dokan/tests/pw/tests/e2e/_env.setup.ts:121:30
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_setup] β€Ί _env.setup.ts#L1
tests/pw/[api_setup] β€Ί _env.setup.ts took 12.8s
Slow Test: tests/pw/[api_setup] β€Ί _auth.setup.ts#L1
tests/pw/[api_setup] β€Ί _auth.setup.ts took 8.2s
Slow Test: tests/pw/[e2e_setup] β€Ί _env.setup.ts#L1
tests/pw/[e2e_setup] β€Ί _env.setup.ts took 3.7m
Slow Test: tests/pw/[auth_setup] β€Ί _auth.setup.ts#L1
tests/pw/[auth_setup] β€Ί _auth.setup.ts took 24.8s
🎭 Playwright Run Summary
11 failed [coverage_report] β€Ί _coverage.teardown.ts:21:9 β€Ί get api test coverage β€Ί get coverage ────────── [api_setup] β€Ί _auth.setup.ts:36:10 β€Ί setup test environment β€Ί create customer @lite ──────────── [api_setup] β€Ί _auth.setup.ts:41:10 β€Ί setup test environment β€Ί create vendor @lite ────────────── [api_setup] β€Ί _auth.setup.ts:46:10 β€Ί setup test environment β€Ί add vendor2 @lite ──────────────── [api_setup] β€Ί _auth.setup.ts:51:10 β€Ί setup test environment β€Ί dokan pro enabled or not @lite ─── [api_setup] β€Ί _auth.setup.ts:59:10 β€Ί setup test environment β€Ί get test environment info @lite ── [api_setup] β€Ί _env.setup.ts:27:10 β€Ί setup site & woocommerce & user settings β€Ί check active plugins @lite [api_setup] β€Ί _env.setup.ts:33:10 β€Ί setup site & woocommerce & user settings β€Ί set wordPress site settings @lite [api_setup] β€Ί _env.setup.ts:55:10 β€Ί setup site & woocommerce & user settings β€Ί check active dokan modules @Pro [api_setup] β€Ί _env.setup.ts:106:10 β€Ί setup dokan settings β€Ί admin set dokan page settings @lite [api_setup] β€Ί _env.setup.ts:117:10 β€Ί setup dokan settings β€Ί admin set dokan privacy policy settings @lite 6 skipped 273 did not run 24 passed (39.4s)
🎭 Playwright Run Summary
13 failed [e2e_setup] β€Ί _env.setup.ts:56:10 β€Ί setup site & woocommerce & dokan settings β€Ί check active dokan modules @Pro [e2e_setup] β€Ί _env.setup.ts:62:10 β€Ί setup site & woocommerce & dokan settings β€Ί set tax rate @lite [e2e_setup] β€Ί _env.setup.ts:66:10 β€Ί setup site & woocommerce & dokan settings β€Ί set shipping methods @lite [e2e_setup] β€Ί _env.setup.ts:100:10 β€Ί setup site & woocommerce & dokan settings β€Ί add categories and attributes @lite [e2e_setup] β€Ί _env.setup.ts:119:10 β€Ί setup site & woocommerce & dokan settings β€Ί disable simple-auction ajax bid check @Pro [e2e_setup] β€Ί _env.setup.ts:156:10 β€Ί setup user settings β€Ί add vendor coupon @Pro ────────────── [e2e_setup] β€Ί _env.setup.ts:199:10 β€Ί setup dokan settings β€Ί admin set dokan page settings @lite [e2e_setup] β€Ί _env.setup.ts:210:10 β€Ί setup dokan settings β€Ί admin set dokan privacy policy settings @lite [e2e_setup] β€Ί _env.setup.ts:315:10 β€Ί setup dokan settings e2e β€Ί recreate reverse withdrawal payment product via settings save @lite [e2e_setup] β€Ί _env.setup.ts:319:10 β€Ί setup dokan settings e2e β€Ί reverse Withdraw payment product exists @lite [e2e_setup] β€Ί _env.setup.ts:324:10 β€Ί setup dokan settings e2e β€Ί recreate product advertisement payment product via settings save @Pro [e2e_setup] β€Ί _env.setup.ts:329:10 β€Ί setup dokan settings e2e β€Ί product advertisement payment product exists @Pro [e2e_setup] β€Ί _env.setup.ts:335:10 β€Ί setup dokan settings e2e β€Ί save store settings to update store on map @lite 12 skipped 589 did not run 27 passed (5.1m)

Artifacts

Produced during runtime
Name Size
test-artifact Expired
44.5 MB