mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-7534] folder dialog e2e fixes (#3804)
This commit is contained in:
committed by
GitHub
parent
f11ce49ba3
commit
9ee88c63f3
@@ -78,12 +78,12 @@ test.describe('Create folders', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('[C216345] Create new folder dialog check', async () => {
|
test('[C216345] Create new folder dialog check', async () => {
|
||||||
// TODO [ACS-7534] add * after it is added to adf placeholder/label
|
await expect(folderDialog.getLabelText('Name')).toBeVisible();
|
||||||
await expect(folderDialog.getElementByPlaceholder('input', 'Name')).toBeVisible();
|
await expect(folderDialog.getRequiredMarker('Name')).toBeVisible();
|
||||||
await expect(folderDialog.folderNameInputLocator).toBeVisible();
|
await expect(folderDialog.folderNameInputLocator).toBeVisible();
|
||||||
await expect(folderDialog.getElementByPlaceholder('input', 'Title')).toBeVisible();
|
await expect(folderDialog.getLabelText('Title')).toBeVisible();
|
||||||
await expect(folderDialog.folderTitleInput).toBeVisible();
|
await expect(folderDialog.folderTitleInput).toBeVisible();
|
||||||
await expect(folderDialog.getElementByPlaceholder('textarea', 'Description')).toBeVisible();
|
await expect(folderDialog.getLabelText('Description')).toBeVisible();
|
||||||
await expect(folderDialog.folderDescriptionInput).toBeVisible();
|
await expect(folderDialog.folderDescriptionInput).toBeVisible();
|
||||||
await expect(folderDialog.cancelButton).toBeEnabled();
|
await expect(folderDialog.cancelButton).toBeEnabled();
|
||||||
await expect(folderDialog.createButton).toBeDisabled();
|
await expect(folderDialog.createButton).toBeDisabled();
|
||||||
|
@@ -96,7 +96,9 @@ test.describe('Create Libraries ', () => {
|
|||||||
test('[C280024] Create Library dialog UI', async () => {
|
test('[C280024] Create Library dialog UI', async () => {
|
||||||
await expect(libraryDialog.getDialogTitle(libraryDialogTitle)).toBeVisible();
|
await expect(libraryDialog.getDialogTitle(libraryDialogTitle)).toBeVisible();
|
||||||
await expect(libraryDialog.getLabelText(libraryNameLabel)).toBeVisible();
|
await expect(libraryDialog.getLabelText(libraryNameLabel)).toBeVisible();
|
||||||
|
await expect(libraryDialog.getRequiredMarker(libraryNameLabel)).toBeVisible();
|
||||||
await expect(libraryDialog.getLabelText(libraryIdLabel)).toBeVisible();
|
await expect(libraryDialog.getLabelText(libraryIdLabel)).toBeVisible();
|
||||||
|
await expect(libraryDialog.getRequiredMarker(libraryIdLabel)).toBeVisible();
|
||||||
await expect(libraryDialog.getLabelText(libraryDescriptionLabel)).toBeVisible();
|
await expect(libraryDialog.getLabelText(libraryDescriptionLabel)).toBeVisible();
|
||||||
await expect(libraryDialog.getLabelText(publicVisibility)).toBeVisible();
|
await expect(libraryDialog.getLabelText(publicVisibility)).toBeVisible();
|
||||||
await expect(libraryDialog.getLabelText(publicVisibility)).toBeChecked();
|
await expect(libraryDialog.getLabelText(publicVisibility)).toBeChecked();
|
||||||
|
@@ -39,7 +39,8 @@ export class AdfFolderDialogComponent extends BaseComponent {
|
|||||||
super(page, AdfFolderDialogComponent.rootElement);
|
super(page, AdfFolderDialogComponent.rootElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getElementByPlaceholder = (element:string, text: string) => this.getChild(`${element}[placeholder='${text}']`);
|
public getLabelText = (text: string) => this.getChild('label', { hasText: text });
|
||||||
|
public getRequiredMarker = (text: string) => this.getLabelText(text).locator('.mat-mdc-form-field-required-marker');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is used when we want to fill in Create new Folder Dialog and choose Create button
|
* This method is used when we want to fill in Create new Folder Dialog and choose Create button
|
||||||
|
@@ -37,6 +37,7 @@ export class AdfLibraryDialogComponent extends BaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getLabelText = (text: string) => this.getChild('label', { hasText: text });
|
public getLabelText = (text: string) => this.getChild('label', { hasText: text });
|
||||||
|
public getRequiredMarker = (text: string) => this.getLabelText(text).locator('.mat-mdc-form-field-required-marker');
|
||||||
public getDialogTitle = (text: string) => this.getChild('.mat-mdc-dialog-title', { hasText: text });
|
public getDialogTitle = (text: string) => this.getChild('.mat-mdc-dialog-title', { hasText: text });
|
||||||
public getErrorByText = (text: string): Locator => this.page.locator('mat-error', {hasText: text});
|
public getErrorByText = (text: string): Locator => this.page.locator('mat-error', {hasText: text});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user