mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 03:21:53 +08:00
do not show admin drawer unless user has access
Fixes https://github.com/coralproject/talk/issues/1791
This commit is contained in:
@@ -30,6 +30,10 @@ module.exports = {
|
||||
.waitForElementVisible('@signOutButton')
|
||||
.click('@signOutButton');
|
||||
},
|
||||
login(user) {
|
||||
this.expect.section('@login').to.be.visible;
|
||||
return this.section.login.login(user);
|
||||
},
|
||||
navigateAndLogin(user) {
|
||||
this.navigate().expect.section('@login').to.be.visible;
|
||||
return this.section.login.login(user);
|
||||
|
||||
@@ -20,13 +20,18 @@ module.exports = {
|
||||
client.end();
|
||||
},
|
||||
|
||||
'Admin goes to login': client => {
|
||||
const adminPage = client.page.admin();
|
||||
adminPage.navigate().expect.element('drawerButton').to.not.be.present;
|
||||
},
|
||||
|
||||
'Admin logs in': client => {
|
||||
const adminPage = client.page.admin();
|
||||
const {
|
||||
testData: { admin },
|
||||
} = client.globals;
|
||||
|
||||
adminPage.navigateAndLogin(admin);
|
||||
adminPage.login(admin);
|
||||
},
|
||||
|
||||
'Admin goes to Stories': client => {
|
||||
|
||||
Reference in New Issue
Block a user