webship-js 1.0.46 → 2.0.0-alpha1
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/.circleci/config.yml +17 -63
- package/.claude/settings.local.json +134 -0
- package/.github/workflows/github-actions.yml +8 -37
- package/.gitlab-ci.yml +12 -35
- package/.travis-ci.yml +12 -23
- package/.travis.yml +17 -0
- package/README.md +8 -8
- package/bitbucket-pipelines.yml +5 -11
- package/cucumber.js +36 -0
- package/examples/dynamic-examples.html +1 -2
- package/examples/index.html +0 -1
- package/examples/test--modal-dialogs.html +252 -0
- package/examples/test--when--i-click-text-in-table-row.html +1 -1
- package/examples/test--when--i-scroll-functionality.html +34 -33
- package/examples/test--when--i-scroll-left-right-functionality.html +115 -173
- package/package.json +10 -21
- package/playwright.config.ts +37 -0
- package/tests/assets/test-document.pdf +14 -0
- package/tests/step-definitions/webship-api.js +5 -31
- package/tests/step-definitions/webship.js +849 -2498
- package/tsconfig.json +10 -0
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -34
- package/assets/config_templates/circleci-linux-chrome.conf.js +0 -118
- package/assets/config_templates/github-linux-chrome.conf.js +0 -124
- package/dist/nightwatch.conf.dev.js +0 -93
- package/examples/main.js +0 -17
- package/lib/custom-assertions/checkboxChecked.js +0 -87
- package/lib/custom-assertions/elementContainsCss.js +0 -94
- package/lib/custom-assertions/elementContainsText.js +0 -86
- package/lib/custom-assertions/responseStatus.js +0 -31
- package/lib/custom-assertions/shouldVisible.js +0 -8
- package/lib/custom-assertions/textMatching.js +0 -44
- package/lib/custom-commands/checkItem.js +0 -4
- package/lib/custom-commands/clickLink.js +0 -23
- package/lib/custom-commands/fileUpload.js +0 -37
- package/lib/custom-commands/fillTextInput.js +0 -56
- package/lib/custom-commands/press.js +0 -3
- package/lib/custom-commands/selectOption.js +0 -11
- package/lib/custom-commands/uncheckItem.js +0 -4
- package/lib/custom-commands/wait.js +0 -12
- package/nightwatch.conf.js +0 -118
- package/src/index.js +0 -10
- package/steplist.js +0 -245
- package/webpack.config.js +0 -17
- package/webship-init.js +0 -75
package/webship-init.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
var insidProject = false;
|
|
6
|
-
var basePath = '';
|
|
7
|
-
var projectPath = '';
|
|
8
|
-
|
|
9
|
-
const currentPath = process.argv[1].split("node_modules");
|
|
10
|
-
basePath = currentPath[0].substring(0, currentPath[0].lastIndexOf("/")) + '/';
|
|
11
|
-
|
|
12
|
-
if (currentPath.length > 1) {
|
|
13
|
-
projectPath = basePath + "node_modules/webship-js/";
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
projectPath = basePath;
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* -----------------------------------------------------
|
|
22
|
-
* Parse arguments
|
|
23
|
-
* -----------------------------------------------------
|
|
24
|
-
*/
|
|
25
|
-
const { ArgumentParser } = require('argparse');
|
|
26
|
-
const { version } = require('./package.json');
|
|
27
|
-
|
|
28
|
-
const parser = new ArgumentParser({
|
|
29
|
-
description: 'Argparse example'
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
parser.add_argument('-ci', '--continuous_integration',
|
|
33
|
-
{
|
|
34
|
-
help: 'Add your CI services (circleci, github, gitlab, bitbucket), By default: -ci circleci',
|
|
35
|
-
default: 'circleci',
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
parser.add_argument('-b', '--browser',
|
|
39
|
-
{
|
|
40
|
-
help: 'Add your Browser (chrome, firefox), By default: -b chrome',
|
|
41
|
-
default: 'chrome',
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
parser.add_argument('-os', '--operating_system',
|
|
45
|
-
{
|
|
46
|
-
help: 'Add your Operating System (linux, mac, windows), By default: -os linux',
|
|
47
|
-
default: 'linux',
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
var argsParse = parser.parse_args();
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* -----------------------------------------------------
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Generate the appropriate nightwatch.conf.js
|
|
58
|
-
*
|
|
59
|
-
* Generate nightwatch testing configs according to the used CI
|
|
60
|
-
* service, operating system, and browser.
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
fs.unlink(projectPath + 'nightwatch.conf.js', (err) => {
|
|
64
|
-
if (err) {
|
|
65
|
-
throw err;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
const confTemplate = projectPath + 'assets/config_templates/' + argsParse.continuous_integration + '-' + argsParse.operating_system + '-' + argsParse.browser + '.conf.js';
|
|
70
|
-
|
|
71
|
-
fs.copyFile(confTemplate, projectPath + 'nightwatch.conf.js', (err) => {
|
|
72
|
-
if (err) {
|
|
73
|
-
throw err;
|
|
74
|
-
}
|
|
75
|
-
});
|