scratch-www/test/integration-legacy/smoke-testing/test-join.js

31 lines
666 B
JavaScript
Raw Normal View History

2019-07-17 14:56:48 -04:00
const SeleniumHelper = require('../selenium-helpers.js');
const helper = new SeleniumHelper();
var tap = require('tap');
const test = tap.test;
const driver = helper.buildDriver('www-smoke test-login-failures');
const {
clickText,
findByXpath
} = helper;
var rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
tap.plan(1);
tap.tearDown(function () {
driver.quit();
});
tap.beforeEach(function () {
return driver.get(rootUrl);
});
test('Clicking Join Scratch opens scratchr2 iframe', t => {
clickText('Join Scratch')
.then(() => findByXpath('//iframe[contains(@class, "mod-registration")]'))
.then(() => t.end());
});