Skip to content

V16 added data mark for document blueprint create button #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: v16/dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/helpers/ContentUiHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export class ContentUiHelper extends UiBaseLocators {
private readonly confirmToPublishBtn: Locator;
private readonly tiptapStatusbarWordCount: Locator;
private readonly tiptapStatusbarElementPath: Locator;
private readonly createDocumentBlueprintBtn: Locator;

constructor(page: Page) {
super(page);
Expand Down Expand Up @@ -277,6 +278,7 @@ export class ContentUiHelper extends UiBaseLocators {
this.linkToManualBtn = this.linkPickerModal.locator('[data-mark="action:external"] #button');
this.umbDocumentCollection = page.locator('umb-document-collection');
this.documentTableColumnName = this.listView.locator('umb-document-table-column-name');
this.createDocumentBlueprintBtn = page.locator('[data-mark="entity-action:Umb.EntityAction.Document.CreateBlueprint"]');
//Block Grid - Block List
this.addBlockElementBtn = page.locator('uui-button-group > uui-button').first().filter({has: page.locator('a#button')});
this.formValidationMessage = page.locator('#splitViews umb-form-validation-message #messages');
Expand Down Expand Up @@ -415,6 +417,7 @@ export class ContentUiHelper extends UiBaseLocators {
}

async clickCreateDocumentBlueprintButton() {
await expect(this.createDocumentBlueprintBtn).toBeVisible();
await this.createDocumentBlueprintBtn.click();
}

Expand Down
3 changes: 3 additions & 0 deletions lib/helpers/DocumentBlueprintUiHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ export class DocumentBlueprintUiHelper extends UiBaseLocators{
private readonly documentBlueprintTree: Locator;
private readonly documentBlueprintNameTxt: Locator;
private readonly deleteMenu: Locator;
private readonly createDocumentBlueprintBtn: Locator;

constructor(page: Page) {
super(page);
this.documentBlueprintTree = page.locator('umb-tree[alias="Umb.Tree.DocumentBlueprint"]');
this.documentBlueprintNameTxt = page.locator('#name-input #input');
this.deleteMenu = page.locator('umb-section-sidebar #menu-item').getByLabel('Delete');
this.createDocumentBlueprintBtn = page.locator('[data-mark="entity-action:Umb.EntityAction.DocumentBlueprint.Create"]');
}

async clickActionsMenuForDocumentBlueprints(name: string) {
Expand Down Expand Up @@ -44,6 +46,7 @@ export class DocumentBlueprintUiHelper extends UiBaseLocators{
}

async clickCreateDocumentBlueprintButton() {
await expect(this.createDocumentBlueprintBtn).toBeVisible();
await this.createDocumentBlueprintBtn.click();
}

Expand Down
2 changes: 0 additions & 2 deletions lib/helpers/UiBaseLocators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export class UiBaseLocators {
public readonly chooseDocumentInputBtn: Locator;
public readonly chooseMediaInputBtn: Locator;
public readonly container: Locator;
public readonly createDocumentBlueprintBtn: Locator;
public readonly actionBtn: Locator;
public readonly mediaPickerModalSubmitBtn: Locator;
public readonly deleteBtn: Locator;
Expand Down Expand Up @@ -256,7 +255,6 @@ export class UiBaseLocators {
this.gridBtn = this.page.getByLabel('Grid');
this.listBtn = this.page.getByLabel('List');
this.viewBundleBtn = this.page.locator('umb-collection-view-bundle uui-button svg');
this.createDocumentBlueprintBtn = page.getByLabel(/^Create Document Blueprint(…)?$/);
this.chooseDocumentInputBtn = page.locator('umb-input-document').getByLabel('Choose');
this.chooseMediaInputBtn = page.locator('umb-input-media').getByLabel('Choose');
this.container = page.locator('#container');
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@umbraco/playwright-testhelpers",
"version": "16.0.9",
"version": "16.0.10",
"description": "Test helpers for making playwright tests for Umbraco solutions",
"main": "dist/lib/index.js",
"files": [
Expand Down