mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
new e2e test
This commit is contained in:
@@ -15,9 +15,13 @@ module.exports = {
|
||||
'passwordInput': '.talk-admin-login-sign-in #password',
|
||||
'signInButton': '.talk-admin-login-sign-in-button',
|
||||
'storiesNav': '.talk-admin-nav-stories',
|
||||
'storiesDrawerNav': '.talk-admin-drawer-nav .talk-admin-nav-stories',
|
||||
'storiesSection': '.talk-admin-stories',
|
||||
'communityNav': '.talk-admin-nav-community',
|
||||
'communityDrawerNav': '.talk-admin-drawer-nav .talk-admin-nav-community',
|
||||
'communitySection': '.talk-admin-community',
|
||||
'moderationContainer': '.talk-admin-moderation-container'
|
||||
'moderationContainer': '.talk-admin-moderation-container',
|
||||
'drawerButton': '.mdl-layout__drawer-button',
|
||||
'drawerOverlay': 'div.mdl-layout__obfuscator.is-visible',
|
||||
}
|
||||
};
|
||||
|
||||
+18
-10
@@ -1,10 +1,9 @@
|
||||
module.exports = {
|
||||
'@tags': ['admin', 'login'],
|
||||
beforeEach: (client) => {
|
||||
|
||||
// Testing Desktop
|
||||
client.resizeWindow(1280, 800);
|
||||
},
|
||||
beforeEach: (client) => {
|
||||
|
||||
client.resizeWindow(1024, 800);
|
||||
},
|
||||
'Admin logs in': (client) => {
|
||||
const adminPage = client.page.admin();
|
||||
const {testData: {admin}} = client.globals;
|
||||
@@ -29,9 +28,14 @@ module.exports = {
|
||||
|
||||
adminPage
|
||||
.navigate()
|
||||
.waitForElementVisible('@storiesNav')
|
||||
.click('@storiesNav')
|
||||
.waitForElementVisible('@drawerButton')
|
||||
.click('@drawerButton')
|
||||
.waitForElementVisible('@storiesDrawerNav')
|
||||
.click('@storiesDrawerNav')
|
||||
.waitForElementVisible('@drawerOverlay')
|
||||
.click('@drawerOverlay')
|
||||
.waitForElementVisible('@storiesSection');
|
||||
|
||||
},
|
||||
|
||||
'Admin goes to Community': (client) => {
|
||||
@@ -39,9 +43,13 @@ module.exports = {
|
||||
|
||||
adminPage
|
||||
.navigate()
|
||||
.waitForElementVisible('@communityNav')
|
||||
.click('@communityNav')
|
||||
.waitForElementVisible('@communitySection');
|
||||
.waitForElementVisible('@drawerButton')
|
||||
.click('@drawerButton')
|
||||
.waitForElementVisible('@communityDrawerNav')
|
||||
.click('@communityDrawerNav')
|
||||
.waitForElementVisible('@drawerOverlay')
|
||||
.click('@drawerOverlay')
|
||||
.waitForElementVisible('@communitySection');
|
||||
},
|
||||
after: (client) => {
|
||||
client.end();
|
||||
|
||||
Reference in New Issue
Block a user