Added waitUntilVisibleAfterRefresh and textsToWaitFor - both discussed with @witzig.
Page objects refactored to exploit textsToWaitFor if relevant. Login tests refactored for the newer API. Some additional tests in subscription. The rest at least included as "pending".
This commit is contained in:
parent
ccd37ac792
commit
bb2b3da9dd
14 changed files with 446 additions and 393 deletions
29
test/e2e/page-objects/user.js
Normal file
29
test/e2e/page-objects/user.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
const web = require('../lib/web');
|
||||
|
||||
module.exports = {
|
||||
login: web({
|
||||
url: '/users/login',
|
||||
elementsToWaitFor: ['submitButton'],
|
||||
elements: {
|
||||
usernameInput: 'form[action="/users/login"] input[name="username"]',
|
||||
passwordInput: 'form[action="/users/login"] input[name="password"]',
|
||||
submitButton: 'form[action="/users/login"] [type=submit]'
|
||||
}
|
||||
}),
|
||||
|
||||
logout: web({
|
||||
requestUrl: '/users/logout',
|
||||
url: '/'
|
||||
}),
|
||||
|
||||
account: web({
|
||||
url: '/users/account',
|
||||
elementsToWaitFor: ['form'],
|
||||
elements: {
|
||||
form: `form[action="/users/account"]`,
|
||||
emailInput: 'form[action="/users/account"] input[name="email"]'
|
||||
}
|
||||
}),
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue