Hot answers tagged


We recently switched from mocha to jest and in the process came across a flake which appears to due to a bug in react. Given the difficulty we had in investigating this issue and that it should be fixed in react 16, we too decided to take the approach of simply retrying the failing tests (the flake rate was ~3% and only when running multiple workers, so the ...


In true javascript style , the support for this is delayed because of switch to another underlying library , in this case jasmine. There is a -t option here (or --testNamePattern ) which takes a regex that matches on the text. If you ran jest -t dashboard you might have more luck.


The jest command gives an exit code 1 if a test failed, 0 if all tests succeeded. You could create a bash shell script that looks something like this: #!/bin/bash jest if [ $? -eq 0 ] then echo "The tests succeeded" exit 0 else echo "The tests failed, running jest again" jest fi Reads:


WaitForExit() checks only for the presence of and not the visibility . You could use $(selector).waitForDisplayed instead . And also ensure there is no other element with the same selector


I could found a solution. login_page.ts driver: ThenableWebDriver; findWelcomeMessageField(){ return this.driver.wait(until.elementLocated('welcome')), 2000); } public async verifyLoginSuccessful() { const result = await this.findWelcomeMessageField(); if (result != null ){ console.log("Element Found"); return true; ...


I have created my own isNotPresent wait-until method which uses a locator so you can check if an element with a certain class is not present anymore. This loops over the locator either until the timeout is reached or no elements with that locator are present. import webdriver from 'selenium-webdriver'; export default class Element { static ...

Only top voted, non community-wiki answers of a minimum length are eligible