Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
removing empty lines and refactoring
  • Loading branch information
thabti committed Jul 25, 2016
commit 10708fee092b5725e381aadc213abc2cea6c0526
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ notifications:
email: false

script: "npm run test:ci:$TEST_SUITE"
script: "npm run test:ci:functional"
5 changes: 1 addition & 4 deletions tests/functional/pageobjects/BasePage.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
module.exports = class BasePage {

export default class BasePage {
constructor(selectors) {

this.selectors = Object.assign(selectors, {
SURAH_PAGE_SURAH_NAME: '.surah-body .navbar-text.surah-name'
});

}

getSurahName() {
Expand Down
2 changes: 0 additions & 2 deletions tests/functional/pageobjects/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import BasePage from './BasePage';
import selectors from './selectors';

export default class HomePage extends BasePage {

constructor() {
super(selectors);
this.selectors = selectors;
Expand Down Expand Up @@ -31,5 +30,4 @@ export default class HomePage extends BasePage {
browser.elementIdClick(surahID);
return browser.getUrl();
}

}
4 changes: 2 additions & 2 deletions tests/functional/pageobjects/selectors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
LANDING_TEXT: 'h4.title',
NEXT: 'a[data-direction="next"]',
PREVIOUS: 'a[data-direction="previous"]',
Expand All @@ -7,4 +7,4 @@ module.exports = {
SEARCH_RESULT_LIST: '.searchinput a',
SURAH_PAGE: '.surah-body .surah-title',
SURAH_NAME: '.navbar-text.surah-name'
}
};
6 changes: 2 additions & 4 deletions tests/functional/specs/HomePageTests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Homepage from '../pageobjects/HomePage';
describe('Home Page', () => {
const homePage = new Homepage(browser);

const homePage = new Homepage(browser);
describe('Home Page', () => {

it('Should Have English Heading', () => {
homePage.goHome();
Expand All @@ -23,7 +23,5 @@ describe('Home Page', () => {
homePage.goHome();
const url = homePage.clickOntheSurahByNumber(1);
expect(url).to.contain('/1');

});

});