New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State of 2.0? #318
Comments
Hi @ctaepper! Thanks for your kind words and your support for Serenity/JS :-) I'm finishing the last major feature for v2 now, which is adding support for the Jasmine framework. After that, the last thing that's left is to update the handbook and the tutorials - I think we're looking at a release date at some point in June. Most classes already have comprehensive JSDoc with usage examples and those that don't will get it over the coming weeks, there are also several example mini-projects that demonstrate the major features. I've designed v2 so that the upgrade path should be relatively straight-forward as the main classes ( Having said that, if you're starting a new project now I'd suggest to either go with the What I can also propose is that if you (or others) would like to experiment with v2 you could use this ticket to ask any questions about the new version or let me know if there are things we should address before the official realease. |
@jan-molak, |
@asnov - Since import { Photographer, TakePhotosOfFailures } from '@serenity-js/protractor';
new Photographer(new TakePhotosOfFailures()) Which reminds me that I should:
|
hi @jan-molak, is any v2 document available ? |
Hi @owlran - the website hasn't been published yet as it would replace the existing one for version 1. |
Hey,
|
Hi @Ijee!
The import { isClickable, Wait } from '@serenity-js/protractor';
import { Ensure } from '@serenity-js/core';
actor.attemptsTo(
Wait.until(Form.Submit_Button, isClickable()),
// but also:
Ensure.that(Form.Submit_Button, isClickable()),
);
Yes, it will be added back in some form. If you need it right now you could copy the one from 1.x (source)
In 1.x the In other words, instead of: export class DoSomethingCool extends Interaction {
@step('#actor does something cool')
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void> {
return SomeAbility.of(actor).doStuff();
}
} you can simply: export class DoSomethingCool extends Interaction {
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void> {
return SomeAbility.of(actor).doStuff();
}
toString() {
return '#actor does something cool';
}
} or even shorter: import { Interaction } from '@serenity-js/core';
export DoSomethingCool = () =>
Interaction.where(`#actor does something cool`, actor =>
SomeAbility.of(actor).doStuff());
You're correct. An This means that you could do things like: Check.whether(process.env.BASE_URL, includes('dev'))
.andIfSo(
DoOneThing(),
)
.otherwise(
DoSomeOtherThing(),
) But also: Check.whether(Cookies.Consent_Form, isVisible())
.andIfSo(
Click.on(Cookies.Accept)
) You can find some examples in the specs
I'm sure that's not the case :-) Thanks for taking the time to try 2.x and report the issues! If you come across anything else, please let me know! |
…uestion), which makes the Actor remember the answer to a question and Note.of(question), which makes the Actor retrieve the remembered value. #318
@Ijee I've just added import { Note, TakeNote, TakeNotes } from '@serenity-js/core'
import { BrowseTheWeb, Target, Text } from '@serenity-js/protractor'
import { by, protractor } from 'protractor';
const Checkout = {
VoucherCode: () => Target.the('voucher code').located(by.id('voucher')),
AppliedVoucherCode: () => Target.the('voucher code').located(by.id('applied-voucher')),
};
const actor = Actor.named('Noah').whoCan(
TakeNotes.usingAnEmptyNotepad(),
BrowseTheWeb.using(protractor.browser),
);
actor.attemptsTo(
TakeNote.of(Text.of(Checkout.VoucherCode())),
// ... add the product to a basket, go to checkout, etc.
Ensure.that(Checkout.AppliedVoucherCode(), equals(Checkout.VoucherCode())),
); The cool thing about Ensure.that(Note.of(Checkout.AppliedVoucherCode()), equals('SUMMERSALE')) or interactions: Enter.theValue(Note.of(Checkout.VoucherCode())).into(Checkout.VoucherCodeField()); Hope this helps! |
Noted - cheers! |
Hi @jan-molak : any update on release dates of serenity-ks 2.0 officially? |
@abhinaba1080 - I decided to fix some bugs in Serenity/JS CLI before the release, which ended up becoming a re-write of the CLI... I'm almost finished with that though, so the last bit is the tutorials and more documentation. Thanks for your patience! |
@asnov does the Photographer working for you? Its not for me eventually. Can you share your serenity version and piece of configuration? @jan-molak : i am really stuck, kindly look into this: #335 |
@abhinaba1080 - I've replied in #335, so let's move this conversation there, please. |
All, I've moved the Additionally, the
and generate the reports:
This means that you no longer need to use the old A more in-depth description of the new module can be found in its readme. The new implementation has an improved downloader, which can restart the download should it be interrupted, as well as a better Java detection mechanism, so you should no longer see warnings on Linux-based systems. Fun fact: the new CLI wrapper is written in Serenity/JS Screenplay ;-) |
Hi all, I've just put together a small template project demonstrating the setup required to run tests using Serenity/JS v2 (alpha), Cucumber v5 and Protractor - https://github.com/serenity-js/serenity-js-cucumber-protractor-template Thoughts and feedback welcome. |
@jan-molak would you shed some light on this topic in 2.0? When I run tests using browserstack and multicapabilities I do not see any tagging of browsernames in the tests. Is this feature still pending in 2.0? edit: it seems to omit the results from mutliple browsers. If I run the tests on 2 devices, the report overview does double the count of scenarios tested, but in the scenario details, I can only see one result |
Hi all, I've just published a new Have a look at the module's readme for full installation instructions. To upgrade from the experimental npm install --save @serenity-js/console-reporter and update your Protractor config: // protractor.conf.js
- const { ConsoleReporter } = require('@serenity-js/core');
+ const { ConsoleReporter } = require('@serenity-js/console-reporter');
exports.config = {
framework: 'custom',
frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
serenity: {
crew: [
- new ConsoleReporter(),
+ ConsoleReporter.withDefaultColourSupport(),
],
// other Serenity/JS config
},
// other Protractor config
}; Please note that the new ConsoleReporter.withDefaultColourSupport()
ConsoleReporter.forMonochromaticTerminals()
ConsoleReporter.forDarkTerminals()
ConsoleReporter.forLightTerminals() All the existing implementation examples have also been updated to use the new And here are some screenshots: Thoughts and feedback welcome! |
This feature is killing.. But still it is alpha Can't wait for the official release.. |
Working on it |
@jan-molak I feel like the indentation is different when working with cucumber (in alpha-89, at the least), but the existing extra feedback from execution is definitely helpful.
Current (based on the Mac Terminal, another terminal called Hyper [powered by electron] and also the Jetbrain's Webstorm terminal):
Expected (following the same pattern as shown in your previous screenshots):
I'm wrong, but learning |
Hey @KyleFairns and thanks for your feedback! The formatting reflects the structure of the tasks your actor performs. The output in your example would've been produced in a scenario similar to the one below: actor.attemptsTo(
UseAngular.enableSynchronisation(),
Navigate.to('/login'),
Wait.until(emailField, isVisible()),
Enter.theValue('yeahthisemailisfake@wendysemailprovider.com').into(emailField),
Enter.theValue('password').into(passwordField),
Click.on(loginButton),
) If you introduced domain-specific tasks, for example: const LaunchTheApp = () =>
Task.where(`#actor launches the app`,
UseAngular.enableSynchronisation(),
Navigate.to('/login'),
);
const Authenticate = {
using: (email: string, password: string) =>
Task.where(`#actor authenticates using '${ username }' and password '${ password }'`,
Wait.until(emailField, isVisible()),
Enter.theValue(username).into(emailField),
Enter.theValue(password).into(passwordField),
Click.on(loginButton),
),
} And used the following flow instead: actor.attemptsTo(
LaunchTheApp(),
Authenticate.using('yeahthisemailisfake@wendysemailprovider.com', 'password'),
) You'd see that the level of indentation reflects how deeply the tasks are nested. Given Wendy is using us as her supplier
Wendy Launches the app
✓ Wendy enables synchronisation with Angular (0ms)
✓ Wendy navigates to '/login' (1s 944ms)
Wendy authenticates using 'yeahthisemailisfake@wendysemailprovider.com' and password 'password'
✓ Wendy waits up to 5s until the email field does become visible (146ms)
✓ Wendy enters 'yeahthisemailisfake@wendysemailprovider.com' into the email field (112ms)
✓ Wendy enters 'password' into the password field (47ms)
✓ Wendy clicks on the login button (48ms)
# etc. Does this make sense? |
Apparently I was stumbling on the issue due to defining them as interactions instead of tasks (i.e. an interaction made of interactions) - but hadn't been able to find the 2.0 syntax for tasks before now (and didn't think it would be that simple) Thanks for the help @jan-molak, and keep up the smashing work! |
Hey guys, just to let you know, since Serenity/JS is eating up all the free time I have, I'm looking for alternative ways to sponsor its development going forward to make it more sustainable. I thought I'd experiment with a Github Sponsors profile as a way to do it, so if you or your company find Serenity/JS useful, please consider buying me a coffee every now and then ;-) @EshChn - thanks for being the first Github sponsor of Serenity/JS! |
@ctaepper, @asnov, @owlran , @Ijee, @nbarrett, @abhinaba1080, @KyleFairns - thanks a million for helping me iron out the issues with Serenity/JS v2 I'm happy to announce that the official release is now available on NPM and the new website at https://serenity-js.org. Please give it a try and let me know your thoughts on Twitter and our new Gitter Chat! |
Yesterday i was checking that github was bombarded with commits... I knew
some big is coming... Thanks for all your hard work @jan
Version 2.0 will be a huge success.
…On Mon, 3 Feb 2020 at 6:38 PM, Jan Molak ***@***.***> wrote:
Closed #318 <#318>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#318?email_source=notifications&email_token=AFQR3UQMGQIAEDHOJVTDEITRBAJNPA5CNFSM4HPB5XWKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWLYMMSY#event-3002123851>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQR3UXIGPQEZX3RUPUSHJLRBAJNPANCNFSM4HPB5XWA>
.
|
Hi Jan, I'm a big fan of your work ever since we started using serenity-js over a year ago.
First of all, sorry for opening an issue here, but I don't know how else I can get in touch with you...
I'm with a new company starting a new project and I definitely want to use serenity for our e2e needs. I can see v2 is under heavy development and you do regular alpha releases. Now I am wondering if it still makes sense using the current serenity version when starting a new project, meaning will v2 be an "easy" upgrade path or is it a larger rewrite and we should wait for v2 being released and even more important: documented
The text was updated successfully, but these errors were encountered: