This commit is contained in:
Belen Curcio
2017-11-08 12:59:08 -03:00
parent 62d01cf2a0
commit 5efdc9865f
5 changed files with 22 additions and 22 deletions
+12 -15
View File
@@ -13,9 +13,8 @@ module.exports = {
return this.section.embed;
},
login(user = {}) {
const embedStream = this.page.embedStream();
const embed = embedStream
const embed = this
.navigate()
.getEmbedSection();
@@ -23,15 +22,15 @@ module.exports = {
.waitForElementVisible('@signInButton')
.click('@signInButton');
this.pause(3000);
this.api.pause(3000);
// Focusing on the Login PopUp
this.windowHandles((result) => {
this.api.windowHandles((result) => {
const handle = result.value[1];
this.switchWindow(handle);
this.api.switchWindow(handle);
});
const login = this.page.login();
const login = this.api.page.login();
login
.setValue('@emailInput', user.email)
@@ -41,15 +40,13 @@ module.exports = {
.click('@loginButton');
// Focusing on the Embed Window
this.windowHandles((result) => {
this.api.windowHandles((result) => {
const handle = result.value[0];
this.switchWindow(handle);
this.api.switchWindow(handle);
});
},
logout() {
const embedStream = this.page.embedStream();
const embed = embedStream
logout() {
const embed = this
.navigate()
.getEmbedSection();
@@ -95,6 +92,8 @@ module.exports = {
restrictedMessageBox: '.talk-restricted-message-box',
suspendedAccountInput: '.talk-suspended-account-username-input',
suspendedAccountSubmitButton: '.talk-suspended-account-submit-button',
banDialog: '.talk-ban-user-dialog',
banDialogConfirmButton: '.talk-ban-user-dialog-button-confirm',
},
sections: {
flag: {
@@ -112,8 +111,6 @@ module.exports = {
arrow: '.talk-plugin-moderation-actions-arrow',
menu: '.talk-plugin-modetarion-actions-menu',
banButton: '.talk-plugin-moderation-actions-ban',
banDialog: '.talk-ban-user-dialog',
banDialogbanButton: '.talk-ban-user-dialog-button-ban',
},
},
profile: {