serenity-js

A next generation, full-stack acceptance testing framework optimised for collaboration, speed and scale!

APACHE-2.0 License

Downloads
412.4K
Stars
535
Committers
57

Bot releases are hidden (Show)

serenity-js - v0.10.2

Published by jan-molak over 7 years ago

<a name"0.10.2">

0.10.2 (2017-01-22)

Bug Fixes

  • serenity-cucumber: Cucumber data table and docstring steps are correctly reported (053955df, closes #14)

Examples:

Data Tables

Cucumber Data Tables are handy for passing a list of values to a step definition:

  Scenario: Serenity/JS reports DataTable steps

    Given the following accounts:
      | name | email                  | twitter   |
      | Jan  | [email protected]  | @JanMolak |
      | John | [email protected] | @wakaleo  |

and that's what they'll look like in your Serenity Report:

Doc Strings

Doc Strings are handy for passing a larger piece of text to a step definition.

  Scenario: Serenity/JS reports DocString steps

    Given an example.ts file with the following contents:
      """
      export const noop = (_) => _;
      export const sum  = (a, b) => a + b;
      """

Doc Strings are now reported too:


Show your support, give Serenity/JS a star! ★

serenity-js - v0.10.1

Published by jan-molak almost 8 years ago

<a name"0.10.1">

0.10.1 (2017-01-20)

Bug Fixes

  • ci:
    • The release notes should be published correctly now (8f0b4cfb)
    • Travis should be able to correctly test PRs (9829726e, closes #17)
  • coverage: Fix coverage reporting to include files not required from specs (f40a8dc4)
  • cucumber: Add support for generators as step definitions (30fd6528, closes #9)
  • reporting: JSON report is generated even if we couldn't capture a screenshot (f230239e)

Features

  • mocha: Support for running test scenarios with Mocha (168713c7)
  • reporting: AssertionError translated to a Test Failure, not a Test Error (f3b30660)
  • screenplay: See - a screenplay-style way of executing assertions (ade82e5a)
  • serenity-cucumber: Support for generator steps (f3fc2766, closes #13, #15)
serenity-js - v0.8.1

Published by jan-molak almost 8 years ago

0.8.1 (2016-12-30)

Bug Fixes

  • interactions: Is.stale() renamed to Is.absent() to better reflect the purpose of the matcher (8a42a822)
serenity-js - v0.8.0

Published by jan-molak almost 8 years ago

0.8.0 (2016-12-29)

Bug Fixes

  • interactions: Enter.theValue(v: string | number) (c04c5e68)

Features

  • interactions:
    • Active Wait - Screenplay-style equivalent of Protractor's ExpectedConditions (3db8c8ec, closes #7)
    • Clear.theValueOf(t: Target) clears an input field (09712cd2)
    • Passive Wait - Screenplay-style equivalent of Protractor's browser.sleep() (efb1f0cb)

Examples

There are two ways you can wait for things to happen in your test scenarios:

PassiveWait

To make your test wait using a PassiveWait (an equivalent of browser.sleep() in Protractor):

actor.attemptsTo(
  Wait.for(Duration.ofMillis(500)),        // we *assume* that the button will show up during 500ms
  Click.on(InboxNavigation.Compose_Button)
)

Please bear in mind that by using a PassiveWait in your test scenario, you're making an assumption that whatever the condition you're waiting for is, it will be met within the specified timeout. If this assumption turns out to be incorrect (because of the network being slow for instance), your test might result in false negatives. Please try to use ActiveWait instead as it's less prone to assumption-related issues ;-)

Why did I introduce PassiveWait then? Because it's useful with things such as CSS3 animations.

ActiveWait

To make your test wait using an ActiveWait (so actively polling the app until the condition is met):

actor.attemptsTo(
  Wait.until(InboxNavigation.Compose_Button, Is.clickable()),
  Click.on(InboxNavigation.Compose_Button)
)

To specify the maximum timeout:

actor.attemptsTo(
  Wait.upTo(Duration.seconds(10)).until(InboxNavigation.Compose_Button, Is.clickable()),
  Click.on(InboxNavigation.Compose_Button)
)

You might also want to check out the Is class to see what conditions are already defined and find inspiration to write some of your own.

Hope you find the new features useful!
Jan

Many thanks to @npryce for suggesting to introduce the Duration class ✋

serenity-js - v0.7.1

Published by jan-molak almost 8 years ago

0.7.1 (2016-12-24)

Bug Fixes

  • spec: Tests under ./spec and executed via ts-node; corrected the typings (242db610)
serenity-js - v0.7.0

Published by jan-molak almost 8 years ago

<a name"0.7.0">

0.7.0 (2016-12-21)

Bug Fixes

  • typescript: Corrected how a JS dependency is imported into TS code (87c2d80d)

Features

  • interactions: Multi-value Select interaction and question (81fdb453)
serenity-js - v0.6.4

Published by jan-molak almost 8 years ago

<a name"0.6.4">

0.6.4 (2016-12-06)

Bug Fixes

  • dependencies: Updated the shrinkwrap so that the new deps are included (31fbd22d)
serenity-js - v0.6.3

Published by jan-molak almost 8 years ago

<a name"0.6.3">

0.6.3 (2016-12-06)

Bug Fixes

  • cucumber: Support callback style step definitions () (4278968b, closes #8)
serenity-js - v0.6.2

Published by jan-molak almost 8 years ago

<a name"0.6.2">

0.6.2 (2016-11-11)

Bug Fixes

  • protractor: References to 'protractor/globals' changed to 'protractor' (58b11253)
serenity-js - v0.6.1

Published by jan-molak almost 8 years ago

<a name"0.6.1">

0.6.1 (2016-11-09)

Bug Fixes

  • protractor: Moved protractor to peerDependencies (ffd290bc, closes #2)
serenity-js - v0.6.0

Published by jan-molak about 8 years ago

<a name"0.6.0">

0.6.0 (2016-10-03)

Features

  • protractor: Configurable Photographer (558192da)
serenity-js - v0.5.0

Published by jan-molak about 8 years ago

<a name"0.5.0">

0.5.0 (2016-09-23)

Features

  • screenplay: WebElement Question (3c5c3b0f)
serenity-js - v0.4.1

Published by jan-molak about 8 years ago

<a name"0.4.1">

0.4.1 (2016-09-19)

Bug Fixes

  • deps: selenium-webdriver ships with serenity/js (c310adfc)
serenity-js - v0.4.0

Published by jan-molak about 8 years ago

<a name"0.4.0">

0.4.0 (2016-09-18)

Features

  • protractor: You can Select a value and check the SelectedValue (274cabca)
serenity-js - v0.3.0

Published by jan-molak about 8 years ago

<a name"0.3.0">

0.3.0 (2016-09-12)

Bug Fixes

  • Target: Target.of works for Targets defined using the by.id locator (e462f7a4)
  • reporting: Every interaction shows up in the report (961cdf19)

Features

  • interactions: BrowseTheWeb exposes actions() api, DoubleClick demonstrates it (cf2d157a)
serenity-js - v0.2.0

Published by jan-molak about 8 years ago

<a name"0.2.0">

0.2.0 (2016-09-10)

Features

  • screenplay: New Questions and Interactions (abf86116)
serenity-js - v0.1.0

Published by jan-molak about 8 years ago

<a name"0.1.0">

0.1.0 (2016-09-08)

Features

  • npm: First version of Serenity/JS is now available on NPM (d6efac7c)