Skip to content

v1.9.0

Compare
Choose a tag to compare
@san650 san650 released this 31 Mar 03:35
· 706 commits to master since this release

This release adds a new method to the DSL.

Project Update

$ ember install ember-cli-page-object

Main changes

Add as property to DSL

This new method allows to perform operations on intermediate results within the chain.

It's useful for grouping assertions together.

andThen(() => {
  page.users(0).as(user => {
    assert.equal(user.name, 'John');
    assert.equal(user.lastName, 'Doe');
    assert.equal(user.email, 'john@doe');
  });

  page.users(1).as(user => {
    assert.equal(user.name, 'John');
    assert.equal(user.lastName, 'Doe');
    assert.equal(user.email, 'john@doe');
  });

  page.users(2).as(user => {
    assert.equal(user.name, 'John');
    assert.equal(user.lastName, 'Doe');
    assert.equal(user.email, 'john@doe');
  });
});

Thanks goes to @hidnasio for working on this!

Community contributions

Happy testing!