Skip to content

Commit 81dc3bb

Browse files
authored
V17 Updated test helper for reordering groups (#318)
* Updated locator for name column * Updated function for redordering two groups * Bumped version
1 parent 98f3b68 commit 81dc3bb

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lib/helpers/ContentUiHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export class ContentUiHelper extends UiBaseLocators {
245245
// List View
246246
this.enterNameInContainerTxt = this.container.getByTestId('input:entity-name').locator('#input');
247247
this.listView = page.locator('umb-document-table-collection-view');
248-
this.nameBtn = page.getByRole('button', {name: 'Name'});
248+
this.nameBtn = page.getByRole('button', { name: 'Name', exact: true });
249249
this.listViewTableRow = this.listView.locator('uui-table-row');
250250
this.publishSelectedListItems = page.locator('umb-entity-bulk-action').getByText('Publish', {exact: true});
251251
this.unpublishSelectedListItems = page.locator('umb-entity-bulk-action').getByText('Unpublish', {exact: true});

lib/helpers/UiBaseLocators.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -972,9 +972,9 @@ export class UiBaseLocators {
972972
const secondGroup = this.page.getByTestId('group:' + secondGroupName);
973973
const firstGroupValue = await firstGroup.getByLabel('Group').inputValue();
974974
const secondGroupValue = await secondGroup.getByLabel('Group').inputValue();
975-
const dragToLocator = firstGroup.locator('[name="icon-grip"]').first();
976-
const dragFromLocator = secondGroup.locator('[name="icon-grip"]').first();
977-
await this.dragAndDrop(dragFromLocator, dragToLocator, 0, 0, 10);
975+
const dragToLocator = firstGroup.locator('[slot="header"]').first();
976+
const dragFromLocator = secondGroup.locator('[slot="header"]').first();
977+
await this.dragAndDrop(dragFromLocator, dragToLocator, 0, 0, 20);
978978
return {firstGroupValue, secondGroupValue};
979979
}
980980

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@umbraco/playwright-testhelpers",
3-
"version": "17.0.3",
3+
"version": "17.0.4",
44
"description": "Test helpers for making playwright tests for Umbraco solutions",
55
"main": "dist/lib/index.js",
66
"files": [

0 commit comments

Comments
 (0)