@thinkwise/testwise 0.1.66 → 0.1.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -39
- package/Testwise.ts +2 -3
- package/config.json +9 -9
- package/dist/Testwise.js +2 -4
- package/dist/Testwise.js.map +1 -1
- package/dist/Testwise.json +25 -0
- package/dist/helpers/LoginHelper.d.ts +2 -2
- package/dist/helpers/LoginHelper.js +3 -3
- package/dist/helpers/LoginHelper.js.map +1 -1
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/dist/page-extensions/GlobalComponents.d.ts +19 -0
- package/dist/page-extensions/GlobalComponents.js +21 -0
- package/dist/page-extensions/GlobalComponents.js.map +1 -0
- package/dist/page-extensions/LoginFeatures.d.ts +1 -1
- package/dist/page-extensions/LoginFeatures.js +2 -2
- package/dist/page-extensions/LoginFeatures.js.map +1 -1
- package/dist/page-extensions/index.d.ts +1 -0
- package/dist/page-extensions/index.js +1 -0
- package/dist/page-extensions/index.js.map +1 -1
- package/dist/seed-data/screen-schemas/chart.json +25 -0
- package/dist/seed-data/screen-schemas/chart_horizontal.json +25 -0
- package/dist/seed-data/screen-schemas/chart_no_fields.json +14 -0
- package/dist/seed-data/screen-schemas/cube.json +40 -0
- package/dist/seed-data/screen-schemas/cube_horizontal.json +40 -0
- package/dist/seed-data/screen-schemas/cube_no_fields.json +25 -0
- package/dist/seed-data/screen-schemas/form_only.json +20 -0
- package/dist/seed-data/screen-schemas/form_with_tree.json +20 -0
- package/dist/seed-data/screen-schemas/grid_with_card_list.json +20 -0
- package/dist/seed-data/screen-schemas/grid_with_filter_form.json +20 -0
- package/dist/seed-data/screen-schemas/grid_with_map.json +20 -0
- package/dist/seed-data/screen-schemas/grid_with_prefilter_bar.json +20 -0
- package/dist/seed-data/screen-schemas/grid_with_report_bar.json +20 -0
- package/dist/seed-data/screen-schemas/grid_with_report_tiles.json +20 -0
- package/dist/seed-data/screen-schemas/hierarchy.json +43 -0
- package/dist/seed-data/screen-schemas/hierarchy_card_list.json +39 -0
- package/dist/seed-data/screen-schemas/hierarchy_no_filter.json +38 -0
- package/dist/seed-data/screen-schemas/look_up_popup.json +48 -0
- package/dist/seed-data/screen-schemas/master_detail.json +39 -0
- package/dist/seed-data/screen-schemas/master_detail_no_filter.json +34 -0
- package/dist/seed-data/screen-schemas/master_detail_vertical.json +39 -0
- package/dist/seed-data/screen-schemas/master_detail_with_preview.json +25 -0
- package/dist/seed-data/screen-schemas/master_detail_with_task_bar.json +48 -0
- package/dist/seed-data/screen-schemas/master_detail_with_task_tiles.json +44 -0
- package/dist/seed-data/screen-schemas/master_vertical_detail.json +39 -0
- package/dist/seed-data/screen-schemas/pivot_grid.json +25 -0
- package/dist/seed-data/screen-schemas/pivot_grid_horizontal.json +25 -0
- package/dist/seed-data/screen-schemas/pivot_grid_no_fields.json +14 -0
- package/dist/seed-data/screen-schemas/scheduler.json +14 -0
- package/dist/seed-data/screen-schemas/test.json +30 -0
- package/dist/seed-data/screen-schemas/testpoonam.json +40 -0
- package/dist/seed-data/screen-schemas/view_customer_cube.json +36 -0
- package/dist/seed-data/subjects.json +1586 -0
- package/helpers/LoginHelper.ts +3 -3
- package/package.json +58 -58
- package/page-extensions/GlobalComponents.ts +37 -0
- package/page-extensions/LoginFeatures.ts +3 -3
- package/page-extensions/index.ts +1 -0
- package/scripts/Testwise.template.json +24 -24
- package/scripts/main.js +11 -11
- package/scripts/tsconfig.template.json +11 -11
- package/tsconfig.json +19 -19
package/helpers/LoginHelper.ts
CHANGED
|
@@ -31,12 +31,12 @@ export class LoginHelper {
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Log in and go to a specified application
|
|
34
|
-
* @param
|
|
34
|
+
* @param applicationId - Application name to launch
|
|
35
35
|
*/
|
|
36
|
-
public async logIn(
|
|
36
|
+
public async logIn(applicationId?: string) {
|
|
37
37
|
await this.logInAndConfigureApplication({
|
|
38
38
|
config: {
|
|
39
|
-
defaultApplication:
|
|
39
|
+
defaultApplication: applicationId ?? configFixture.defaultApplication
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thinkwise/testwise",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"testwise": "./scripts/main.js",
|
|
8
|
-
"testwise-credentials": "./promptCredentials.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"lint": "eslint ./ --cache --ignore-pattern .gitignore",
|
|
12
|
-
"format:fix": "run-s \"lint --fix\" && biome check --fix --unsafe",
|
|
13
|
-
"format:check": "run-s \"lint \" && biome check"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [],
|
|
16
|
-
"author": "",
|
|
17
|
-
"license": "ISC",
|
|
18
|
-
"description": "",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@types/node": "^22.15.29",
|
|
21
|
-
"axios": "^1.9.0",
|
|
22
|
-
"chalk": "^5.4.1",
|
|
23
|
-
"csv-parse": "^5.6.0",
|
|
24
|
-
"dotenv": "^17.2.2",
|
|
25
|
-
"prompts": "^2.4.2"
|
|
26
|
-
},
|
|
27
|
-
"peerDependencies": {
|
|
28
|
-
"@playwright/test": "^1.52.0",
|
|
29
|
-
"typescript": "^5.8.3"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@biomejs/biome": "^2.1.2",
|
|
33
|
-
"@eslint/js": "^9.28.0",
|
|
34
|
-
"@playwright/test": "^1.52.0",
|
|
35
|
-
"eslint": "^9.28.0",
|
|
36
|
-
"eslint-plugin-playwright": "^2.2.0",
|
|
37
|
-
"npm-run-all": "^4.1.5",
|
|
38
|
-
"typescript-eslint": "^8.34.0"
|
|
39
|
-
},
|
|
40
|
-
"files": [
|
|
41
|
-
"dist/",
|
|
42
|
-
"scripts/",
|
|
43
|
-
"components/",
|
|
44
|
-
"services/",
|
|
45
|
-
"controls/",
|
|
46
|
-
"helpers/",
|
|
47
|
-
"page-extensions/",
|
|
48
|
-
"page-overrides/",
|
|
49
|
-
"index.ts",
|
|
50
|
-
"Testwise.ts",
|
|
51
|
-
"types/",
|
|
52
|
-
"enums/",
|
|
53
|
-
"tsconfig.json",
|
|
54
|
-
"example-code/",
|
|
55
|
-
"interfaces/",
|
|
56
|
-
"**/config.json"
|
|
57
|
-
]
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thinkwise/testwise",
|
|
3
|
+
"version": "0.1.75",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"testwise": "./scripts/main.js",
|
|
8
|
+
"testwise-credentials": "./promptCredentials.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"lint": "eslint ./ --cache --ignore-pattern .gitignore",
|
|
12
|
+
"format:fix": "run-s \"lint --fix\" && biome check --fix --unsafe",
|
|
13
|
+
"format:check": "run-s \"lint \" && biome check"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"description": "",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@types/node": "^22.15.29",
|
|
21
|
+
"axios": "^1.9.0",
|
|
22
|
+
"chalk": "^5.4.1",
|
|
23
|
+
"csv-parse": "^5.6.0",
|
|
24
|
+
"dotenv": "^17.2.2",
|
|
25
|
+
"prompts": "^2.4.2"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@playwright/test": "^1.52.0",
|
|
29
|
+
"typescript": "^5.8.3"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@biomejs/biome": "^2.1.2",
|
|
33
|
+
"@eslint/js": "^9.28.0",
|
|
34
|
+
"@playwright/test": "^1.52.0",
|
|
35
|
+
"eslint": "^9.28.0",
|
|
36
|
+
"eslint-plugin-playwright": "^2.2.0",
|
|
37
|
+
"npm-run-all": "^4.1.5",
|
|
38
|
+
"typescript-eslint": "^8.34.0"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist/",
|
|
42
|
+
"scripts/",
|
|
43
|
+
"components/",
|
|
44
|
+
"services/",
|
|
45
|
+
"controls/",
|
|
46
|
+
"helpers/",
|
|
47
|
+
"page-extensions/",
|
|
48
|
+
"page-overrides/",
|
|
49
|
+
"index.ts",
|
|
50
|
+
"Testwise.ts",
|
|
51
|
+
"types/",
|
|
52
|
+
"enums/",
|
|
53
|
+
"tsconfig.json",
|
|
54
|
+
"example-code/",
|
|
55
|
+
"interfaces/",
|
|
56
|
+
"**/config.json"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Page } from '@playwright/test';
|
|
2
|
+
import { ExportComponent, PopUpComponent } from '../components/index.js';
|
|
3
|
+
import type { Test } from '../types/CoreTypes.js';
|
|
4
|
+
|
|
5
|
+
class GlobalComponents {
|
|
6
|
+
public popUp: PopUpComponent;
|
|
7
|
+
public export: ExportComponent;
|
|
8
|
+
|
|
9
|
+
constructor(page: Page) {
|
|
10
|
+
this.popUp = new PopUpComponent(page);
|
|
11
|
+
this.export = new ExportComponent(page);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare module '@playwright/test' {
|
|
16
|
+
interface Page {
|
|
17
|
+
components: GlobalComponents;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class Components {
|
|
22
|
+
private _test: Test;
|
|
23
|
+
|
|
24
|
+
constructor(test: Test) {
|
|
25
|
+
this._test = test.extend({
|
|
26
|
+
page: async ({ page }, use) => {
|
|
27
|
+
page.components = new GlobalComponents(page);
|
|
28
|
+
|
|
29
|
+
await use(page);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get test() {
|
|
35
|
+
return this._test;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -4,7 +4,7 @@ import type { UniversalLoginOptions } from '../types/index.js';
|
|
|
4
4
|
|
|
5
5
|
declare module '@playwright/test' {
|
|
6
6
|
interface Page {
|
|
7
|
-
logIn(): Promise<void>;
|
|
7
|
+
logIn(applicationId?: string): Promise<void>;
|
|
8
8
|
logInWithCredentials(username: string, password: string): Promise<void>;
|
|
9
9
|
logInWithOptions(options: UniversalLoginOptions): Promise<void>;
|
|
10
10
|
logOut(): Promise<void>;
|
|
@@ -20,8 +20,8 @@ export class LoginFeatures {
|
|
|
20
20
|
page: async ({ page }, use) => {
|
|
21
21
|
this._loginHelper = new LoginHelper(page);
|
|
22
22
|
|
|
23
|
-
page.logIn = async () => {
|
|
24
|
-
await this.loginHelper.logIn();
|
|
23
|
+
page.logIn = async (applicationId?: string) => {
|
|
24
|
+
await this.loginHelper.logIn(applicationId);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
page.logInWithCredentials = async (username: string, password: string) => {
|
package/page-extensions/index.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"environmentSettings" :{
|
|
3
|
-
"baseUrl" : "https://develop.example.app",
|
|
4
|
-
"serviceUrl" : "https://develop.example.app/service",
|
|
5
|
-
"metaEndpoint" : "iam"
|
|
6
|
-
},
|
|
7
|
-
"featureSettings" :{
|
|
8
|
-
"logger" : {
|
|
9
|
-
"logDir" : "logs",
|
|
10
|
-
"logLevel" : "info",
|
|
11
|
-
"applyLogLevelToConsoleOutput" : false,
|
|
12
|
-
"logByDay" : true,
|
|
13
|
-
"bufferSizeLimit" : -1
|
|
14
|
-
},
|
|
15
|
-
"InflightRequests" : {
|
|
16
|
-
"waitForRequestsToComplete" : true,
|
|
17
|
-
"waitTimeout" : 5000,
|
|
18
|
-
"continueOnError" : true,
|
|
19
|
-
"paths" : ["/stage", "/layout()", "/context()"]
|
|
20
|
-
},
|
|
21
|
-
"other" : {
|
|
22
|
-
"loginTimeout" : 30000
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"environmentSettings" :{
|
|
3
|
+
"baseUrl" : "https://develop.example.app",
|
|
4
|
+
"serviceUrl" : "https://develop.example.app/service",
|
|
5
|
+
"metaEndpoint" : "iam"
|
|
6
|
+
},
|
|
7
|
+
"featureSettings" :{
|
|
8
|
+
"logger" : {
|
|
9
|
+
"logDir" : "logs",
|
|
10
|
+
"logLevel" : "info",
|
|
11
|
+
"applyLogLevelToConsoleOutput" : false,
|
|
12
|
+
"logByDay" : true,
|
|
13
|
+
"bufferSizeLimit" : -1
|
|
14
|
+
},
|
|
15
|
+
"InflightRequests" : {
|
|
16
|
+
"waitForRequestsToComplete" : true,
|
|
17
|
+
"waitTimeout" : 5000,
|
|
18
|
+
"continueOnError" : true,
|
|
19
|
+
"paths" : ["/stage", "/layout()", "/context()"]
|
|
20
|
+
},
|
|
21
|
+
"other" : {
|
|
22
|
+
"loginTimeout" : 30000
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
25
|
}
|
package/scripts/main.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import process from 'node:process';
|
|
3
|
-
import { setup } from './setup.js';
|
|
4
|
-
|
|
5
|
-
if (process.argv[2] === 'install') {
|
|
6
|
-
setup();
|
|
7
|
-
} else if (process.argv[2] === 'sync') {
|
|
8
|
-
console.log('This feature is coming soon!');
|
|
9
|
-
} else {
|
|
10
|
-
console.warn('Command unknown. Use "install" or "sync".');
|
|
11
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import process from 'node:process';
|
|
3
|
+
import { setup } from './setup.js';
|
|
4
|
+
|
|
5
|
+
if (process.argv[2] === 'install') {
|
|
6
|
+
setup();
|
|
7
|
+
} else if (process.argv[2] === 'sync') {
|
|
8
|
+
console.log('This feature is coming soon!');
|
|
9
|
+
} else {
|
|
10
|
+
console.warn('Command unknown. Use "install" or "sync".');
|
|
11
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2016",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"typeRoots": ["./node_modules/@types", "./types"],
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"skipLibCheck": true
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2016",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"typeRoots": ["./node_modules/@types", "./types"],
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true
|
|
11
|
+
}
|
|
12
12
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "nodenext",
|
|
5
|
-
"moduleResolution": "nodenext",
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"allowSyntheticDefaultImports": true,
|
|
8
|
-
"outDir": "dist",
|
|
9
|
-
"declaration": true,
|
|
10
|
-
"sourceMap": true,
|
|
11
|
-
"resolveJsonModule": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"strict": true
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"**/*.ts",
|
|
17
|
-
"**/*.json"
|
|
18
|
-
],
|
|
19
|
-
"exclude": ["dist", "node_modules"]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "nodenext",
|
|
5
|
+
"moduleResolution": "nodenext",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"allowSyntheticDefaultImports": true,
|
|
8
|
+
"outDir": "dist",
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"strict": true
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"**/*.ts",
|
|
17
|
+
"**/*.json"
|
|
18
|
+
],
|
|
19
|
+
"exclude": ["dist", "node_modules"]
|
|
20
20
|
}
|