Nightwatch to Support ES6 and Promises

2,657 views
Skip to first unread message

Eyal Cohen

unread,
Jul 2, 2015, 2:59:22 AM7/2/15
to nightw...@googlegroups.com
Hi,

We want to start our webdriver js tests and we have some questions:

1) When and if nightwatch will support ES6 (ECMAScript 6)?
2) What about promises? does nightwatch support it?

Thanks,

Andrei Rusu

unread,
Jul 2, 2015, 3:19:29 AM7/2/15
to nightw...@googlegroups.com
Hi,

Both of those items are on our roadmap. Promises will be added in v0.8 (along with mocha support) and possibly ES6 soon also.

Andrei

--
You received this message because you are subscribed to the Google Groups "NightwatchJs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nightwatchjs...@googlegroups.com.
To post to this group, send email to nightw...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nightwatchjs/50a0329e-c74a-440a-88c4-bf16daecef1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eyal Cohen

unread,
Jul 2, 2015, 3:26:30 AM7/2/15
to nightw...@googlegroups.com
Thanks for the very quick reply.

Any estimation about the date?

Andrei Rusu

unread,
Jul 2, 2015, 4:25:21 AM7/2/15
to nightw...@googlegroups.com
It could take a few weeks, potentially longer now with the Summer and holiday season :).

Mek

unread,
Jul 8, 2015, 1:15:59 PM7/8/15
to nightw...@googlegroups.com
Hi guys,

Can you please let me know what is the scope of Mocha support ?

Is it that Mocha can run NW tests or NW can run mocha tests.

We are also looking into this since it is a possibility that these 2 tools need to co-exists.

Thank you!
- Mek

Andrei Rusu

unread,
Jul 8, 2015, 2:44:49 PM7/8/15
to nightw...@googlegroups.com
Mocha can run Nightwatch tests. Actually promises support might be postponed because it turns out it wouldn't help much with Mocha, as in the api wouldn't be very nice.

GrayedFox

unread,
Jul 22, 2015, 5:23:54 AM7/22/15
to NightwatchJs


Hey Andrei,

Any word on ES6 support? Writing a bunch of tests at the moment and string interpolation and object/array destructuring assignment would be a god send right now haha

Dave King

unread,
Jul 22, 2015, 8:47:47 AM7/22/15
to nightw...@googlegroups.com
Hi! We use Nightwatch with Babel currently, it "just works". All you
have to do is
require('babel/register'); at the top of your nightwatch.conf.js.

This doesn't promisify the Nightwatch/Selenium interface but it lets
you do things like use string interpolation, destructuring assignment,
etc.

Let me know if you have any questions.
> https://groups.google.com/d/msgid/nightwatchjs/a0fdb1bb-b497-4fda-b378-49ccc97606fd%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Regards,

Dave

mbixby

unread,
Aug 5, 2015, 1:28:29 PM8/5/15
to NightwatchJs
Regarding promisifying commands, would you accept a PR implementing something akin to https://theintern.github.io/leadfoot/Command.html? Or do you have something else in mind?

We want to implement it to simplify live inspection of tests cases – breakpoint in a test case should stop between commands (failed command should pause automatically) and the developer should be able to issue more commands to the browser without knowledge of the queueing mechanism.

GrayedFox

unread,
Nov 26, 2015, 10:11:51 AM11/26/15
to NightwatchJs
Any word on promises? I'm using them with some success at the moment but now am running into problems... not sure if it's my code or Nightwatch at the moment, but I think I'm able to crash the Nightwatch window without stopping the actual test runner (took me a while to figure it out).

GreenAsJade

unread,
Mar 21, 2016, 2:59:04 AM3/21/16
to NightwatchJs
I note that it is now 'babel-core/register'.

When I do requre('babel-core/register');, at the top of nightwatch.conf.js unfortunately, ES6 in my test files is not understood though.

Help?

Thanks!
Reply all
Reply to author
Forward
0 new messages