parent
fb5c06c78f
commit
e1ed22af6e
@ -0,0 +1,12 @@ |
||||
import Page from './Page'; |
||||
|
||||
class Administration extends Page { |
||||
get flexNav() { return browser.element('.flex-nav'); } |
||||
get flexNavContent() { return browser.element('.flex-nav .content'); } |
||||
get layoutLink() { return browser.element('.flex-nav .content [href="/admin/Layout"]'); } |
||||
get customScriptBtn() { return browser.element('.section:nth-of-type(6) .expand'); } |
||||
get customScriptLoggedOutTextArea() { return browser.element('.section:nth-of-type(6) .CodeMirror-scroll'); } |
||||
get customScriptLoggedInTextArea() { return browser.element('.CodeMirror.cm-s-default:nth-of-type(2)'); } |
||||
} |
||||
|
||||
module.exports = new Administration(); |
||||
@ -0,0 +1,30 @@ |
||||
/* eslint-env mocha */ |
||||
/* eslint-disable func-names, prefer-arrow-callback */ |
||||
|
||||
import sideNav from '../pageobjects/side-nav.page'; |
||||
import admin from '../pageobjects/administration.page'; |
||||
|
||||
//test data imports
|
||||
import {checkIfUserIsAdmin} from '../test-data/checks'; |
||||
import {adminUsername, adminEmail, adminPassword} from '../test-data/user.js'; |
||||
|
||||
describe.only('Admin Login', () => { |
||||
before(() => { |
||||
checkIfUserIsAdmin(adminUsername, adminEmail, adminPassword); |
||||
sideNav.getChannelFromList('general').waitForExist(5000); |
||||
sideNav.openChannel('general'); |
||||
}); |
||||
|
||||
describe('Enter the admin view', () => { |
||||
before(() => { |
||||
sideNav.accountBoxUserName.click(); |
||||
sideNav.admin.waitForVisible(5000); |
||||
|
||||
}); |
||||
|
||||
it('Enter the admin view', () => { |
||||
sideNav.admin.click(); |
||||
admin.flexNavContent.waitForVisible(5000); |
||||
}); |
||||
}); |
||||
}); |
||||
Loading…
Reference in new issue