cleaned up integration test flow
This commit is contained in:
parent
23d629b80b
commit
76de2b29a5
20 changed files with 123 additions and 1798 deletions
|
@ -1,8 +1,8 @@
|
|||
import HomePage from './pages/desktop/home_page';
|
||||
|
||||
/* global browser */
|
||||
const assert = require('assert');
|
||||
const HomePage = require('./pages/desktop/home_page');
|
||||
|
||||
describe('Firefox Send homepage', () => {
|
||||
describe('Firefox Send homepage', function() {
|
||||
const baseUrl = browser.options['baseUrl'];
|
||||
const legalLinks = [
|
||||
'legal',
|
||||
|
@ -13,26 +13,24 @@ describe('Firefox Send homepage', () => {
|
|||
];
|
||||
const socialLinks = ['github', 'twitter', 'mozilla'];
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(function() {
|
||||
browser.url('/');
|
||||
browser.pause(500);
|
||||
});
|
||||
|
||||
it('should have the right title', () => {
|
||||
chai.expect(browser.getTitle()).to.equal('Firefox Send');
|
||||
it('should have the right title', function() {
|
||||
assert.equal(browser.getTitle(), 'Firefox Send');
|
||||
});
|
||||
|
||||
legalLinks.forEach((link, i) => {
|
||||
it(`should navigate to the correct legal pages, page: ${link}`, () => {
|
||||
let homePage = new HomePage();
|
||||
it(`should navigate to the correct legal pages, page: ${link}`, function() {
|
||||
const homePage = new HomePage();
|
||||
// Click links on bottom of page
|
||||
var els = browser.elements(homePage.legalLinks);
|
||||
if (i === 0) {
|
||||
}
|
||||
const els = browser.elements(homePage.legalLinks);
|
||||
browser.elementIdClick(els.value[i].ELEMENT);
|
||||
// Wait for page to load
|
||||
browser.waitUntil(() => {
|
||||
let url = browser.getUrl();
|
||||
const url = browser.getUrl();
|
||||
return url !== baseUrl;
|
||||
});
|
||||
assert.ok(browser.getUrl().includes(link));
|
||||
|
@ -40,14 +38,14 @@ describe('Firefox Send homepage', () => {
|
|||
});
|
||||
|
||||
socialLinks.forEach((link, i) => {
|
||||
it(`should navigate to the correct social pages, page: ${link}`, () => {
|
||||
let homePage = new HomePage();
|
||||
it(`should navigate to the correct social pages, page: ${link}`, function() {
|
||||
const homePage = new HomePage();
|
||||
// Click links on bottom of page
|
||||
var els = browser.elements(homePage.socialLinks);
|
||||
const els = browser.elements(homePage.socialLinks);
|
||||
browser.elementIdClick(els.value[i].ELEMENT);
|
||||
// Wait for page to load
|
||||
browser.waitUntil(() => {
|
||||
let url = browser.getUrl();
|
||||
const url = browser.getUrl();
|
||||
return url !== baseUrl;
|
||||
});
|
||||
assert.ok(browser.getUrl().includes(link));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue