[ACA-4557] Upload Dialog fixes and refactoring (#7507)

* fix random errors for versioning

* remove node deletion on upload cancel

* fix after rebase

* restore the "complete" button

* simplify e2e

* delete obsolte test
This commit is contained in:
Denys Vuika
2022-02-18 17:04:37 +00:00
committed by GitHub
parent 7c171eaf87
commit 6ccc39d0f4
10 changed files with 44 additions and 214 deletions

View File

@@ -118,17 +118,6 @@ describe('Upload component', () => {
await uploadDialog.dialogIsNotDisplayed();
});
it('[C260168] Should be possible to cancel upload using dialog icon', async () => {
await contentServicesPage.uploadFile(pdfFileModel.location);
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
await uploadDialog.removeUploadedFile(pdfFileModel.name);
await uploadDialog.fileIsCancelled(pdfFileModel.name);
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
await contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name);
});
it('[C260176] Should remove files from upload dialog box when closed', async () => {
await contentServicesPage.uploadFile(pngFileModelTwo.location);
await contentServicesPage.checkContentIsDisplayed(pngFileModelTwo.name);

View File

@@ -249,12 +249,6 @@ describe('Upload component', () => {
await uploadToggles.enableExtensionFilter();
await browser.sleep(1000);
await uploadToggles.addExtension('.docx');
await contentServicesPage.uploadFile(docxFileModel.location);
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
await uploadDialog.removeUploadedFile(docxFileModel.name);
await uploadDialog.fileIsCancelled(docxFileModel.name);
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
await contentServicesPage.uploadFile(pngFileModel.location);
await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
await uploadDialog.dialogIsNotDisplayed();
@@ -268,14 +262,6 @@ describe('Upload component', () => {
const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
await DropActions.dropFile(dragAndDropArea, docxFileModel.location);
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
await uploadDialog.removeUploadedFile(docxFileModel.name);
await uploadDialog.fileIsCancelled(docxFileModel.name);
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
await DropActions.dropFile(dragAndDropArea, pngFileModel.location);
await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
await uploadDialog.dialogIsNotDisplayed();