Реализован файл с негативными сценариями для редактирования новостей
This commit is contained in:
@@ -19,6 +19,7 @@ export class NewsAdminPage {
|
||||
readonly fileInput: Locator;
|
||||
readonly cropSaveButton: Locator;
|
||||
readonly confirmAddButton: Locator;
|
||||
readonly deleteFileButton: Locator;
|
||||
|
||||
// Таблица новостей
|
||||
readonly newsTable: Locator;
|
||||
@@ -45,6 +46,7 @@ export class NewsAdminPage {
|
||||
this.fileInput = page.locator('input[type="file"]');
|
||||
this.cropSaveButton = page.getByRole('button', { name: 'Сохранить' });
|
||||
this.confirmAddButton = page.getByRole('button', { name: 'Добавить' });
|
||||
this.deleteFileButton = page.locator('img[alt="Удалить файл"]');
|
||||
|
||||
// Таблица новостей
|
||||
this.newsTable = page.locator('table');
|
||||
@@ -109,4 +111,7 @@ export class NewsAdminPage {
|
||||
await this.page.locator('tr', { hasText: title }).getByRole('button', { name: 'Удалить' }).click();
|
||||
}
|
||||
|
||||
async deleteExistingImage() {
|
||||
await this.deleteFileButton.click();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user