@zohodesk/testinglibrary 0.0.4 → 0.0.5-exp.10
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/.babelrc +16 -0
- package/bin/cli.js +1 -1
- package/bin/postinstall.js +1 -16
- package/build/bdd-framework/cli/commands/env.js +44 -0
- package/build/bdd-framework/cli/commands/export.js +47 -0
- package/build/bdd-framework/cli/commands/test.js +60 -0
- package/build/bdd-framework/cli/index.js +11 -0
- package/build/bdd-framework/cli/options.js +21 -0
- package/build/bdd-framework/cli/worker.js +13 -0
- package/build/bdd-framework/config/dir.js +27 -0
- package/build/bdd-framework/config/env.js +49 -0
- package/build/bdd-framework/config/index.js +92 -0
- package/build/bdd-framework/cucumber/buildStepDefinition.js +45 -0
- package/build/bdd-framework/cucumber/gherkin.d.ts +45 -0
- package/build/bdd-framework/cucumber/loadConfig.js +17 -0
- package/build/bdd-framework/cucumber/loadFeatures.js +39 -0
- package/build/bdd-framework/cucumber/loadSnippetBuilder.js +20 -0
- package/build/bdd-framework/cucumber/loadSources.js +58 -0
- package/build/bdd-framework/cucumber/loadSteps.js +41 -0
- package/build/bdd-framework/decorators.js +21 -0
- package/build/bdd-framework/gen/formatter.js +92 -0
- package/build/bdd-framework/gen/i18n.js +44 -0
- package/build/bdd-framework/gen/index.js +150 -0
- package/build/bdd-framework/gen/poms.js +47 -0
- package/build/bdd-framework/gen/testFile.js +356 -0
- package/build/bdd-framework/gen/testNode.js +50 -0
- package/build/bdd-framework/index.js +33 -0
- package/build/bdd-framework/playwright/fixtureParameterNames.js +103 -0
- package/build/bdd-framework/playwright/getLocationInFile.js +50 -0
- package/build/bdd-framework/playwright/loadConfig.js +42 -0
- package/build/bdd-framework/playwright/testTypeImpl.js +47 -0
- package/build/bdd-framework/playwright/transform.js +85 -0
- package/build/bdd-framework/playwright/utils.js +24 -0
- package/build/bdd-framework/run/bddFixtures.js +109 -0
- package/build/bdd-framework/run/bddWorld.js +91 -0
- package/build/bdd-framework/snippets/index.js +132 -0
- package/build/bdd-framework/snippets/snippetSyntax.js +50 -0
- package/build/bdd-framework/snippets/snippetSyntaxDecorators.js +32 -0
- package/build/bdd-framework/snippets/snippetSyntaxTs.js +18 -0
- package/build/bdd-framework/stepDefinitions/createBdd.js +52 -0
- package/build/bdd-framework/stepDefinitions/createDecorators.js +110 -0
- package/build/bdd-framework/stepDefinitions/defineStep.js +62 -0
- package/build/bdd-framework/utils/index.js +52 -0
- package/build/bdd-framework/utils/jsStringWrap.js +44 -0
- package/build/bdd-framework/utils/logger.js +21 -0
- package/build/core/jest/preprocessor/jsPreprocessor.js +13 -0
- package/{src → build}/core/jest/runner/jest-runner.js +16 -15
- package/build/core/jest/setup/index.js +9 -0
- package/build/core/playwright/codegen.js +56 -0
- package/build/core/playwright/custom-commands.js +8 -0
- package/build/core/playwright/env-initializer.js +21 -0
- package/{src → build}/core/playwright/index.js +51 -21
- package/build/core/playwright/readConfigFile.js +64 -0
- package/build/core/playwright/report-generator.js +43 -0
- package/build/core/playwright/setup/config-creator.js +106 -0
- package/build/core/playwright/test-runner.js +106 -0
- package/build/index.js +37 -0
- package/build/lib/cli.js +45 -0
- package/build/lib/post-install.js +17 -0
- package/build/lint/index.js +7 -0
- package/build/setup-folder-structure/env-config-sample.json +17 -0
- package/build/setup-folder-structure/git-ignore.sample.js +39 -0
- package/build/setup-folder-structure/setupProject.js +104 -0
- package/build/setup-folder-structure/uat-config-sample.js +31 -0
- package/build/setup-folder-structure/user-example.json +3 -0
- package/build/utils/cliArgsToObject.js +64 -0
- package/build/utils/getFilePath.js +11 -0
- package/build/utils/logger.js +56 -0
- package/build/utils/rootPath.js +46 -0
- package/changelog.md +27 -0
- package/npm-shrinkwrap.json +2097 -147
- package/package.json +20 -5
- package/playwright.config.js +6 -6
- package/src/core/jest/preprocessor/jsPreprocessor.js +0 -9
- package/src/core/jest/setup/index.js +0 -165
- package/src/core/playwright/codegen.js +0 -60
- package/src/core/playwright/custom-commands.js +0 -3
- package/src/core/playwright/env-initializer.js +0 -24
- package/src/core/playwright/readConfigFile.js +0 -30
- package/src/core/playwright/report-generator.js +0 -43
- package/src/core/playwright/setup/config-creator.js +0 -77
- package/src/core/playwright/test-runner.js +0 -64
- package/src/index.js +0 -9
- package/src/lib/cli.js +0 -35
- package/src/utils/cliArgsToObject.js +0 -35
- package/src/utils/getFilePath.js +0 -9
- package/src/utils/logger.js +0 -28
- package/src/utils/rootPath.js +0 -51
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getBinPath = getBinPath;
|
|
8
|
+
exports.getExecutableBinaryPath = getExecutableBinaryPath;
|
|
9
|
+
exports.getRootNodeModulesPath = getRootNodeModulesPath;
|
|
10
|
+
exports.getRootPath = getRootPath;
|
|
11
|
+
var _path = _interopRequireDefault(require("path"));
|
|
12
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
13
|
+
var _logger = require("./logger");
|
|
14
|
+
var _getFilePath = _interopRequireDefault(require("./getFilePath"));
|
|
15
|
+
function findBinaryPath(directory, command) {
|
|
16
|
+
const binaryPath = _path.default.join(directory, '.bin', (0, _getFilePath.default)(command));
|
|
17
|
+
if (_fs.default.existsSync(binaryPath)) {
|
|
18
|
+
return binaryPath;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Recursively search parent directories. Might be time-consuming ?? Can we look for npm module like which?
|
|
22
|
+
const parentDir = _path.default.dirname(directory);
|
|
23
|
+
if (parentDir === directory) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return findBinaryPath(parentDir, command);
|
|
27
|
+
}
|
|
28
|
+
function getRootPath() {
|
|
29
|
+
return _path.default.resolve(__dirname, '../', '../');
|
|
30
|
+
}
|
|
31
|
+
function getRootNodeModulesPath() {
|
|
32
|
+
return _path.default.resolve(getRootPath(), 'node_modules');
|
|
33
|
+
}
|
|
34
|
+
function getBinPath(command) {
|
|
35
|
+
const packageNodeModulesPath = getRootNodeModulesPath();
|
|
36
|
+
return findBinaryPath(packageNodeModulesPath, command);
|
|
37
|
+
}
|
|
38
|
+
function getExecutableBinaryPath(command) {
|
|
39
|
+
const binPath = getBinPath(command);
|
|
40
|
+
if (binPath !== null) {
|
|
41
|
+
return binPath;
|
|
42
|
+
} else {
|
|
43
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Error: Could not find executable bin ${command} file. Make sure to npm install before proceeding`);
|
|
44
|
+
process.exit();
|
|
45
|
+
}
|
|
46
|
+
}
|
package/changelog.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## Framework that abstracts the configuration for playwright and Jest
|
|
4
4
|
|
|
5
|
+
# 0.0.5-exp.10
|
|
6
|
+
|
|
7
|
+
- tags support added
|
|
8
|
+
- Changed config and test-results folder
|
|
9
|
+
|
|
10
|
+
# 0.0.5-exp.8
|
|
11
|
+
|
|
12
|
+
- Additional pages support added as config
|
|
13
|
+
|
|
14
|
+
# 0.0.5-exp.5
|
|
15
|
+
|
|
16
|
+
- Added expect timeout and test timeout as an option
|
|
17
|
+
|
|
18
|
+
# 0.0.5-exp.2
|
|
19
|
+
|
|
20
|
+
- Provided Initial Support for cucumber feature files
|
|
21
|
+
- Playwright-bdd and cucumber
|
|
22
|
+
- Added config bddMode which toggles the feature files processing
|
|
23
|
+
- Internal Library change
|
|
24
|
+
- Provided support for import/export statements
|
|
25
|
+
|
|
26
|
+
# 0.0.5
|
|
27
|
+
|
|
28
|
+
- Added Init command to initialize the folder structure and configuration for testing
|
|
29
|
+
- Renamed config.json to env-config.json
|
|
30
|
+
- Configured report file path directory and Handled Edge case in Cookies Handling
|
|
31
|
+
|
|
5
32
|
# 0.0.4
|
|
6
33
|
|
|
7
34
|
- Issue Fixes while loading the storage state
|