mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
ESLint: cleanup await expect
from protractor tests (#9630)
This commit is contained in:
@@ -23,7 +23,6 @@ import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Version component', () => {
|
||||
|
||||
let txtUploadedFile;
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
@@ -79,14 +78,14 @@ describe('Version component', () => {
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C272768] Should be visible the first file version when you upload a file', async () => {
|
||||
await versionManagePage.showNewVersionButton.waitVisible();
|
||||
|
||||
await versionManagePage.checkFileVersionExist('1.0');
|
||||
await expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('[C279995] Should show/hide the new upload file options when click on add New version/cancel button', async () => {
|
||||
@@ -114,12 +113,12 @@ describe('Version component', () => {
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
await versionManagePage.checkFileVersionExist('1.0');
|
||||
await expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await expect(await versionManagePage.getFileVersionName('1.1')).toEqual(fileModelVersionTwo.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
expect(await versionManagePage.getFileVersionName('1.1')).toEqual(fileModelVersionTwo.name);
|
||||
expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('[C269084] Should be possible add a comment when add a new version', async () => {
|
||||
@@ -128,9 +127,9 @@ describe('Version component', () => {
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionThree.location);
|
||||
|
||||
await versionManagePage.checkFileVersionExist('1.2');
|
||||
await expect(await versionManagePage.getFileVersionName('1.2')).toEqual(fileModelVersionThree.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.2')).not.toBeUndefined();
|
||||
await expect(await versionManagePage.getFileVersionComment('1.2')).toEqual('Example comment text');
|
||||
expect(await versionManagePage.getFileVersionName('1.2')).toEqual(fileModelVersionThree.name);
|
||||
expect(await versionManagePage.getFileVersionDate('1.2')).not.toBeUndefined();
|
||||
expect(await versionManagePage.getFileVersionComment('1.2')).toEqual('Example comment text');
|
||||
});
|
||||
|
||||
it('[C275719] Should be possible preview the file when you add a new version', async () => {
|
||||
@@ -140,7 +139,7 @@ describe('Version component', () => {
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionFor.location);
|
||||
|
||||
await versionManagePage.checkFileVersionExist('2.0');
|
||||
await expect(await versionManagePage.getFileVersionName('2.0')).toEqual(fileModelVersionFor.name);
|
||||
expect(await versionManagePage.getFileVersionName('2.0')).toEqual(fileModelVersionFor.name);
|
||||
|
||||
await versionManagePage.showNewVersionButton.click();
|
||||
await versionManagePage.minorRadio.click();
|
||||
@@ -148,6 +147,6 @@ describe('Version component', () => {
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionFive.location);
|
||||
|
||||
await versionManagePage.checkFileVersionExist('2.1');
|
||||
await expect(await versionManagePage.getFileVersionName('2.1')).toEqual(fileModelVersionFive.name);
|
||||
expect(await versionManagePage.getFileVersionName('2.1')).toEqual(fileModelVersionFive.name);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user