Skip to content

Commit

Permalink
Merge pull request #23 from Financial-Times/no-more-heroku
Browse files Browse the repository at this point in the history
No more heroku
  • Loading branch information
adgad authored Feb 8, 2018
2 parents a13a47d + 4b903b6 commit d693e9b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions lib/smoke/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ module.exports.run = async (opts, sets) => {
throw new Error(`Config file for smoke test does not exist at ${configFile}. Either create a config file at ./test/smoke.js, or pass in a path using --config.`);
} else {

let host = opts.host || 'http://local.ft.com:3002';

if (!/:|\./.test(host)) {
host += '.herokuapp.com';
}
let host = opts.host || 'http://localhost:3002';

if (!/https?\:\/\//.test(host)) {
host = 'http://' + host;
Expand Down
1 change: 1 addition & 0 deletions lib/smoke/verify-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const tests = {
result: count === assertion
});
} else if(typeof assertion === 'string') {
await testPage.page.waitForSelector(selector);
const elText = await testPage.page.$eval(selector, el => el.innerText);
results.push({
expected: `element with selector selector ${selector} should contain text ${assertion}`,
Expand Down
2 changes: 1 addition & 1 deletion tasks/open.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ module.exports = (program) => {
.option('-H, --host [value]', 'Set the hostname to use for all tests')

.description('Starts an instance of Chromium with all the URLs from the smoke test open')
.action((sets, opts) => { openSmokeTests(opts, sets) });
.action((sets, opts) => { openSmokeTests(opts, sets); });
};

0 comments on commit d693e9b

Please sign in to comment.