[ADF-5263] Empty page displayed all the time when load content fix (#6209)

* Make test run on API update
Improve create librrary test

* Fix empty page displayed always first

* remvoe console

* fix

* fix

* lint

* fix

* fix

* fix

* fix

* fix
This commit is contained in:
Eugenio Romano
2020-10-05 00:26:56 +01:00
committed by GitHub
parent d128bc158c
commit 04f5fdffd7
27 changed files with 174 additions and 179 deletions

View File

@@ -172,7 +172,7 @@ describe('Create library directive', () => {
for (let i = 0; i < 3; i++) {
await createLibraryDialog.typeLibraryName(name[i]);
await expect(await createLibraryDialog.getLibraryIdText()).toMatch(libraryId[i]);
await createLibraryDialog.waitUntilLibraryIdTextHasValue(libraryId[i]);
await createLibraryDialog.clearLibraryName();
}
});
@@ -185,7 +185,7 @@ describe('Create library directive', () => {
for (let i = 0; i < 3; i++) {
await createLibraryDialog.typeLibraryId(libraryId[i]);
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
await createLibraryDialog.waitErrorMessageIsDisplayed();
await expect(await createLibraryDialog.getErrorMessage()).toMatch('Use numbers and letters only');
}
});
@@ -196,7 +196,7 @@ describe('Create library directive', () => {
await createLibraryDialog.typeLibraryName(name);
await createLibraryDialog.typeLibraryId(libraryId);
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
await createLibraryDialog.waitErrorMessageIsDisplayed();
await expect(await createLibraryDialog.getErrorMessage()).toMatch('Title must be at least 2 characters long');
});
@@ -207,7 +207,7 @@ describe('Create library directive', () => {
await createLibraryDialog.typeLibraryName(name);
await createLibraryDialog.typeLibraryId(libraryId);
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
await createLibraryDialog.waitErrorMessageIsDisplayed();
await expect(await createLibraryDialog.getErrorMessage()).toMatch("Library name can't contain only spaces");
});
@@ -224,7 +224,7 @@ describe('Create library directive', () => {
await createLibraryDialog.typeLibraryName(name);
await createLibraryDialog.typeLibraryId(libraryId);
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
await createLibraryDialog.waitErrorMessageIsDisplayed();
await expect(await createLibraryDialog.getErrorMessage()).toMatch("This Library ID isn't available. Try a different Library ID.");
});

View File

@@ -144,10 +144,13 @@ describe('Favorite directive', () => {
await navigationBarPage.clickTrashcanButton();
await trashcanPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await trashcanPage.numberOfResultsDisplayed()).toBe(1);
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(testFile.entry.name);
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFile.entry.name);
await trashcanPage.clickRestore();
await trashcanPage.contentList.dataTablePage().waitTillContentLoaded();
await trashcanPage.checkTrashcanIsEmpty();
await navigationBarPage.clickContentServicesButton();