Реализован файл с негативными сценариями для редактирования новостей

This commit is contained in:
Vlad Smykov
2025-07-01 20:34:24 +03:00
parent 4f98a8fd52
commit 8a0f57dd94
51 changed files with 1309 additions and 0 deletions

View File

@@ -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();
}
}