I have a problem running my tests for the rock paper scissors challenge. I installed the e2e training wheels, load my js code inside the html body in script tags, run npm in the terminal and the tests passed. Without making any changes, the next day I run the tests again and it showes me an ELIFECYCLE error and that the document is not defined.
Feature test
require('../spec.helper');
describe('User can make a choice between Rock, Paper or Scissors', () => {
before(async () => {
await browser.init()
await browser.visitPage('http://localhost:8080/')
});
beforeEach(async () => {
await browser.page.reload();
});
after(() => {
browser.close();
});
it('renders the Rock button', async () => {
let button = await browser.getContent("[Id='r']")
expect(button).to.eql('Rock');
});
it('renders the Paper button', async () => {
let button = await browser.getContent("[Id='p']")
expect(button).to.eql('Paper');
});
it('renders the Scissors button', async () => {
let button = await browser.getContent("[Id='s']")
expect(button).to.eql('Scissors');
});
});
Usually the problem is solved when I change node version to the latest version, but not this time.
I also tried to remove the node_modules and reinstall it.
Hi, there is not enough info here. the error relates to document not being defined. Please provide more context. What does the test look like? When is the js code being loaded on the page? etc.
Problem
I have a problem running my tests for the rock paper scissors challenge. I installed the e2e training wheels, load my js code inside the html body in script tags, run npm in the terminal and the tests passed. Without making any changes, the next day I run the tests again and it showes me an ELIFECYCLE error and that the document is not defined.
Feature test
Specs
Spec-helper
Screenshots
How did you try to solve the problem?
Usually the problem is solved when I change node version to the latest version, but not this time. I also tried to remove the node_modules and reinstall it.
github repo