0.2.25-rc.3 • Published 1 year ago

xlr-ui-test-support v0.2.25-rc.3

Weekly downloads
62
License
-
Repository
github
Last release
1 year ago

Protractor:

Example of reusing the basic protractor configuration:

const config = require('xlr-ui-test-support/e2e/protractor/base.conf');

exports.config = config.with({
    specs: [
        './e2e/protractor/**/*.js'
    ]
});

Gulp:

To use gulp webdriver tasks the following line should be added to the gulpfile:

require('xlr-ui-test-support/gulp/webdriver')(gulp);

package.json:

Make sure to update script command to use gulp:

"update-webdriver": "gulp webdriver-update",

It is possible to set explicit version for selenium, chromedriver and geckodriver via command line argument instead of using it from selenium-versions.json

"update-webdriver": "gulp webdriver-update --chromedriver 84.0.4147.135",

How to debug locally

I use to call gulp directly because gradle is slow.

./gradlew yarn_install
./.gradle/nodejs/node-v12.15.0-linux-x64/bin/node ./node_modules/gulp/bin/gulp.js build-dist
cp dist/index.js ../xl-release/node_modules/xlr-ui-test-support/dist/index.js
cp ./e2e/protractor/base.conf.js ../xl-release/node_modules/xlr-ui-test-support/e2e/protractor/base.conf.js

Dom dumps

When test fails this testsuite will write json-stringified dom snapshot to console output log.

Here are some oneliners to retrieve it later:

    cat the_log | 
    grep -P '^\{"domDump_' | jq '. | to_entries | .[].value' -jr | 
    cat > /tmp/a.html

Beware, that if there are more than one failure in the_log, you may need to cut failures yourself by using head/tail

    cat the_log | 
    grep -P '^\{"domDump_' | less -SN

    cat the_log | 
    grep -P '^\{"domDump_ | tail -n +13 | head -n 12 | jq '. | to_entries | .[].value' -jr | 
    cat > /tmp/a.html
0.2.25-rc.1

1 year ago

0.2.25-rc.2

1 year ago

0.2.25-rc.3

1 year ago

0.2.31-rc.1

1 year ago

0.2.31-rc.2

1 year ago

0.2.34

1 year ago

0.2.33

1 year ago

0.2.32

2 years ago

0.2.3-1.1

1 year ago

0.2.30

2 years ago

0.2.27

2 years ago

0.2.26

2 years ago

0.2.31

2 years ago

0.2.29

2 years ago

0.2.28

2 years ago

0.2.25

3 years ago

0.2.24

3 years ago

0.2.23

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.20

4 years ago

0.2.19

4 years ago

0.2.18

4 years ago