Merge branch 'litetests' into e2e-pw #54
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 |
|