Skip to content

upgrading serenity/JS 2.0 + protractor to serenity/JS 3.0 + webdriverIO #2394

Discussion options

You must be logged in to vote

OK, there's quite a few things that could be improved in this snippet:

  • It looks like the 2nd and 3rd scenarios depend on the first scenario setting the futureStep variable; Instead, consider using a beforeAll or beforeEach hooks
  • Making a test scenario wait for 20 seconds can make it flakey. Instead, consider using Wait.until
  • Remember that calling actor.attemptsTo returns a Promise. You'll need to use async/await or return the Promise to Jasmine to ensure your test runner is correctly synchronised with your scenario.

To answer your immediate question, though, let's look at what the old Protractor code was doing:

describe('My feature', () = > {
  
  let futureStep;

  // ...

  await element

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@waleedKhalidCalrom
Comment options

Answer selected by jan-molak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants