@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.
Files changed (62) hide show
  1. package/README.md +39 -39
  2. package/Testwise.ts +2 -3
  3. package/config.json +9 -9
  4. package/dist/Testwise.js +2 -4
  5. package/dist/Testwise.js.map +1 -1
  6. package/dist/Testwise.json +25 -0
  7. package/dist/helpers/LoginHelper.d.ts +2 -2
  8. package/dist/helpers/LoginHelper.js +3 -3
  9. package/dist/helpers/LoginHelper.js.map +1 -1
  10. package/dist/package-lock.json +2 -2
  11. package/dist/package.json +1 -1
  12. package/dist/page-extensions/GlobalComponents.d.ts +19 -0
  13. package/dist/page-extensions/GlobalComponents.js +21 -0
  14. package/dist/page-extensions/GlobalComponents.js.map +1 -0
  15. package/dist/page-extensions/LoginFeatures.d.ts +1 -1
  16. package/dist/page-extensions/LoginFeatures.js +2 -2
  17. package/dist/page-extensions/LoginFeatures.js.map +1 -1
  18. package/dist/page-extensions/index.d.ts +1 -0
  19. package/dist/page-extensions/index.js +1 -0
  20. package/dist/page-extensions/index.js.map +1 -1
  21. package/dist/seed-data/screen-schemas/chart.json +25 -0
  22. package/dist/seed-data/screen-schemas/chart_horizontal.json +25 -0
  23. package/dist/seed-data/screen-schemas/chart_no_fields.json +14 -0
  24. package/dist/seed-data/screen-schemas/cube.json +40 -0
  25. package/dist/seed-data/screen-schemas/cube_horizontal.json +40 -0
  26. package/dist/seed-data/screen-schemas/cube_no_fields.json +25 -0
  27. package/dist/seed-data/screen-schemas/form_only.json +20 -0
  28. package/dist/seed-data/screen-schemas/form_with_tree.json +20 -0
  29. package/dist/seed-data/screen-schemas/grid_with_card_list.json +20 -0
  30. package/dist/seed-data/screen-schemas/grid_with_filter_form.json +20 -0
  31. package/dist/seed-data/screen-schemas/grid_with_map.json +20 -0
  32. package/dist/seed-data/screen-schemas/grid_with_prefilter_bar.json +20 -0
  33. package/dist/seed-data/screen-schemas/grid_with_report_bar.json +20 -0
  34. package/dist/seed-data/screen-schemas/grid_with_report_tiles.json +20 -0
  35. package/dist/seed-data/screen-schemas/hierarchy.json +43 -0
  36. package/dist/seed-data/screen-schemas/hierarchy_card_list.json +39 -0
  37. package/dist/seed-data/screen-schemas/hierarchy_no_filter.json +38 -0
  38. package/dist/seed-data/screen-schemas/look_up_popup.json +48 -0
  39. package/dist/seed-data/screen-schemas/master_detail.json +39 -0
  40. package/dist/seed-data/screen-schemas/master_detail_no_filter.json +34 -0
  41. package/dist/seed-data/screen-schemas/master_detail_vertical.json +39 -0
  42. package/dist/seed-data/screen-schemas/master_detail_with_preview.json +25 -0
  43. package/dist/seed-data/screen-schemas/master_detail_with_task_bar.json +48 -0
  44. package/dist/seed-data/screen-schemas/master_detail_with_task_tiles.json +44 -0
  45. package/dist/seed-data/screen-schemas/master_vertical_detail.json +39 -0
  46. package/dist/seed-data/screen-schemas/pivot_grid.json +25 -0
  47. package/dist/seed-data/screen-schemas/pivot_grid_horizontal.json +25 -0
  48. package/dist/seed-data/screen-schemas/pivot_grid_no_fields.json +14 -0
  49. package/dist/seed-data/screen-schemas/scheduler.json +14 -0
  50. package/dist/seed-data/screen-schemas/test.json +30 -0
  51. package/dist/seed-data/screen-schemas/testpoonam.json +40 -0
  52. package/dist/seed-data/screen-schemas/view_customer_cube.json +36 -0
  53. package/dist/seed-data/subjects.json +1586 -0
  54. package/helpers/LoginHelper.ts +3 -3
  55. package/package.json +58 -58
  56. package/page-extensions/GlobalComponents.ts +37 -0
  57. package/page-extensions/LoginFeatures.ts +3 -3
  58. package/page-extensions/index.ts +1 -0
  59. package/scripts/Testwise.template.json +24 -24
  60. package/scripts/main.js +11 -11
  61. package/scripts/tsconfig.template.json +11 -11
  62. package/tsconfig.json +19 -19
@@ -31,12 +31,12 @@ export class LoginHelper {
31
31
 
32
32
  /**
33
33
  * Log in and go to a specified application
34
- * @param applicationName - Application name to launch
34
+ * @param applicationId - Application name to launch
35
35
  */
36
- public async logIn(applicationName: string = configFixture.defaultApplication) {
36
+ public async logIn(applicationId?: string) {
37
37
  await this.logInAndConfigureApplication({
38
38
  config: {
39
- defaultApplication: applicationName
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.66",
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) => {
@@ -1,3 +1,4 @@
1
+ export * from './GlobalComponents.js';
1
2
  export * from './GoToDeepLink.js';
2
3
  export * from './LoginFeatures.js';
3
4
  export * from './UserSimulation.js';
@@ -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
  }