codeceptjs 3.3.2 → 3.3.5-beta.1
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/CHANGELOG.md +44 -2
- package/docs/api.md +4 -0
- package/docs/basics.md +2 -0
- package/docs/bdd.md +12 -0
- package/docs/build/JSONResponse.js +44 -3
- package/docs/build/Playwright.js +63 -40
- package/docs/build/Puppeteer.js +54 -43
- package/docs/build/REST.js +23 -9
- package/docs/build/WebDriver.js +39 -30
- package/docs/changelog.md +6 -2
- package/docs/community-helpers.md +1 -0
- package/docs/configuration.md +21 -18
- package/docs/helpers/Appium.md +0 -723
- package/docs/helpers/JSONResponse.md +24 -0
- package/docs/helpers/Playwright.md +276 -264
- package/docs/helpers/Puppeteer.md +230 -222
- package/docs/helpers/REST.md +21 -6
- package/docs/helpers/WebDriver.md +265 -259
- package/docs/plugins.md +41 -1
- package/docs/reports.md +11 -0
- package/docs/secrets.md +30 -0
- package/docs/wiki/.git/FETCH_HEAD +1 -0
- package/docs/wiki/.git/HEAD +1 -0
- package/docs/wiki/.git/ORIG_HEAD +1 -0
- package/docs/wiki/.git/config +11 -0
- package/docs/wiki/.git/description +1 -0
- package/docs/wiki/.git/hooks/applypatch-msg.sample +15 -0
- package/docs/wiki/.git/hooks/commit-msg.sample +24 -0
- package/docs/wiki/.git/hooks/fsmonitor-watchman.sample +173 -0
- package/docs/wiki/.git/hooks/post-update.sample +8 -0
- package/docs/wiki/.git/hooks/pre-applypatch.sample +14 -0
- package/docs/wiki/.git/hooks/pre-commit.sample +49 -0
- package/docs/wiki/.git/hooks/pre-merge-commit.sample +13 -0
- package/docs/wiki/.git/hooks/pre-push.sample +53 -0
- package/docs/wiki/.git/hooks/pre-rebase.sample +169 -0
- package/docs/wiki/.git/hooks/pre-receive.sample +24 -0
- package/docs/wiki/.git/hooks/prepare-commit-msg.sample +42 -0
- package/docs/wiki/.git/hooks/push-to-checkout.sample +78 -0
- package/docs/wiki/.git/hooks/update.sample +128 -0
- package/docs/wiki/.git/index +0 -0
- package/docs/wiki/.git/info/exclude +6 -0
- package/docs/wiki/.git/logs/HEAD +1 -0
- package/docs/wiki/.git/logs/refs/heads/master +1 -0
- package/docs/wiki/.git/logs/refs/remotes/origin/HEAD +1 -0
- package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.idx +0 -0
- package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.pack +0 -0
- package/docs/wiki/.git/packed-refs +2 -0
- package/docs/wiki/.git/refs/heads/master +1 -0
- package/docs/wiki/.git/refs/remotes/origin/HEAD +1 -0
- package/docs/wiki/Community-Helpers-&-Plugins.md +7 -3
- package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +29 -0
- package/docs/wiki/Examples.md +39 -48
- package/docs/wiki/Release-Process.md +8 -8
- package/docs/wiki/Tests.md +62 -60
- package/docs/wiki/Upgrading-to-CodeceptJS-3.md +2 -2
- package/lib/cli.js +1 -1
- package/lib/command/generate.js +3 -0
- package/lib/command/init.js +83 -24
- package/lib/command/interactive.js +1 -1
- package/lib/command/run-workers.js +1 -1
- package/lib/command/workers/runTests.js +15 -0
- package/lib/helper/JSONResponse.js +44 -3
- package/lib/helper/Playwright.js +63 -40
- package/lib/helper/Puppeteer.js +54 -43
- package/lib/helper/REST.js +23 -9
- package/lib/helper/WebDriver.js +39 -30
- package/lib/interfaces/gherkin.js +1 -1
- package/lib/output.js +4 -0
- package/lib/plugin/customLocator.js +50 -3
- package/lib/plugin/retryFailedStep.js +1 -1
- package/lib/plugin/retryTo.js +1 -8
- package/lib/secret.js +31 -1
- package/lib/step.js +22 -10
- package/lib/utils.js +1 -6
- package/package.json +4 -4
- package/typings/index.d.ts +158 -0
- package/typings/types.d.ts +367 -96
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# An example hook script to prepare the commit log message.
|
|
4
|
+
# Called by "git commit" with the name of the file that has the
|
|
5
|
+
# commit message, followed by the description of the commit
|
|
6
|
+
# message's source. The hook's purpose is to edit the commit
|
|
7
|
+
# message file. If the hook fails with a non-zero status,
|
|
8
|
+
# the commit is aborted.
|
|
9
|
+
#
|
|
10
|
+
# To enable this hook, rename this file to "prepare-commit-msg".
|
|
11
|
+
|
|
12
|
+
# This hook includes three examples. The first one removes the
|
|
13
|
+
# "# Please enter the commit message..." help message.
|
|
14
|
+
#
|
|
15
|
+
# The second includes the output of "git diff --name-status -r"
|
|
16
|
+
# into the message, just before the "git status" output. It is
|
|
17
|
+
# commented because it doesn't cope with --amend or with squashed
|
|
18
|
+
# commits.
|
|
19
|
+
#
|
|
20
|
+
# The third example adds a Signed-off-by line to the message, that can
|
|
21
|
+
# still be edited. This is rarely a good idea.
|
|
22
|
+
|
|
23
|
+
COMMIT_MSG_FILE=$1
|
|
24
|
+
COMMIT_SOURCE=$2
|
|
25
|
+
SHA1=$3
|
|
26
|
+
|
|
27
|
+
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
|
|
28
|
+
|
|
29
|
+
# case "$COMMIT_SOURCE,$SHA1" in
|
|
30
|
+
# ,|template,)
|
|
31
|
+
# /usr/bin/perl -i.bak -pe '
|
|
32
|
+
# print "\n" . `git diff --cached --name-status -r`
|
|
33
|
+
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
|
|
34
|
+
# *) ;;
|
|
35
|
+
# esac
|
|
36
|
+
|
|
37
|
+
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
|
38
|
+
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
|
|
39
|
+
# if test -z "$COMMIT_SOURCE"
|
|
40
|
+
# then
|
|
41
|
+
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
|
|
42
|
+
# fi
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# An example hook script to update a checked-out tree on a git push.
|
|
4
|
+
#
|
|
5
|
+
# This hook is invoked by git-receive-pack(1) when it reacts to git
|
|
6
|
+
# push and updates reference(s) in its repository, and when the push
|
|
7
|
+
# tries to update the branch that is currently checked out and the
|
|
8
|
+
# receive.denyCurrentBranch configuration variable is set to
|
|
9
|
+
# updateInstead.
|
|
10
|
+
#
|
|
11
|
+
# By default, such a push is refused if the working tree and the index
|
|
12
|
+
# of the remote repository has any difference from the currently
|
|
13
|
+
# checked out commit; when both the working tree and the index match
|
|
14
|
+
# the current commit, they are updated to match the newly pushed tip
|
|
15
|
+
# of the branch. This hook is to be used to override the default
|
|
16
|
+
# behaviour; however the code below reimplements the default behaviour
|
|
17
|
+
# as a starting point for convenient modification.
|
|
18
|
+
#
|
|
19
|
+
# The hook receives the commit with which the tip of the current
|
|
20
|
+
# branch is going to be updated:
|
|
21
|
+
commit=$1
|
|
22
|
+
|
|
23
|
+
# It can exit with a non-zero status to refuse the push (when it does
|
|
24
|
+
# so, it must not modify the index or the working tree).
|
|
25
|
+
die () {
|
|
26
|
+
echo >&2 "$*"
|
|
27
|
+
exit 1
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
# Or it can make any necessary changes to the working tree and to the
|
|
31
|
+
# index to bring them to the desired state when the tip of the current
|
|
32
|
+
# branch is updated to the new commit, and exit with a zero status.
|
|
33
|
+
#
|
|
34
|
+
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
|
|
35
|
+
# in order to emulate git fetch that is run in the reverse direction
|
|
36
|
+
# with git push, as the two-tree form of git read-tree -u -m is
|
|
37
|
+
# essentially the same as git switch or git checkout that switches
|
|
38
|
+
# branches while keeping the local changes in the working tree that do
|
|
39
|
+
# not interfere with the difference between the branches.
|
|
40
|
+
|
|
41
|
+
# The below is a more-or-less exact translation to shell of the C code
|
|
42
|
+
# for the default behaviour for git's push-to-checkout hook defined in
|
|
43
|
+
# the push_to_deploy() function in builtin/receive-pack.c.
|
|
44
|
+
#
|
|
45
|
+
# Note that the hook will be executed from the repository directory,
|
|
46
|
+
# not from the working tree, so if you want to perform operations on
|
|
47
|
+
# the working tree, you will have to adapt your code accordingly, e.g.
|
|
48
|
+
# by adding "cd .." or using relative paths.
|
|
49
|
+
|
|
50
|
+
if ! git update-index -q --ignore-submodules --refresh
|
|
51
|
+
then
|
|
52
|
+
die "Up-to-date check failed"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
if ! git diff-files --quiet --ignore-submodules --
|
|
56
|
+
then
|
|
57
|
+
die "Working directory has unstaged changes"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# This is a rough translation of:
|
|
61
|
+
#
|
|
62
|
+
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
|
|
63
|
+
if git cat-file -e HEAD 2>/dev/null
|
|
64
|
+
then
|
|
65
|
+
head=HEAD
|
|
66
|
+
else
|
|
67
|
+
head=$(git hash-object -t tree --stdin </dev/null)
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
if ! git diff-index --quiet --cached --ignore-submodules $head --
|
|
71
|
+
then
|
|
72
|
+
die "Working directory has staged changes"
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
if ! git read-tree -u -m "$commit"
|
|
76
|
+
then
|
|
77
|
+
die "Could not update working tree to new HEAD"
|
|
78
|
+
fi
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# An example hook script to block unannotated tags from entering.
|
|
4
|
+
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
|
|
5
|
+
#
|
|
6
|
+
# To enable this hook, rename this file to "update".
|
|
7
|
+
#
|
|
8
|
+
# Config
|
|
9
|
+
# ------
|
|
10
|
+
# hooks.allowunannotated
|
|
11
|
+
# This boolean sets whether unannotated tags will be allowed into the
|
|
12
|
+
# repository. By default they won't be.
|
|
13
|
+
# hooks.allowdeletetag
|
|
14
|
+
# This boolean sets whether deleting tags will be allowed in the
|
|
15
|
+
# repository. By default they won't be.
|
|
16
|
+
# hooks.allowmodifytag
|
|
17
|
+
# This boolean sets whether a tag may be modified after creation. By default
|
|
18
|
+
# it won't be.
|
|
19
|
+
# hooks.allowdeletebranch
|
|
20
|
+
# This boolean sets whether deleting branches will be allowed in the
|
|
21
|
+
# repository. By default they won't be.
|
|
22
|
+
# hooks.denycreatebranch
|
|
23
|
+
# This boolean sets whether remotely creating branches will be denied
|
|
24
|
+
# in the repository. By default this is allowed.
|
|
25
|
+
#
|
|
26
|
+
|
|
27
|
+
# --- Command line
|
|
28
|
+
refname="$1"
|
|
29
|
+
oldrev="$2"
|
|
30
|
+
newrev="$3"
|
|
31
|
+
|
|
32
|
+
# --- Safety check
|
|
33
|
+
if [ -z "$GIT_DIR" ]; then
|
|
34
|
+
echo "Don't run this script from the command line." >&2
|
|
35
|
+
echo " (if you want, you could supply GIT_DIR then run" >&2
|
|
36
|
+
echo " $0 <ref> <oldrev> <newrev>)" >&2
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
|
|
41
|
+
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# --- Config
|
|
46
|
+
allowunannotated=$(git config --type=bool hooks.allowunannotated)
|
|
47
|
+
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
|
|
48
|
+
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
|
|
49
|
+
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
|
|
50
|
+
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
|
|
51
|
+
|
|
52
|
+
# check for no description
|
|
53
|
+
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
|
|
54
|
+
case "$projectdesc" in
|
|
55
|
+
"Unnamed repository"* | "")
|
|
56
|
+
echo "*** Project description file hasn't been set" >&2
|
|
57
|
+
exit 1
|
|
58
|
+
;;
|
|
59
|
+
esac
|
|
60
|
+
|
|
61
|
+
# --- Check types
|
|
62
|
+
# if $newrev is 0000...0000, it's a commit to delete a ref.
|
|
63
|
+
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
|
|
64
|
+
if [ "$newrev" = "$zero" ]; then
|
|
65
|
+
newrev_type=delete
|
|
66
|
+
else
|
|
67
|
+
newrev_type=$(git cat-file -t $newrev)
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
case "$refname","$newrev_type" in
|
|
71
|
+
refs/tags/*,commit)
|
|
72
|
+
# un-annotated tag
|
|
73
|
+
short_refname=${refname##refs/tags/}
|
|
74
|
+
if [ "$allowunannotated" != "true" ]; then
|
|
75
|
+
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
|
|
76
|
+
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
|
|
77
|
+
exit 1
|
|
78
|
+
fi
|
|
79
|
+
;;
|
|
80
|
+
refs/tags/*,delete)
|
|
81
|
+
# delete tag
|
|
82
|
+
if [ "$allowdeletetag" != "true" ]; then
|
|
83
|
+
echo "*** Deleting a tag is not allowed in this repository" >&2
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
86
|
+
;;
|
|
87
|
+
refs/tags/*,tag)
|
|
88
|
+
# annotated tag
|
|
89
|
+
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
|
|
90
|
+
then
|
|
91
|
+
echo "*** Tag '$refname' already exists." >&2
|
|
92
|
+
echo "*** Modifying a tag is not allowed in this repository." >&2
|
|
93
|
+
exit 1
|
|
94
|
+
fi
|
|
95
|
+
;;
|
|
96
|
+
refs/heads/*,commit)
|
|
97
|
+
# branch
|
|
98
|
+
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
|
|
99
|
+
echo "*** Creating a branch is not allowed in this repository" >&2
|
|
100
|
+
exit 1
|
|
101
|
+
fi
|
|
102
|
+
;;
|
|
103
|
+
refs/heads/*,delete)
|
|
104
|
+
# delete branch
|
|
105
|
+
if [ "$allowdeletebranch" != "true" ]; then
|
|
106
|
+
echo "*** Deleting a branch is not allowed in this repository" >&2
|
|
107
|
+
exit 1
|
|
108
|
+
fi
|
|
109
|
+
;;
|
|
110
|
+
refs/remotes/*,commit)
|
|
111
|
+
# tracking branch
|
|
112
|
+
;;
|
|
113
|
+
refs/remotes/*,delete)
|
|
114
|
+
# delete tracking branch
|
|
115
|
+
if [ "$allowdeletebranch" != "true" ]; then
|
|
116
|
+
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
|
|
117
|
+
exit 1
|
|
118
|
+
fi
|
|
119
|
+
;;
|
|
120
|
+
*)
|
|
121
|
+
# Anything else (is there anything else?)
|
|
122
|
+
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
|
|
123
|
+
exit 1
|
|
124
|
+
;;
|
|
125
|
+
esac
|
|
126
|
+
|
|
127
|
+
# --- Finished
|
|
128
|
+
exit 0
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0000000000000000000000000000000000000000 5f1ae54d1bc8bb84bfa836e2547181e31d01bc7a Davert <davert.ua@gmail.com> 1657708587 +0300 clone: from github.com:codeceptjs/CodeceptJS.wiki.git
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0000000000000000000000000000000000000000 5f1ae54d1bc8bb84bfa836e2547181e31d01bc7a Davert <davert.ua@gmail.com> 1657708587 +0300 clone: from github.com:codeceptjs/CodeceptJS.wiki.git
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0000000000000000000000000000000000000000 5f1ae54d1bc8bb84bfa836e2547181e31d01bc7a Davert <davert.ua@gmail.com> 1657708587 +0300 clone: from github.com:codeceptjs/CodeceptJS.wiki.git
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5f1ae54d1bc8bb84bfa836e2547181e31d01bc7a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ref: refs/remotes/origin/master
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
Here is the list of helpers created by our community.
|
|
2
2
|
Please **add your own** by editing this page.
|
|
3
|
+
## Webhooks
|
|
4
|
+
|
|
5
|
+
* [codeceptjs-webhook-helper](https://github.com/onemolegames/codeceptjs-webhook-helper) - to check webhook calls during the tests.
|
|
3
6
|
|
|
4
7
|
## Email Checking
|
|
5
8
|
|
|
6
9
|
* [MailCatcher](https://gist.github.com/schmkr/026732dfa1627b927ff3a08dc31ee884) - to check emails via Mailcatcher locally.
|
|
7
10
|
* [codeceptjs-mailhog-helper](https://github.com/tsuemura/codeceptjs-mailhog-helper) - to check emails via Mailhog locally.
|
|
11
|
+
* [codeceptjs-testmailapp-helper](https://github.com/pavkam/codeceptjs-testmailapp-helper) - to check emails via Testmail.app service.
|
|
12
|
+
* [codeceptjs-mailosaurhelper](https://github.com/yurkovychv/codeceptjs-mailosaur) - to check emails via [Mailosaur](https://mailosaur.com/) service.
|
|
8
13
|
|
|
9
14
|
## Data Sources
|
|
10
15
|
|
|
@@ -23,14 +28,13 @@ Please **add your own** by editing this page.
|
|
|
23
28
|
## Visual-Testing
|
|
24
29
|
* [codeceptjs-resemblehelper](https://github.com/puneet0191/codeceptjs-resemblehelper) - a helper which helps with visual testing using resemble.js.
|
|
25
30
|
* [codeceptjs-applitoolshelper](https://www.npmjs.com/package/codeceptjs-applitoolshelper) - a helper which helps interaction with [Applitools](https://applitools.com)
|
|
31
|
+
* [codeceptjs-pixelmatchhelper](https://github.com/stracker-phil/codeceptjs-pixelmatchhelper) - a helper that integrates pixelmatch for visual testing.
|
|
26
32
|
|
|
27
33
|
## Reporters
|
|
28
34
|
* [codeceptjs-rphelper](https://github.com/reportportal/agent-js-codecept) is a CodeceptJS helper which can publish tests results on ReportPortal after execution.
|
|
29
35
|
* [codeceptjs-xray-helper](https://www.npmjs.com/package/codeceptjs-xray-helper) is a CodeceptJS helper which can publish tests results on [XRAY](https://confluence.xpand-it.com/display/XRAYCLOUD/Import+Execution+Results+-+REST).
|
|
30
36
|
* [codeceptjs-slack-reporter](https://www.npmjs.com/package/codeceptjs-slack-reporter) Get a Slack notification when one or more scenarios fail.
|
|
31
|
-
|
|
32
|
-
## Page Object Code Generator
|
|
33
|
-
* [codeceptjs-CodeGenerator](https://github.com/senthillkumar/CodeCeptJS-PageObject) is a CodeceptJS custom wrapper which can create page class with action methods from the page object file(JSON) and project setup(Folder Structure).
|
|
37
|
+
* [codeceptjs-browserlogs-plugin](https://github.com/pavkam/codeceptjs-browserlogs-plugin) Record the browser logs for failed tests.
|
|
34
38
|
|
|
35
39
|
## Browser request control
|
|
36
40
|
* [codeceptjs-resources-check](https://github.com/luarmr/codeceptjs-resources-check) Load a URL with Puppeteer and listen to the requests while the page is loading. Enabling count the number or check the sizes of the requests.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
How to convert `playwright` coverage format to `istanbul` coverage
|
|
2
|
+
|
|
3
|
+
To convert coverage generated from `playwright` to `istanbul` coverage, you first need to install
|
|
4
|
+
- [`v8-to-istanbul`](https://www.npmjs.com/package/v8-to-istanbul)
|
|
5
|
+
|
|
6
|
+
Once installed, convert the coverage to a format which `istanbul` can recognize, by writing a script as shown below.
|
|
7
|
+
|
|
8
|
+
```js
|
|
9
|
+
const v8toIstanbul = require('v8-to-istanbul');
|
|
10
|
+
// read all the coverage file from output/coverage folder
|
|
11
|
+
const coverage = require('./output/coverage/Visit_Home_1630335005.coverage.json');
|
|
12
|
+
const fs = require('fs/promises');
|
|
13
|
+
|
|
14
|
+
(async () => {
|
|
15
|
+
for (const entry of coverage) {
|
|
16
|
+
// Used to get file name
|
|
17
|
+
const file = entry.url.match(/(?:http(s)*:\/\/.*\/)(?<file>.*)/);
|
|
18
|
+
const converter = new v8toIstanbul(file.groups.file, 0, {
|
|
19
|
+
source: entry.source
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
await converter.load();
|
|
23
|
+
converter.applyCoverage(entry.functions);
|
|
24
|
+
|
|
25
|
+
// Store converted coverage file which can later be used to generate report
|
|
26
|
+
await fs.writeFile('./coverage/final.json', JSON.stringify(converter.toIstanbul(), null, 2));
|
|
27
|
+
}
|
|
28
|
+
})();
|
|
29
|
+
```
|
package/docs/wiki/Examples.md
CHANGED
|
@@ -19,11 +19,35 @@ CodeceptJS repo contains basic tests (both failing and passing) just to show how
|
|
|
19
19
|
Our team uses it to test new features and run simple scenarios.
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
## [
|
|
22
|
+
## [CodeceptJS Cucumber E2E Framework](https://github.com/gkushang/codeceptjs-e2e)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
This repository contains complete E2E framework for CodeceptJS with Cucumber and SauceLabs Integration
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
* CodecepJS-Cucumber E2E Framework
|
|
27
|
+
* Saucelabs Integration
|
|
28
|
+
* Run Cross Browser tests in Parallel on SauceLabs with a simple command
|
|
29
|
+
* Run tests on `chrome:headless`
|
|
30
|
+
* Page Objects
|
|
31
|
+
* `Should.js` Assertion Library
|
|
32
|
+
* Uses `wdio` service (selenium-standalone, sauce)
|
|
33
|
+
* Allure HTML Reports
|
|
34
|
+
* Uses shared Master configuration
|
|
35
|
+
* Sample example and feature files of GitHub Features
|
|
36
|
+
|
|
37
|
+
## [Enterprise Grade Tests](https://github.com/uc-cdis/gen3-qa)
|
|
38
|
+
|
|
39
|
+
Complex testing solution by [Gen3](https://github.com/uc-cdis/gen3-qa)
|
|
40
|
+
|
|
41
|
+
Includes
|
|
42
|
+
|
|
43
|
+
* classical CodeceptJS tests
|
|
44
|
+
* BDD tests
|
|
45
|
+
* Jenkins integration
|
|
46
|
+
* Complex Before/BeforeSuite scripts and more
|
|
47
|
+
|
|
48
|
+
## [Testing Single Page Application](https://github.com/bugiratracker/codeceptjs-demo)
|
|
49
|
+
|
|
50
|
+
End 2 end tests for Task management app (currently offline).
|
|
27
51
|
|
|
28
52
|
Tests repository demonstrate usage of
|
|
29
53
|
|
|
@@ -42,21 +66,6 @@ This repository demonstrates usage of:
|
|
|
42
66
|
* testing WYSIWYG editor
|
|
43
67
|
* GitLab CI
|
|
44
68
|
|
|
45
|
-
## [CodeceptJS Cucumber E2E Framework](https://github.com/gkushang/codeceptjs-e2e)
|
|
46
|
-
|
|
47
|
-
This repository contains complete E2E framework for CodeceptJS with Cucumber and SauceLabs Integration
|
|
48
|
-
|
|
49
|
-
* CodecepJS-Cucumber E2E Framework
|
|
50
|
-
* Saucelabs Integration
|
|
51
|
-
* Run Cross Browser tests in Parallel on SauceLabs with a simple command
|
|
52
|
-
* Run tests on `chrome:headless`
|
|
53
|
-
* Page Objects
|
|
54
|
-
* `Should.js` Assertion Library
|
|
55
|
-
* Uses `wdio` service (selenium-standalone, sauce)
|
|
56
|
-
* Allure HTML Reports
|
|
57
|
-
* Uses shared Master configuration
|
|
58
|
-
* Sample example and feature files of GitHub Features
|
|
59
|
-
|
|
60
69
|
## [Amazon Tests v2](https://gitlab.com/thanhnguyendh/codeceptjs-wdio-services)
|
|
61
70
|
|
|
62
71
|
Testing Amazon website using Selenium WebDriver.
|
|
@@ -69,17 +78,6 @@ This repository demonstrates usage of:
|
|
|
69
78
|
* Parallel execution
|
|
70
79
|
* GitLab CI setup
|
|
71
80
|
|
|
72
|
-
## [Amazon Tests v1](https://github.com/PeterNgTr/amazon-ui-tests)
|
|
73
|
-
|
|
74
|
-
Previous version of Amazon Tests, still valid but quite different.
|
|
75
|
-
|
|
76
|
-
This repository demonstrates usage of:
|
|
77
|
-
|
|
78
|
-
* WebDriver helper
|
|
79
|
-
* Page Objects
|
|
80
|
-
* Bootstrap and teardown
|
|
81
|
-
* Parallel execution
|
|
82
|
-
|
|
83
81
|
## [Tests with Docker Compose](https://github.com/mathesouza/codeceptjs-docker-compose)
|
|
84
82
|
|
|
85
83
|
Running CodeceptJS tests with Docker Compose
|
|
@@ -91,17 +89,6 @@ This repository demonstrates usage of:
|
|
|
91
89
|
* Allure plugin
|
|
92
90
|
|
|
93
91
|
|
|
94
|
-
## [ModusCreate Tests](https://github.com/ModusCreateOrg/codeceptjs-nightmare-harness)
|
|
95
|
-
|
|
96
|
-
Test automation by ModusCreate agency with NightmareJS.
|
|
97
|
-
|
|
98
|
-
This repository demonstrates usage of:
|
|
99
|
-
|
|
100
|
-
* Nightmare helper
|
|
101
|
-
* Reports with Mochawesome
|
|
102
|
-
* Docker
|
|
103
|
-
* Page objects and page fragments
|
|
104
|
-
|
|
105
92
|
## [AngularJS Example Tests](https://github.com/armno/angular-e2e-codeceptjs-example)
|
|
106
93
|
|
|
107
94
|
Based on [Setting up End-to-End Testing in Angular Project with CodeceptJS](https://medium.com/@armno/setting-up-end-to-end-testing-in-angular-project-with-codeceptjs-ac1784de3420) post by Armno Prommarak.
|
|
@@ -137,12 +124,16 @@ This is a ready to use example that shows how to integrate CodeceptJS with Puppe
|
|
|
137
124
|
* examples for sequential and parallel execution
|
|
138
125
|
* generation of allure test results
|
|
139
126
|
|
|
140
|
-
## [
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
127
|
+
## [Example for Advanced REST API testing: TypeScript, Axios, CodeceptJS, Jest Expect, Docker, Allure, Mock-Server, Prettier + Eslint, pre-commit, Jest Unit Tests ](https://github.com/EgorBodnar/rest-axios-codeceptjs-allure-docker-test-example)
|
|
128
|
+
One button example with built-in mocked backend.
|
|
129
|
+
|
|
130
|
+
If you already have a UI testing solution based on the CodeceptJS and you need to implement advanced REST API testing you can just extend your existing framework. Use this implementation as an example.
|
|
131
|
+
This is necessary if all integrations with TMS and CI/CD are already configured, and you do not want to reconnect and configure the plugins and libraries used for the new test runner. Use CodeceptJS!
|
|
144
132
|
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
133
|
+
* Easy run
|
|
134
|
+
* Detailed README
|
|
135
|
+
* Well documented mocked backend's REST API endpoints
|
|
136
|
+
* HTTP request client with session support and unit tests
|
|
137
|
+
* Exemplary code control
|
|
138
|
+
* Ready to launch in a CI/CD system as is
|
|
139
|
+
* OOP, Test data models and builders, endpoint decorators
|
|
@@ -2,23 +2,23 @@ This is the guide for maintainers:
|
|
|
2
2
|
|
|
3
3
|
## Release Process
|
|
4
4
|
|
|
5
|
-
1. Pull the latest changes from
|
|
6
|
-
2. Create a branch
|
|
5
|
+
1. Pull the latest changes from main branch for release stream e.g. 3.x
|
|
6
|
+
2. Create a release branch and switch to it by `git checkout -b release-x.x.x`
|
|
7
7
|
3. Update version in `package.json`
|
|
8
8
|
4. Go through the commits for the new release and add them to the CHANGELOG.md:
|
|
9
9
|
* Changelog should be written for humans (not for robots).
|
|
10
10
|
* Use simple wording explaining what the change is, how to use a new feature (maybe with a code example) and mention the related issue.
|
|
11
11
|
* When using `#123` a link for issue #123 will be automatically added.
|
|
12
12
|
* A contributor must be mentioned. We use GitHub names with `@` prefix. A link to user profile is automatically added.
|
|
13
|
-
5. Run `./
|
|
13
|
+
5. Run `./runok.js docs` to build documentation
|
|
14
14
|
6. Commit all changes, push and create a PR
|
|
15
15
|
7. Check that all tests pass and merge your PR
|
|
16
|
-
8. Run `./
|
|
17
|
-
* To update version for patch release: `./
|
|
18
|
-
* To update version for minor release: `./
|
|
16
|
+
8. Run `./runok.js release` to publish latest release. The website will be updated.
|
|
17
|
+
* To update version for patch release: `./runok.js release patch`
|
|
18
|
+
* To update version for minor release: `./runok.js release minor`
|
|
19
19
|
9. Post announcements in Twitter & Slack
|
|
20
20
|
|
|
21
21
|
## Updating the website
|
|
22
22
|
|
|
23
|
-
* Run `./
|
|
24
|
-
* Run `./
|
|
23
|
+
* Run `./runok.js docs:helpers` to build docs from helpers
|
|
24
|
+
* Run `./runok.js publish:site` to update a website
|