From: Tiago Melo Date: Mon, 2 Sep 2019 10:17:38 +0000 (+0000) Subject: mgr/dashboard: Remove duplicated method X-Git-Tag: v15.1.0~1598^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=294c941407392f3603790807c243d280e2a3f600;p=ceph-ci.git mgr/dashboard: Remove duplicated method Signed-off-by: Tiago Melo --- diff --git a/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts index 142275ff40b..8aab7eae612 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts @@ -49,12 +49,12 @@ describe('Images page', () => { it('should create image', async () => { await images.createImage(imageName, poolName, '1'); - await expect(images.getTableCell(imageName).isPresent()).toBe(true); + await expect(images.getFirstTableCellWithText(imageName).isPresent()).toBe(true); }); it('should edit image', async () => { await images.editImage(imageName, poolName, newImageName, '2'); - await expect(images.getTableCell(newImageName).isPresent()).toBe(true); + await expect(images.getFirstTableCellWithText(newImageName).isPresent()).toBe(true); }); it('should delete image', async () => { @@ -81,28 +81,28 @@ describe('Images page', () => { await images.navigateTo(); // Need image for trash testing await images.createImage(imageName, poolName, '1'); - await expect(images.getTableCell(imageName).isPresent()).toBe(true); + await expect(images.getFirstTableCellWithText(imageName).isPresent()).toBe(true); }); it('should move the image to the trash', async () => { await images.moveToTrash(imageName); - await expect(images.getTableCell(imageName).isPresent()).toBe(true); + await expect(images.getFirstTableCellWithText(imageName).isPresent()).toBe(true); }); it('should restore image to images table', async () => { await images.restoreImage(imageName, newImageName); - await expect(images.getTableCell(newImageName).isPresent()).toBe(true); + await expect(images.getFirstTableCellWithText(newImageName).isPresent()).toBe(true); }); it('should purge trash in images trash tab', async () => { await images.navigateTo(); // Have had issues with image not restoring fast enough, thus these tests/waits are here await images.waitPresence( - images.getTableCell(newImageName), + images.getFirstTableCellWithText(newImageName), 'Timed out waiting for image to restore' ); await images.waitClickable( - images.getTableCell(newImageName), + images.getFirstTableCellWithText(newImageName), 'Timed out waiting for image to be clickable' ); await images.moveToTrash(newImageName); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/block/images.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/block/images.po.ts index cebdf526348..ec7f7723d31 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/block/images.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/block/images.po.ts @@ -29,7 +29,7 @@ export class ImagesPageHelper extends PageHelper { // Click the create button and wait for image to be made await element(by.cssContainingText('button', 'Create RBD')).click(); - await this.waitPresence(this.getTableCell(name)); + await this.waitPresence(this.getFirstTableCellWithText(name)); } async editImage(name, pool, newName, newSize) { @@ -49,9 +49,9 @@ export class ImagesPageHelper extends PageHelper { await element(by.cssContainingText('button', 'Edit RBD')).click(); await this.navigateTo(); - await this.waitClickable(this.getTableCell(newName)); + await this.waitClickable(this.getFirstTableCellWithText(newName)); // click edit button and wait to make sure new owner is present in table - await this.getTableCell(newName).click(); + await this.getFirstTableCellWithText(newName).click(); await expect( element .all(by.css('.table.table-striped.table-bordered')) @@ -66,8 +66,8 @@ export class ImagesPageHelper extends PageHelper { await this.navigateTo(); // wait for image to be created await this.waitTextNotPresent($$('.datatable-body').first(), '(Creating...)'); - await this.waitClickable(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitClickable(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); // click on the drop down and selects the move to trash option await $$('.table-actions button.dropdown-toggle') .first() @@ -79,7 +79,7 @@ export class ImagesPageHelper extends PageHelper { // Clicks trash tab await this.waitClickable(element(by.cssContainingText('.nav-link', 'Trash'))); await element(by.cssContainingText('.nav-link', 'Trash')).click(); - await this.waitPresence(this.getTableCell(name)); + await this.waitPresence(this.getFirstTableCellWithText(name)); } // Checks trash tab table for image and then restores it to the RBD Images table @@ -89,8 +89,8 @@ export class ImagesPageHelper extends PageHelper { // clicks on trash tab await element(by.cssContainingText('.nav-link', 'Trash')).click(); // wait for table to load - await this.waitClickable(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitClickable(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); await element(by.cssContainingText('button', 'Restore')).click(); // wait for pop-up to be visible (checks for title of pop-up) await this.waitVisibility(element(by.id('name'))); @@ -105,7 +105,7 @@ export class ImagesPageHelper extends PageHelper { // clicks images tab await element(by.cssContainingText('.nav-link', 'Images')).click(); await this.navigateTo(); - await this.waitPresence(this.getTableCell(newName)); + await this.waitPresence(this.getFirstTableCellWithText(newName)); } // Enters trash tab and purges trash, thus emptying the trash table. Checks if @@ -128,7 +128,10 @@ export class ImagesPageHelper extends PageHelper { await this.waitClickable(element(by.id('purgeFormButton'))); await element(by.id('purgeFormButton')).click(); // Wait for image to delete and check it is not present - await this.waitStaleness(this.getTableCell(name), 'Timed out waiting for image to be purged'); - await expect(this.getTableCell(name).isPresent()).toBe(false); + await this.waitStaleness( + this.getFirstTableCellWithText(name), + 'Timed out waiting for image to be purged' + ); + await expect(this.getFirstTableCellWithText(name).isPresent()).toBe(false); } } diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.po.ts index c5fe25b2ef0..3ddc22f4190 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.po.ts @@ -18,8 +18,8 @@ export class ConfigurationPageHelper extends PageHelper { await $('input.form-control.ng-valid').sendKeys(name); // Selects config that we want to clear - await this.waitClickable(this.getTableCell(name)); // waits for config to be clickable - await this.getTableCell(name).click(); // click on the config to edit + await this.waitClickable(this.getFirstTableCellWithText(name)); // waits for config to be clickable + await this.getFirstTableCellWithText(name).click(); // click on the config to edit await element(by.cssContainingText('button', 'Edit')).click(); // clicks button to edit for (const i of valList) { @@ -34,8 +34,8 @@ export class ConfigurationPageHelper extends PageHelper { await $('input.form-control.ng-valid').clear(); await $('input.form-control.ng-valid').sendKeys(name); - await this.waitClickable(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitClickable(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); // Clicks desired config await this.waitVisibility( $('.table.table-striped.table-bordered'), // Checks for visibility of details tab @@ -59,8 +59,8 @@ export class ConfigurationPageHelper extends PageHelper { await $('input.form-control.ng-valid').sendKeys(name); // Selects config that we want to edit - await this.waitClickable(this.getTableCell(name)); // waits for config to be clickable - await this.getTableCell(name).click(); // click on the config to edit + await this.waitClickable(this.getFirstTableCellWithText(name)); // waits for config to be clickable + await this.getFirstTableCellWithText(name).click(); // click on the config to edit await element(by.cssContainingText('button', 'Edit')).click(); // clicks button to edit await this.waitTextToBePresent(this.getBreadcrumb(), 'Edit'); @@ -79,9 +79,9 @@ export class ConfigurationPageHelper extends PageHelper { await $('input.form-control.ng-valid').clear(); await $('input.form-control.ng-valid').sendKeys(name); - await this.waitVisibility(this.getTableCell(name)); + await this.waitVisibility(this.getFirstTableCellWithText(name)); // Checks for visibility of config in table - await this.getTableCell(name).click(); + await this.getFirstTableCellWithText(name).click(); // Clicks config for (let i = 0, valtuple; (valtuple = values[i]); i++) { // iterates through list of values and diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.po.ts index 28e3edf30ed..784b6a1d946 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.po.ts @@ -16,8 +16,8 @@ export class ManagerModulesPageHelper extends PageHelper { // Doesn't check/uncheck boxes because it is not reflected in the details table. // DOES NOT WORK FOR ALL MGR MODULES, for example, Device health await this.navigateTo(); - await this.waitClickable(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitClickable(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); await element(by.cssContainingText('button', 'Edit')).click(); for (const entry of tuple) { @@ -29,16 +29,16 @@ export class ManagerModulesPageHelper extends PageHelper { await element(by.cssContainingText('button', 'Update')).click(); // Checks if edits appear await this.navigateTo(); - await this.waitVisibility(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitVisibility(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); for (const entry of tuple) { await this.waitTextToBePresent($$('.datatable-body').last(), entry[0]); } // Clear mgr module of all edits made to it await this.navigateTo(); - await this.waitClickable(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitClickable(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); await element(by.cssContainingText('button', 'Edit')).click(); // Clears the editable fields @@ -49,8 +49,8 @@ export class ManagerModulesPageHelper extends PageHelper { // Checks that clearing represents in details tab of module await element(by.cssContainingText('button', 'Update')).click(); await this.navigateTo(); - await this.waitVisibility(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitVisibility(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); for (const entry of tuple) { await this.waitTextNotPresent($$('.datatable-body').last(), entry[0]); } @@ -79,8 +79,8 @@ export class ManagerModulesPageHelper extends PageHelper { [warn, 'warn_threshold'] ]; - await this.waitClickable(this.getTableCell('devicehealth')); - await this.getTableCell('devicehealth').click(); + await this.waitClickable(this.getFirstTableCellWithText('devicehealth')); + await this.getFirstTableCellWithText('devicehealth').click(); await element(by.cssContainingText('button', 'Edit')).click(); for (let i = 0, devHealthTuple; (devHealthTuple = devHealthArray[i]); i++) { if (devHealthTuple[0] !== undefined) { @@ -92,9 +92,9 @@ export class ManagerModulesPageHelper extends PageHelper { await element(by.cssContainingText('button', 'Update')).click(); await this.navigateTo(); - await this.waitVisibility(this.getTableCell('devicehealth')); + await this.waitVisibility(this.getFirstTableCellWithText('devicehealth')); // Checks for visibility of devicehealth in table - await this.getTableCell('devicehealth').click(); + await this.getFirstTableCellWithText('devicehealth').click(); for (let i = 0, devHealthTuple; (devHealthTuple = devHealthArray[i]); i++) { if (devHealthTuple[0] !== undefined) { await this.waitFn(async () => { @@ -110,8 +110,8 @@ export class ManagerModulesPageHelper extends PageHelper { // (on my local run of ceph-dev, this is subject to change i would assume). I'd imagine there is a // better way of doing this. await this.navigateTo(); - await this.waitClickable(this.getTableCell('devicehealth')); // checks ansible - await this.getTableCell('devicehealth').click(); + await this.waitClickable(this.getFirstTableCellWithText('devicehealth')); // checks ansible + await this.getFirstTableCellWithText('devicehealth').click(); await element(by.cssContainingText('button', 'Edit')).click(); await this.clearInput(element(by.id('mark_out_threshold'))); await element(by.id('mark_out_threshold')).sendKeys('2419200'); @@ -135,8 +135,8 @@ export class ManagerModulesPageHelper extends PageHelper { await this.waitClickable(element(by.cssContainingText('button', 'Update'))); await element(by.cssContainingText('button', 'Update')).click(); await this.navigateTo(); - await this.waitVisibility(this.getTableCell('devicehealth')); - await this.getTableCell('devicehealth').click(); + await this.waitVisibility(this.getFirstTableCellWithText('devicehealth')); + await this.getFirstTableCellWithText('devicehealth').click(); for (let i = 0, devHealthTuple; (devHealthTuple = devHealthArray[i]); i++) { if (devHealthTuple[0] !== undefined) { await this.waitFn(async () => { diff --git a/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts index ae1eb1645c8..5fcbfd65e59 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts @@ -128,7 +128,7 @@ export abstract class PageHelper { return Number(text.match(/(\d+)\s+selected/)[1]); } - getTableCell(content: string): ElementFinder { + getFirstTableCellWithText(content: string): ElementFinder { return element.all(by.cssContainingText('.datatable-body-cell-label', content)).first(); } @@ -144,13 +144,6 @@ export abstract class PageHelper { return $$('.nav.nav-tabs li').count(); } - /** - * Searches multiple tables and returns the first cell of any table that matches the criteria. - */ - getFirstTableCellWithText(content: string): ElementFinder { - return element.all(by.cssContainingText('.datatable-body-cell-label', content)).first(); - } - /** * Ceph Dashboards' tag is not visible. Instead of the real checkbox, a * replacement is shown which is supposed to have an adapted style. The replacement checkbox shown @@ -312,8 +305,8 @@ export abstract class PageHelper { */ async delete(name: string): Promise { // Selects row - await this.waitClickable(this.getTableCell(name)); - await this.getTableCell(name).click(); + await this.waitClickable(this.getFirstTableCellWithText(name)); + await this.getFirstTableCellWithText(name).click(); // Clicks on table Delete button await $$('.table-actions button.dropdown-toggle') @@ -326,6 +319,6 @@ export abstract class PageHelper { await element(by.cssContainingText('button', 'Delete')).click(); // Waits for item to be removed from table - return this.waitStaleness(this.getTableCell(name)); + return this.waitStaleness(this.getFirstTableCellWithText(name)); } } diff --git a/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts index f6ae51f6cbd..a7e127f1e2e 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts @@ -24,7 +24,7 @@ describe('RGW buckets page', () => { '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 'default-placement' ); - await expect(buckets.getTableCell('000test').isPresent()).toBe(true); + await expect(buckets.getFirstTableCellWithText('000test').isPresent()).toBe(true); }); it('should edit bucket', async () => { diff --git a/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.po.ts index 9a90818cd7c..a0ab86e56c5 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.po.ts @@ -34,12 +34,15 @@ export class BucketsPageHelper extends PageHelper { const createButton = element(by.cssContainingText('button', 'Create Bucket')); await createButton.click(); - return this.waitPresence(this.getTableCell(name), 'Timed out waiting for bucket creation'); + return this.waitPresence( + this.getFirstTableCellWithText(name), + 'Timed out waiting for bucket creation' + ); } @PageHelper.restrictTo(pages.index) async edit(name: string, new_owner: string) { - await this.getTableCell(name).click(); // click on the bucket you want to edit in the table + await this.getFirstTableCellWithText(name).click(); // click on the bucket you want to edit in the table await element(by.cssContainingText('button', 'Edit')).click(); // click button to move to edit page await this.waitTextToBePresent(this.getBreadcrumb(), 'Edit'); await expect(element(by.css('input[name=placement-target]')).getAttribute('value')).toBe( @@ -51,12 +54,12 @@ export class BucketsPageHelper extends PageHelper { // wait to be back on buckets page with table visible await this.waitClickable( - this.getTableCell(name), + this.getFirstTableCellWithText(name), 'Could not return to buckets page and load table after editing bucket' ); // click on edited bucket and check its details table for edited owner field - const promise = await this.getTableCell(name).click(); + const promise = await this.getFirstTableCellWithText(name).click(); const element_details_table = element .all(by.css('.table.table-striped.table-bordered')) .first(); @@ -137,10 +140,10 @@ export class BucketsPageHelper extends PageHelper { await this.navigateTo(); await this.waitClickable( - this.getTableCell(name), + this.getFirstTableCellWithText(name), 'Failed waiting for bucket to be present in table' ); // wait for table to load - await this.getTableCell(name).click(); // click on the bucket you want to edit in the table + await this.getFirstTableCellWithText(name).click(); // click on the bucket you want to edit in the table await element(by.cssContainingText('button', 'Edit')).click(); // click button to move to edit page await this.waitTextToBePresent(this.getBreadcrumb(), 'Edit'); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts index 13f96d11edb..4caaa4df175 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts @@ -29,7 +29,7 @@ describe('RGW users page', () => { it('should create user', async () => { await users.create(user_name, 'Some Name', 'original@website.com', '1200'); - await expect(users.getTableCell(user_name).isPresent()).toBe(true); + await expect(users.getFirstTableCellWithText(user_name).isPresent()).toBe(true); }); it('should edit users full name, email and max buckets', async () => { diff --git a/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.po.ts index fbef4aba968..4d21fb5c497 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.po.ts @@ -29,14 +29,14 @@ export class UsersPageHelper extends PageHelper { // Click the create button and wait for user to be made await element(by.cssContainingText('button', 'Create User')).click(); - await this.waitPresence(this.getTableCell(username)); + await this.waitPresence(this.getFirstTableCellWithText(username)); } async edit(name, new_fullname, new_email, new_maxbuckets) { await this.navigateTo(); - await this.waitClickable(this.getTableCell(name)); // wait for table to load - await this.getTableCell(name).click(); // click on the bucket you want to edit in the table + await this.waitClickable(this.getFirstTableCellWithText(name)); // wait for table to load + await this.getFirstTableCellWithText(name).click(); // click on the bucket you want to edit in the table await element(by.cssContainingText('button', 'Edit')).click(); // click button to move to edit page await this.waitTextToBePresent(this.getBreadcrumb(), 'Edit'); @@ -58,9 +58,9 @@ export class UsersPageHelper extends PageHelper { const editbutton = element(by.cssContainingText('button', 'Edit User')); await editbutton.click(); - await this.waitClickable(this.getTableCell(name)); + await this.waitClickable(this.getFirstTableCellWithText(name)); // Click the user and check its details table for updated content - await this.getTableCell(name).click(); + await this.getFirstTableCellWithText(name).click(); await expect($('.active.tab-pane').getText()).toMatch(new_fullname); // check full name was changed await expect($('.active.tab-pane').getText()).toMatch(new_email); // check email was changed await expect($('.active.tab-pane').getText()).toMatch(new_maxbuckets); // check max buckets was changed @@ -143,8 +143,8 @@ export class UsersPageHelper extends PageHelper { await this.navigateTo(); - await this.waitClickable(this.getTableCell(uname)); // wait for table to load - await this.getTableCell(uname).click(); // click on the bucket you want to edit in the table + await this.waitClickable(this.getFirstTableCellWithText(uname)); // wait for table to load + await this.getFirstTableCellWithText(uname).click(); // click on the bucket you want to edit in the table await element(by.cssContainingText('button', 'Edit')).click(); // click button to move to edit page await this.waitTextToBePresent(this.getBreadcrumb(), 'Edit'); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/ui/role-mgmt.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/ui/role-mgmt.po.ts index 998fa7edced..552285af8db 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/ui/role-mgmt.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/ui/role-mgmt.po.ts @@ -18,13 +18,13 @@ export class RoleMgmtPageHelper extends PageHelper { const createButton = element(by.cssContainingText('button', 'Create Role')); await createButton.click(); - await this.waitPresence(this.getTableCell(name)); + await this.waitPresence(this.getFirstTableCellWithText(name)); } async edit(name, description): Promise { await this.navigateTo(); - await this.getTableCell(name).click(); // select role from table + await this.getFirstTableCellWithText(name).click(); // select role from table await element(by.cssContainingText('button', 'Edit')).click(); // click button to move to edit page // fill in fields with new values @@ -35,7 +35,7 @@ export class RoleMgmtPageHelper extends PageHelper { const editButton = element(by.cssContainingText('button', 'Edit Role')); await editButton.click(); - await this.waitPresence(this.getTableCell(name)); - await this.waitPresence(this.getTableCell(description)); + await this.waitPresence(this.getFirstTableCellWithText(name)); + await this.waitPresence(this.getFirstTableCellWithText(description)); } } diff --git a/src/pybind/mgr/dashboard/frontend/e2e/ui/user-mgmt.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/ui/user-mgmt.po.ts index a16dae56dbb..2c38bf16d04 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/ui/user-mgmt.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/ui/user-mgmt.po.ts @@ -20,13 +20,13 @@ export class UserMgmtPageHelper extends PageHelper { // Click the create button and wait for user to be made const createButton = element(by.cssContainingText('button', 'Create User')); await createButton.click(); - await this.waitPresence(this.getTableCell(username)); + await this.waitPresence(this.getFirstTableCellWithText(username)); } async edit(username, password, name, email): Promise { await this.navigateTo(); - await this.getTableCell(username).click(); // select user from table + await this.getFirstTableCellWithText(username).click(); // select user from table await element(by.cssContainingText('button', 'Edit')).click(); // click button to move to edit page // fill in fields with new values @@ -42,7 +42,7 @@ export class UserMgmtPageHelper extends PageHelper { // Click the edit button and check new values are present in table const editButton = element(by.cssContainingText('button', 'Edit User')); await editButton.click(); - await this.waitPresence(this.getTableCell(email)); - await this.waitPresence(this.getTableCell(name)); + await this.waitPresence(this.getFirstTableCellWithText(email)); + await this.waitPresence(this.getFirstTableCellWithText(name)); } }