@thinkwise/testwise 0.1.65 → 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 (66) hide show
  1. package/README.md +39 -0
  2. package/Testwise.ts +2 -3
  3. package/components/grid/Grid.ts +23 -0
  4. package/components/grid/GridObjects.ts +3 -1
  5. package/dist/Testwise.js +2 -4
  6. package/dist/Testwise.js.map +1 -1
  7. package/dist/Testwise.json +25 -0
  8. package/dist/components/grid/Grid.d.ts +19 -0
  9. package/dist/components/grid/Grid.js +21 -0
  10. package/dist/components/grid/Grid.js.map +1 -1
  11. package/dist/components/grid/GridObjects.d.ts +1 -0
  12. package/dist/components/grid/GridObjects.js +2 -1
  13. package/dist/components/grid/GridObjects.js.map +1 -1
  14. package/dist/helpers/LoginHelper.d.ts +2 -2
  15. package/dist/helpers/LoginHelper.js +3 -3
  16. package/dist/helpers/LoginHelper.js.map +1 -1
  17. package/dist/package-lock.json +223 -254
  18. package/dist/package.json +5 -6
  19. package/dist/page-extensions/GlobalComponents.d.ts +19 -0
  20. package/dist/page-extensions/GlobalComponents.js +21 -0
  21. package/dist/page-extensions/GlobalComponents.js.map +1 -0
  22. package/dist/page-extensions/LoginFeatures.d.ts +1 -1
  23. package/dist/page-extensions/LoginFeatures.js +2 -2
  24. package/dist/page-extensions/LoginFeatures.js.map +1 -1
  25. package/dist/page-extensions/index.d.ts +1 -0
  26. package/dist/page-extensions/index.js +1 -0
  27. package/dist/page-extensions/index.js.map +1 -1
  28. package/dist/seed-data/screen-schemas/chart.json +25 -0
  29. package/dist/seed-data/screen-schemas/chart_horizontal.json +25 -0
  30. package/dist/seed-data/screen-schemas/chart_no_fields.json +14 -0
  31. package/dist/seed-data/screen-schemas/cube.json +40 -0
  32. package/dist/seed-data/screen-schemas/cube_horizontal.json +40 -0
  33. package/dist/seed-data/screen-schemas/cube_no_fields.json +25 -0
  34. package/dist/seed-data/screen-schemas/form_only.json +20 -0
  35. package/dist/seed-data/screen-schemas/form_with_tree.json +20 -0
  36. package/dist/seed-data/screen-schemas/grid_with_card_list.json +20 -0
  37. package/dist/seed-data/screen-schemas/grid_with_filter_form.json +20 -0
  38. package/dist/seed-data/screen-schemas/grid_with_map.json +20 -0
  39. package/dist/seed-data/screen-schemas/grid_with_prefilter_bar.json +20 -0
  40. package/dist/seed-data/screen-schemas/grid_with_report_bar.json +20 -0
  41. package/dist/seed-data/screen-schemas/grid_with_report_tiles.json +20 -0
  42. package/dist/seed-data/screen-schemas/hierarchy.json +43 -0
  43. package/dist/seed-data/screen-schemas/hierarchy_card_list.json +39 -0
  44. package/dist/seed-data/screen-schemas/hierarchy_no_filter.json +38 -0
  45. package/dist/seed-data/screen-schemas/look_up_popup.json +48 -0
  46. package/dist/seed-data/screen-schemas/master_detail.json +39 -0
  47. package/dist/seed-data/screen-schemas/master_detail_no_filter.json +34 -0
  48. package/dist/seed-data/screen-schemas/master_detail_vertical.json +39 -0
  49. package/dist/seed-data/screen-schemas/master_detail_with_preview.json +25 -0
  50. package/dist/seed-data/screen-schemas/master_detail_with_task_bar.json +48 -0
  51. package/dist/seed-data/screen-schemas/master_detail_with_task_tiles.json +44 -0
  52. package/dist/seed-data/screen-schemas/master_vertical_detail.json +39 -0
  53. package/dist/seed-data/screen-schemas/pivot_grid.json +25 -0
  54. package/dist/seed-data/screen-schemas/pivot_grid_horizontal.json +25 -0
  55. package/dist/seed-data/screen-schemas/pivot_grid_no_fields.json +14 -0
  56. package/dist/seed-data/screen-schemas/scheduler.json +14 -0
  57. package/dist/seed-data/screen-schemas/test.json +30 -0
  58. package/dist/seed-data/screen-schemas/testpoonam.json +40 -0
  59. package/dist/seed-data/screen-schemas/view_customer_cube.json +36 -0
  60. package/dist/seed-data/subjects.json +1586 -0
  61. package/helpers/LoginHelper.ts +3 -3
  62. package/package.json +1 -1
  63. package/page-extensions/GlobalComponents.ts +37 -0
  64. package/page-extensions/LoginFeatures.ts +3 -3
  65. package/page-extensions/index.ts +1 -0
  66. package/scripts/setup.js +34 -34
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkwise/testwise",
3
- "version": "0.1.65",
3
+ "version": "0.1.75",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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';
package/scripts/setup.js CHANGED
@@ -1,34 +1,34 @@
1
- /* eslint-disable @typescript-eslint/naming-convention */
2
- import fs from 'node:fs';
3
- import path from 'node:path';
4
- import process from 'node:process';
5
- import { fileURLToPath } from 'node:url';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = path.dirname(__filename);
9
-
10
- export function setup() {
11
- try {
12
- const testwiseConfigFile = path.resolve(process.cwd(), 'Testwise.json');
13
- const testwiseConfigTemplateFile = path.join(__dirname, 'Testwise.template.json');
14
- const tsConfigFile = path.resolve(process.cwd(), 'tsconfig.json');
15
- const tsConfigTemplateFile = path.join(__dirname, 'tsconfig.template.json');
16
-
17
- if (!fs.existsSync(testwiseConfigFile)) {
18
- fs.copyFileSync(testwiseConfigTemplateFile, testwiseConfigFile);
19
- console.info('Testwise.json config file created.');
20
- } else {
21
- console.info('Testwise.json already exists, skipping creation.');
22
- }
23
-
24
- if (!fs.existsSync(tsConfigFile)) {
25
- fs.copyFileSync(tsConfigTemplateFile, tsConfigFile);
26
- console.info('tsconfig.json config file created.');
27
- } else {
28
- console.info('tsconfig.json already exists, skipping creation.');
29
- }
30
- } catch (error) {
31
- console.error('Error during installation:', error.message);
32
- process.exit(1); // Exit with an error code if something goes wrong
33
- }
34
- }
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import process from 'node:process';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = path.dirname(__filename);
9
+
10
+ export function setup() {
11
+ try {
12
+ const testwiseConfigFile = path.resolve(process.cwd(), 'Testwise.json');
13
+ const testwiseConfigTemplateFile = path.join(__dirname, 'Testwise.template.json');
14
+ const tsConfigFile = path.resolve(process.cwd(), 'tsconfig.json');
15
+ const tsConfigTemplateFile = path.join(__dirname, 'tsconfig.template.json');
16
+
17
+ if (!fs.existsSync(testwiseConfigFile)) {
18
+ fs.copyFileSync(testwiseConfigTemplateFile, testwiseConfigFile);
19
+ console.info('Testwise.json config file created.');
20
+ } else {
21
+ console.info('Testwise.json already exists, skipping creation.');
22
+ }
23
+
24
+ if (!fs.existsSync(tsConfigFile)) {
25
+ fs.copyFileSync(tsConfigTemplateFile, tsConfigFile);
26
+ console.info('tsconfig.json config file created.');
27
+ } else {
28
+ console.info('tsconfig.json already exists, skipping creation.');
29
+ }
30
+ } catch (error) {
31
+ console.error('Error during installation:', error.message);
32
+ process.exit(1); // Exit with an error code if something goes wrong
33
+ }
34
+ }