-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
🐛 Bug Report
I'm trying to run a selenium test using Jest, and despite trying to increase the async callback time limit via multiple ways, it's not detecting them when I run my tests on a Linux machine running a Jenkins Job, it uses Node v8.8.3 LTS via NVM (Works fine on MacOS using Node v10).
I originally thought it was an issue on my end, but since I've pretty much tried everything suggested on both the Jest docs, other Jest issues, and Stackoverflow questions, I'm now of the belief this might be a Jest bug which just isn't properly documented.
To Reproduce
Steps to reproduce the behavior (can only reproduce on Linux machine using Node v8.8.3 afaik):
const webdriverio = require('webdriverio');
const client = webdriverio.remote({
desiredCapabilities: {
browserName: 'chrome'
}
});
beforeEach(async () => {
await client.init();
})
test('Google Search for WebdriverIO has correct title', async (done) => {
jest.setTimeout(30000)
// Saw this suggested somewhere, didn't work. Not here, nor in the global setup file.
// if (jasmine) {
// jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
// }
await client.url('https://www.google.com/ncr');
await client.setValue('input[name=q]', 'WebdriverIO');
await client.click('input[value="Google Search"]');
const title = await client.getTitle();
expect(title).toBe('WebdriverIO - Google Search');
done();
}, 30000);
afterEach(async () => {
await client.end();
});
Expected behavior
Tests to run consistently between both machines.
Link to repl or repo (highly encouraged)
This is the Github repo I'm using, the tests are run using npm run jest-test
https://github.com/sgarcia-dev/selenium-grid-test
Run npx envinfo --preset jest
Paste the results here:
11:06:39 System:
11:06:39 OS: Linux 4.14 Amazon Linux AMI 2018.03
11:06:39 CPU: x64 Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz
11:06:39 Binaries:
11:06:39 Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
11:06:39 npm: 6.1.0 - ~/workspace/mad-web-regression-chrome/node_modules/.bin/npm
11:06:39 npmPackages:
11:06:39 jest: ^23.2.0 => 23.2.0