Merge pull request #3079 from benjiwheeler/add-join-test

added test to check that join window shows scratchr2 join flow
This commit is contained in:
Benjamin Wheeler 2019-06-25 18:23:59 -04:00 committed by GitHub
commit 35bcb8b33e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,30 @@
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());
});