vita-playwright 1.0.4 → 1.0.6
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/dist/index.d.ts +10 -0
- package/dist/{src/index.js → index.js} +9 -9
- package/dist/index.js.map +1 -0
- package/dist/src/helpers/api-helpers.d.ts +5 -0
- package/dist/src/helpers/ui-helpers.d.ts +18 -0
- package/dist/src/utils/api_axios.d.ts +5 -0
- package/dist/src/utils/azure_storage_methods.d.ts +3 -0
- package/dist/src/utils/comparisions.d.ts +12 -0
- package/dist/src/utils/document_utility.d.ts +8 -0
- package/dist/src/utils/keyvault_methods.d.ts +3 -0
- package/dist/src/utils/test_data.d.ts +19 -0
- package/dist/src/utils/xmlToJson.d.ts +3 -0
- package/index.ts +21 -0
- package/package.json +6 -8
- package/tsconfig.json +3 -3
- package/dist/src/index.js.map +0 -1
- package/src/index.ts +0 -21
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UIHelper } from "./src/helpers/ui-helpers";
|
|
2
|
+
import { ApiHelper } from "./src/helpers/api-helpers";
|
|
3
|
+
import { TokenGenerators } from "./src/utils/api_axios";
|
|
4
|
+
import { AzureStorageMethods } from "./src/utils/azure_storage_methods";
|
|
5
|
+
import { Comparisions } from "./src/utils/comparisions";
|
|
6
|
+
import { DocumentUtility } from "./src/utils/document_utility";
|
|
7
|
+
import { KeyVaultMethods } from "./src/utils/keyvault_methods";
|
|
8
|
+
import { TestData } from "./src/utils/test_data";
|
|
9
|
+
import { XmlToJson } from "./src/utils/xmlToJson";
|
|
10
|
+
export { UIHelper, ApiHelper, TokenGenerators, AzureStorageMethods, Comparisions, DocumentUtility, KeyVaultMethods, TestData, XmlToJson };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.XmlToJson = exports.TestData = exports.KeyVaultMethods = exports.DocumentUtility = exports.Comparisions = exports.AzureStorageMethods = exports.TokenGenerators = exports.ApiHelper = exports.UIHelper = void 0;
|
|
4
|
-
const ui_helpers_1 = require("./helpers/ui-helpers");
|
|
4
|
+
const ui_helpers_1 = require("./src/helpers/ui-helpers");
|
|
5
5
|
Object.defineProperty(exports, "UIHelper", { enumerable: true, get: function () { return ui_helpers_1.UIHelper; } });
|
|
6
|
-
const api_helpers_1 = require("./helpers/api-helpers");
|
|
6
|
+
const api_helpers_1 = require("./src/helpers/api-helpers");
|
|
7
7
|
Object.defineProperty(exports, "ApiHelper", { enumerable: true, get: function () { return api_helpers_1.ApiHelper; } });
|
|
8
|
-
const api_axios_1 = require("./utils/api_axios");
|
|
8
|
+
const api_axios_1 = require("./src/utils/api_axios");
|
|
9
9
|
Object.defineProperty(exports, "TokenGenerators", { enumerable: true, get: function () { return api_axios_1.TokenGenerators; } });
|
|
10
|
-
const azure_storage_methods_1 = require("./utils/azure_storage_methods");
|
|
10
|
+
const azure_storage_methods_1 = require("./src/utils/azure_storage_methods");
|
|
11
11
|
Object.defineProperty(exports, "AzureStorageMethods", { enumerable: true, get: function () { return azure_storage_methods_1.AzureStorageMethods; } });
|
|
12
|
-
const comparisions_1 = require("./utils/comparisions");
|
|
12
|
+
const comparisions_1 = require("./src/utils/comparisions");
|
|
13
13
|
Object.defineProperty(exports, "Comparisions", { enumerable: true, get: function () { return comparisions_1.Comparisions; } });
|
|
14
|
-
const document_utility_1 = require("./utils/document_utility");
|
|
14
|
+
const document_utility_1 = require("./src/utils/document_utility");
|
|
15
15
|
Object.defineProperty(exports, "DocumentUtility", { enumerable: true, get: function () { return document_utility_1.DocumentUtility; } });
|
|
16
|
-
const keyvault_methods_1 = require("./utils/keyvault_methods");
|
|
16
|
+
const keyvault_methods_1 = require("./src/utils/keyvault_methods");
|
|
17
17
|
Object.defineProperty(exports, "KeyVaultMethods", { enumerable: true, get: function () { return keyvault_methods_1.KeyVaultMethods; } });
|
|
18
|
-
const test_data_1 = require("./utils/test_data");
|
|
18
|
+
const test_data_1 = require("./src/utils/test_data");
|
|
19
19
|
Object.defineProperty(exports, "TestData", { enumerable: true, get: function () { return test_data_1.TestData; } });
|
|
20
|
-
const xmlToJson_1 = require("./utils/xmlToJson");
|
|
20
|
+
const xmlToJson_1 = require("./src/utils/xmlToJson");
|
|
21
21
|
Object.defineProperty(exports, "XmlToJson", { enumerable: true, get: function () { return xmlToJson_1.XmlToJson; } });
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AAWhD,yFAXK,qBAAQ,OAWL;AAVZ,2DAAsD;AAWlD,0FAXK,uBAAS,OAWL;AAVb,qDAAwD;AAWpD,gGAXK,2BAAe,OAWL;AAVnB,6EAAwE;AAWpE,oGAXK,2CAAmB,OAWL;AAVvB,2DAAwD;AAWpD,6FAXK,2BAAY,OAWL;AAVhB,mEAA+D;AAW3D,gGAXK,kCAAe,OAWL;AAVnB,mEAA+D;AAW3D,gGAXK,kCAAe,OAWL;AAVnB,qDAAiD;AAW7C,yFAXK,oBAAQ,OAWL;AAVZ,qDAAkD;AAW9C,0FAXK,qBAAS,OAWL"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class UIHelper {
|
|
2
|
+
page: any;
|
|
3
|
+
constructor(page: any);
|
|
4
|
+
filltheData(locator: any, data: any): Promise<void>;
|
|
5
|
+
clickonWebElement(locator: any): Promise<void>;
|
|
6
|
+
getInnerHTML(locator: any): Promise<any>;
|
|
7
|
+
getInnerText(locator: any): Promise<any>;
|
|
8
|
+
getText(locator: any): Promise<any>;
|
|
9
|
+
getAttribute(locator: any, attribute: any): Promise<any>;
|
|
10
|
+
evaluateJS(jsDOM: any): Promise<any>;
|
|
11
|
+
isElementPresent(locator: any): Promise<any>;
|
|
12
|
+
isElementEnabled(locator: any): Promise<any>;
|
|
13
|
+
waitTillElementIsVisible(elementSelector: any, waitTime?: number): Promise<void>;
|
|
14
|
+
getIputBoxValue(locator: any): Promise<any>;
|
|
15
|
+
scrollIntoElementView(locator: any): Promise<void>;
|
|
16
|
+
filltheDataForDateField(locator: any, data: any): Promise<void>;
|
|
17
|
+
SelectValueInDropDownField(locator: any, data: any): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Comparisions {
|
|
2
|
+
static compareObjects(actualObj: string, expectedObj: string): Promise<any>;
|
|
3
|
+
static compareUnorderedJSONObjects(actualObj: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
}, expectedObj: {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
}): Promise<any>;
|
|
8
|
+
static compareJSONObjects(receivedJson: any, expectedJson: any): Boolean;
|
|
9
|
+
static getJsonKeys(jsonFile: any): string[];
|
|
10
|
+
static getJsonValues(jsonFile: any): unknown[];
|
|
11
|
+
static getJsonCount(jsonFile: any): number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import XLSX from 'xlsx';
|
|
2
|
+
export declare class DocumentUtility {
|
|
3
|
+
static readData(filePath: string): Promise<XLSX.WorkBook>;
|
|
4
|
+
static readDataFromExcelorCSV(filePath: string, sheetname?: string): Promise<unknown[]>;
|
|
5
|
+
static filterData(filePath: string, sheetName: string, filterObject: object): Promise<unknown[]>;
|
|
6
|
+
static updateExcelData(filePath: string, sheetName: string, exportData: Array<object>): Promise<void>;
|
|
7
|
+
static deleteAllFilesUnderDIr(dirPath: string): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class TestData {
|
|
2
|
+
static sqlDBConnection(): Promise<any>;
|
|
3
|
+
static executeSqlQuery(pool1: {
|
|
4
|
+
connect: () => any;
|
|
5
|
+
on: (arg0: string, arg1: (err: any) => void) => void;
|
|
6
|
+
request: () => any;
|
|
7
|
+
close: () => void;
|
|
8
|
+
}, queryString: any): Promise<any>;
|
|
9
|
+
static generateRandomUniqeIDNumber(): Promise<string>;
|
|
10
|
+
static getUTCTimeCustom24hrs(localTime: string): Promise<string>;
|
|
11
|
+
static waitFortimeOut(waitTime: any): Promise<void>;
|
|
12
|
+
static executeCosmosQuery(queryString: any): Promise<void>;
|
|
13
|
+
static getUTCTimeCustom(localTime: any): Promise<string>;
|
|
14
|
+
static ConvertCSVDataToJSONObject(csvfilePath: any, jsonfilePath: any): Promise<any[]>;
|
|
15
|
+
static ConvertCSVDataToJSONFile(csvfilePath: any, jsonfilePath: any): Promise<any[]>;
|
|
16
|
+
static ConvertCSVDataToKeyValue(csvfilePath: any, jsonfilePath: any): Promise<any[]>;
|
|
17
|
+
static GenerateTripLinksFile(tripdetails: any, triplinks_path: any, triplinks_folder: any): Promise<any[]>;
|
|
18
|
+
static readExcel(path: string): Promise<unknown[]>;
|
|
19
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UIHelper } from "./src/helpers/ui-helpers";
|
|
2
|
+
import { ApiHelper } from "./src/helpers/api-helpers";
|
|
3
|
+
import { TokenGenerators } from "./src/utils/api_axios";
|
|
4
|
+
import { AzureStorageMethods } from "./src/utils/azure_storage_methods";
|
|
5
|
+
import { Comparisions } from "./src/utils/comparisions";
|
|
6
|
+
import { DocumentUtility } from "./src/utils/document_utility";
|
|
7
|
+
import { KeyVaultMethods } from "./src/utils/keyvault_methods";
|
|
8
|
+
import { TestData } from "./src/utils/test_data";
|
|
9
|
+
import { XmlToJson } from "./src/utils/xmlToJson";
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
UIHelper,
|
|
13
|
+
ApiHelper,
|
|
14
|
+
TokenGenerators,
|
|
15
|
+
AzureStorageMethods,
|
|
16
|
+
Comparisions,
|
|
17
|
+
DocumentUtility,
|
|
18
|
+
KeyVaultMethods,
|
|
19
|
+
TestData,
|
|
20
|
+
XmlToJson
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vita-playwright",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"url": "https://github.com/Vialto/fbt-test-automation",
|
|
5
5
|
"email": "noreply_testautomation@vialto.com",
|
|
6
|
-
"main": "dist/
|
|
7
|
-
"types": "dist/
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "tsc",
|
|
10
10
|
"publish": "npm run build && npm publish --access public"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
12
|
+
"dependencies": {
|
|
13
13
|
"@playwright/test": "^1.29.1",
|
|
14
14
|
"@types/lodash": "4.14.189",
|
|
15
15
|
"@types/node": "18.11.9",
|
|
@@ -30,9 +30,7 @@
|
|
|
30
30
|
"rimraf": "3.0.2",
|
|
31
31
|
"ts-node": "10.9.1",
|
|
32
32
|
"typescript": "4.9.3",
|
|
33
|
-
"xmldom": "0.6.0"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
33
|
+
"xmldom": "0.6.0",
|
|
36
34
|
"@azure/storage-blob": "^12.11.0",
|
|
37
35
|
"@cucumber/cucumber": "7.3.1",
|
|
38
36
|
"@cucumber/html-formatter": "11.0.4",
|
|
@@ -48,4 +46,4 @@
|
|
|
48
46
|
"author": "Vialto QE",
|
|
49
47
|
"license": "ISC",
|
|
50
48
|
"description": "common functions for VITA framework"
|
|
51
|
-
}
|
|
49
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
46
46
|
|
|
47
47
|
/* Emit */
|
|
48
|
-
|
|
48
|
+
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
49
49
|
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
50
50
|
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
51
|
-
// "sourceMap": true,
|
|
51
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
52
52
|
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
53
53
|
"outDir": "./dist", /* Specify an output folder for all emitted files. */
|
|
54
54
|
// "removeComments": true, /* Disable emitting comments. */
|
|
@@ -101,6 +101,6 @@
|
|
|
101
101
|
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
102
102
|
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
103
103
|
},
|
|
104
|
-
"include": ["src/**/*.ts"],
|
|
104
|
+
"include": ["src/**/*.ts", "index.ts"],
|
|
105
105
|
"exclude": ["node_modules"]
|
|
106
106
|
}
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAW5C,yFAXK,qBAAQ,OAWL;AAVZ,uDAAkD;AAW9C,0FAXK,uBAAS,OAWL;AAVb,iDAAoD;AAWhD,gGAXK,2BAAe,OAWL;AAVnB,yEAAoE;AAWhE,oGAXK,2CAAmB,OAWL;AAVvB,uDAAoD;AAWhD,6FAXK,2BAAY,OAWL;AAVhB,+DAA2D;AAWvD,gGAXK,kCAAe,OAWL;AAVnB,+DAA2D;AAWvD,gGAXK,kCAAe,OAWL;AAVnB,iDAA6C;AAWzC,yFAXK,oBAAQ,OAWL;AAVZ,iDAA8C;AAW1C,0FAXK,qBAAS,OAWL"}
|
package/src/index.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { UIHelper } from "./helpers/ui-helpers";
|
|
2
|
-
import { ApiHelper } from "./helpers/api-helpers";
|
|
3
|
-
import { TokenGenerators } from "./utils/api_axios";
|
|
4
|
-
import { AzureStorageMethods } from "./utils/azure_storage_methods";
|
|
5
|
-
import { Comparisions } from "./utils/comparisions";
|
|
6
|
-
import { DocumentUtility } from "./utils/document_utility";
|
|
7
|
-
import { KeyVaultMethods } from "./utils/keyvault_methods";
|
|
8
|
-
import { TestData } from "./utils/test_data";
|
|
9
|
-
import { XmlToJson } from "./utils/xmlToJson";
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
UIHelper,
|
|
13
|
-
ApiHelper,
|
|
14
|
-
TokenGenerators,
|
|
15
|
-
AzureStorageMethods,
|
|
16
|
-
Comparisions,
|
|
17
|
-
DocumentUtility,
|
|
18
|
-
KeyVaultMethods,
|
|
19
|
-
TestData,
|
|
20
|
-
XmlToJson
|
|
21
|
-
}
|