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
21
test/e2e/lib/exit-unless-test.js
Normal file
21
test/e2e/lib/exit-unless-test.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
const config = require('./config');
|
||||
const log = require('npmlog');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
if (process.env.NODE_ENV !== 'test' || !fs.existsSync(path.join(__dirname, '..', '..', '..', 'config', 'test.toml'))) {
|
||||
log.error('e2e', 'This script only runs in test and config/test.toml (i.e. a dedicated test database) is present');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (config.app.testserver.enabled !== true) {
|
||||
log.error('e2e', 'This script only runs if the testserver is enabled. Check config/test.toml');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (config.app.www.port !== 3000) {
|
||||
log.error('e2e', 'This script requires Mailtrain to be running on port 3000. Check config/test.toml');
|
||||
process.exit(1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue