@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.
- package/README.md +39 -0
- package/Testwise.ts +2 -3
- package/components/grid/Grid.ts +23 -0
- package/components/grid/GridObjects.ts +3 -1
- package/dist/Testwise.js +2 -4
- package/dist/Testwise.js.map +1 -1
- package/dist/Testwise.json +25 -0
- package/dist/components/grid/Grid.d.ts +19 -0
- package/dist/components/grid/Grid.js +21 -0
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/GridObjects.d.ts +1 -0
- package/dist/components/grid/GridObjects.js +2 -1
- package/dist/components/grid/GridObjects.js.map +1 -1
- 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 +223 -254
- package/dist/package.json +5 -6
- 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 +1 -1
- package/page-extensions/GlobalComponents.ts +37 -0
- package/page-extensions/LoginFeatures.ts +3 -3
- package/page-extensions/index.ts +1 -0
- package/scripts/setup.js +34 -34
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
|
@@ -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
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
|
+
}
|