Browse Source

test: change in invite table modal

pull/6576/head
Raju Udava 1 year ago
parent
commit
7557ee1a9b
  1. 14
      tests/playwright/pages/Dashboard/ProjectView/AccessSettingsPage.ts

14
tests/playwright/pages/Dashboard/ProjectView/AccessSettingsPage.ts

@ -14,15 +14,17 @@ export class AccessSettingsPage extends BasePage {
} }
async setRole(email: string, role: string, networkValidation = true) { async setRole(email: string, role: string, networkValidation = true) {
await this.get().locator('.nc-collaborators-list-row').nth(0).waitFor({ state: 'visible' }); await this.get().locator('.user-row').nth(0).waitFor({ state: 'visible' });
const userCount = await this.get().locator('.nc-collaborators-list-row').count(); const userCount = await this.get().locator('.user-row').count();
for (let i = 0; i < userCount; i++) { for (let i = 0; i < userCount; i++) {
const user = this.get().locator('.nc-collaborators-list-row').nth(i); const user = this.get().locator('.user-row').nth(i);
const userEmail = (await user.locator('.email').innerText()).split('\n')[1]; const userEmail = (await user.locator('.users-email-grid').innerText()).split('\n')[1];
if (userEmail === email) { if (userEmail === email) {
const roleDropdown = user.locator('.nc-collaborator-role-select'); const roleDropdown = user.locator('.nc-roles-selector');
const selectedRole = await user.locator('.nc-collaborator-role-select .badge-text').innerText(); const selectedRole = await user.locator('.nc-roles-selector .badge-text').innerText();
await roleDropdown.click(); await roleDropdown.click();
const menu = this.rootPage.locator('.nc-role-select-dropdown:visible'); const menu = this.rootPage.locator('.nc-role-select-dropdown:visible');

Loading…
Cancel
Save