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
@@ -52,7 +52,7 @@ const Table = ({users, setRole, onHeaderClickHandler, setCommenterStatus, viewUs
</td>
<td className="mdl-data-table__cell--non-numeric">
<Dropdown
className="talk-admin-community-people-dd-status"
containerClassName="talk-admin-community-people-dd-status"
value={row.status}
placeholder={t('community.status')}
onChange={(status) => setCommenterStatus(row.id, status)}>
@@ -62,7 +62,7 @@ const Table = ({users, setRole, onHeaderClickHandler, setCommenterStatus, viewUs
</td>
<td className="mdl-data-table__cell--non-numeric">
<Dropdown
className="talk-admin-community-people-dd-role"
containerClassName="talk-admin-community-people-dd-role"
value={row.roles[0] || ''}
placeholder={t('community.role')}
onChange={(role) => setRole(row.id, role)}>
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = {
people: {
selector: '.talk-admin-community-people-container',
elements: {
row: '.talk-admin-community-people-row',
firstRow: '.talk-admin-community-people-row:first-child',
dropdownStatus: '.talk-admin-community-people-dd-status',
dropdownRole: '.talk-admin-community-people-dd-role',
dropdownStatusActive: '.talk-admin-community-people-dd-status .dd-list-active',
+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: {
@@ -14,6 +14,7 @@ module.exports = {
.getEmbedSection();
},
'admin bans user': (client) => {
const embed = client.page.embedStream().section.embed;
const modSection = client.page.embedStream().section.embed.section.mod;
modSection
@@ -21,10 +22,12 @@ module.exports = {
.click('@arrow')
.waitForElementVisible('@menu')
.waitForElementVisible('@banButton')
.click('@banButton')
.click('@banButton');
embed
.waitForElementVisible('@banDialog')
.waitForElementVisible('@banDialogbanButton')
.click('@banDialogbanButton')
.waitForElementVisible('@banDialogConfirmButton')
.click('@banDialogConfirmButton')
.waitForElementNotVisible('@banDialog');
},
'admin logs out': (client) => {
@@ -73,7 +76,7 @@ module.exports = {
const modSection = client.page.adminCommunity().section.people;
modSection
.waitForElementVisible('@row')
.waitForElementVisible('@firstRow')
.waitForElementVisible('@dropdownStatus')
.click('@dropdownStatus')
.waitForElementVisible('@dropdownStatusActive')