You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('send a message and reset the form afterwards', async t => {
await t
.typeText(Selector('.field input[name="name"]'), 'John Williams')
.typeText(
Selector('.field input[name="_replyto"]'),
'[email protected]',
)
.typeText(Selector('.field input[name="_subject"]'), 'E2E Test')
.typeText(Selector('.field textarea[name="message"]'), 'E2E Test Message')
.click(Selector('form button[type="submit"]'))
.expect(Selector('form button[type="reset"]').textContent)
.match(/^(Message Sent|Sent Message Failed)$/)
.expect(Selector('form button[type="submit"]').textContent)
.contains('Send Message');
});
while it passes all good locally as in - Electron 1.7.5 / Mac OS X 10.12.6
It goes errors like
1) Cannot obtain information about the node because the specified
selector does not match any node in the DOM tree.
Browser: Electron 1.7.5 / Linux 0.0.0
17 | )
18 | .typeText(Selector('.field input[name="_subject"]'), 'E2E
Test')
19 | .typeText(Selector('.field textarea[name="message"]'), 'E2E
Test Message')
20 | .click(Selector('form button[type="submit"]'))
21 | .expect(Selector('form button[type="reset"]').textContent)
> 22 | .match(/^(Message Sent|Sent Message Failed)$/)
23 | .expect(Selector('form button[type="submit"]').textContent)
24 | .contains('Send Message');
25 |});
26 |
at <anonymous>
(/tmp/build/88394182/src/features/pages/contact.js:22:6)
at test (/tmp/build/88394182/src/features/pages/contact.js:11:1)
on the CI environment, which is inside a docker container based on Node:8.2
The text was updated successfully, but these errors were encountered:
It can be related to different browser window sizes on different systems. We've faced with such site behavior in another issue.
You can try to use the same approach - add a resizeWindow command in the start of the test (or before each test):
@AlexanderMoskovkin thanks, changed the running script to DEBUG=nightmare xvfb-run --server-args="-screen 0 1024x768x24" yarn staging
and it works fine;
Previously when using nightmare directly and doing xvfb-run yarn staging works directly.
I have an sample test code like below
while it passes all good locally as in
- Electron 1.7.5 / Mac OS X 10.12.6
It goes errors like
on the CI environment, which is inside a docker container based on Node:8.2
The text was updated successfully, but these errors were encountered: