mirror of
https://github.com/wassname/talk.git
synced 2026-08-09 12:30:42 +08:00
Use visible were suitable and wait for drawer to dissappear
This commit is contained in:
@@ -11,19 +11,19 @@ module.exports = {
|
||||
this
|
||||
.waitForElementVisible('@drawerButton')
|
||||
.click('@drawerButton');
|
||||
this.expect.section('@drawer').to.be.present;
|
||||
this.expect.section('@drawer').to.be.visible;
|
||||
return this.section.drawer;
|
||||
},
|
||||
goToStories() {
|
||||
this
|
||||
.click('@storiesNav')
|
||||
.expect.section('@stories').to.be.present;
|
||||
.expect.section('@stories').to.be.visible;
|
||||
return this.section.stories;
|
||||
},
|
||||
goToCommunity() {
|
||||
this
|
||||
.click('@communityNav')
|
||||
.expect.section('@community').to.be.present;
|
||||
.expect.section('@community').to.be.visible;
|
||||
return this.section.community;
|
||||
},
|
||||
logout() {
|
||||
@@ -62,7 +62,7 @@ module.exports = {
|
||||
goToPeople() {
|
||||
this
|
||||
.click('@peopleNav')
|
||||
.expect.section('@people').to.be.present;
|
||||
.expect.section('@people').to.be.visible;
|
||||
return this.section.people;
|
||||
},
|
||||
}],
|
||||
@@ -98,20 +98,21 @@ module.exports = {
|
||||
goToStories() {
|
||||
this
|
||||
.click('@storiesButton');
|
||||
this.parent.expect.section('@stories').to.be.present;
|
||||
this.parent.expect.section('@stories').to.be.visible;
|
||||
this.close();
|
||||
return this.parent.section.stories;
|
||||
},
|
||||
goToCommunity() {
|
||||
this
|
||||
.click('@communityButton');
|
||||
this.parent.expect.section('@community').to.be.present;
|
||||
this.parent.expect.section('@community').to.be.visible;
|
||||
this.close();
|
||||
return this.parent.section.stories;
|
||||
},
|
||||
close() {
|
||||
this.parent
|
||||
.click('@drawerOverlay');
|
||||
.click('@drawerOverlay')
|
||||
.waitForElementNotPresent('@drawerOverlay');
|
||||
},
|
||||
}],
|
||||
elements: {
|
||||
@@ -129,7 +130,7 @@ module.exports = {
|
||||
.waitForElementVisible('@signInButton')
|
||||
.click('@signInButton');
|
||||
const adminPage = this.api.page.admin();
|
||||
adminPage.expect.section('@moderate').to.be.present;
|
||||
adminPage.expect.section('@moderate').to.be.visible;
|
||||
return adminPage.section.moderate;
|
||||
},
|
||||
}],
|
||||
|
||||
@@ -5,19 +5,19 @@ module.exports = {
|
||||
commands: [{
|
||||
ready: function() {
|
||||
this.switchToIframe();
|
||||
this.expect.section('@comments').to.be.present;
|
||||
this.expect.section('@comments').to.be.visible;
|
||||
return this.section.comments;
|
||||
},
|
||||
goToProfileSection: function() {
|
||||
this.waitForElementVisible('@profileTabButton');
|
||||
this.click('@profileTabButton');
|
||||
this.expect.section('@profile').to.be.present;
|
||||
this.expect.section('@profile').to.be.visible;
|
||||
return this.section.profile;
|
||||
},
|
||||
goToCommentsSection: function() {
|
||||
this.waitForElementVisible('@commentsTabButton');
|
||||
this.click('@commentsTabButton');
|
||||
this.expect.section('@comments').to.be.present;
|
||||
this.expect.section('@comments').to.be.visible;
|
||||
return this.section.comments;
|
||||
},
|
||||
navigateToAsset: function(asset) {
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = {
|
||||
|
||||
install
|
||||
.navigate()
|
||||
.expect.section('@step1').to.be.present;
|
||||
.expect.section('@step1').to.be.visible;
|
||||
|
||||
},
|
||||
'User clicks get started button': (client) => {
|
||||
@@ -35,7 +35,7 @@ module.exports = {
|
||||
const install = client.page.install();
|
||||
|
||||
install
|
||||
.expect.section('@step2').to.be.present;
|
||||
.expect.section('@step2').to.be.visible;
|
||||
},
|
||||
'User fills step 2': (client) => {
|
||||
const step2 = client.page.install().section.step2;
|
||||
@@ -51,7 +51,7 @@ module.exports = {
|
||||
const install = client.page.install();
|
||||
|
||||
install
|
||||
.expect.section('@step3').to.be.present;
|
||||
.expect.section('@step3').to.be.visible;
|
||||
},
|
||||
'User fills step 3': (client) => {
|
||||
const step3 = client.page.install().section.step3;
|
||||
@@ -69,7 +69,7 @@ module.exports = {
|
||||
const install = client.page.install();
|
||||
|
||||
install
|
||||
.expect.section('@step4').to.be.present;
|
||||
.expect.section('@step4').to.be.visible;
|
||||
},
|
||||
'User fills step 4': (client) => {
|
||||
const step4 = client.page.install().section.step4;
|
||||
@@ -88,6 +88,6 @@ module.exports = {
|
||||
const install = client.page.install();
|
||||
|
||||
install
|
||||
.expect.section('@step5').to.be.present;
|
||||
.expect.section('@step5').to.be.visible;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = {
|
||||
const {testData: {admin}} = client.globals;
|
||||
|
||||
adminPage.navigate();
|
||||
adminPage.expect.section('@login').to.be.present;
|
||||
adminPage.expect.section('@login').to.be.visible;
|
||||
adminPage.section.login.login(admin);
|
||||
},
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = {
|
||||
|
||||
adminPage
|
||||
.navigate()
|
||||
.expect.section('@login').to.be.present;
|
||||
.expect.section('@login').to.be.visible;
|
||||
|
||||
adminPage.section.login
|
||||
.login(admin);
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = {
|
||||
|
||||
adminPage
|
||||
.navigate()
|
||||
.expect.section('@login').to.be.present;
|
||||
.expect.section('@login').to.be.visible;
|
||||
|
||||
adminPage.section.login
|
||||
.login(admin);
|
||||
@@ -83,7 +83,7 @@ module.exports = {
|
||||
|
||||
adminPage
|
||||
.navigate()
|
||||
.expect.section('@login').to.be.present;
|
||||
.expect.section('@login').to.be.visible;
|
||||
|
||||
adminPage.section.login
|
||||
.login(admin);
|
||||
@@ -129,7 +129,7 @@ module.exports = {
|
||||
const comments = embedStream.section.comments;
|
||||
|
||||
comments
|
||||
.waitForElementPresent('@commentBoxTextarea')
|
||||
.waitForElementPresent('@commentBoxPostButton');
|
||||
.waitForElementVisible('@commentBoxTextarea')
|
||||
.waitForElementVisible('@commentBoxPostButton');
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user