Skip to content

Instantly share code, notes, and snippets.

@amedrz
Created October 6, 2015 15:59
Show Gist options
  • Save amedrz/f642571f5164277a0f98 to your computer and use it in GitHub Desktop.
Save amedrz/f642571f5164277a0f98 to your computer and use it in GitHub Desktop.
page-object-after
// After page object
const pageObject = PO.build({
visit: PO.visitable('/sign-up'),
name: PO.fillable('#signup-form #name'),
email: PO.fillable('#signup-form #email'),
password: PO.fillable('#signup-form #password'),
submit: PO.clickable('#signup-form #submit')
});
test('sign up', function() {
expect(1);
pageObject.visit()
.name('John Doe')
.email('john@doe.com')
.password('1234567890')
.submit();
andThen(function() {
equal(currentPath(), 'success');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment