Skip to content

Commit

Permalink
[ACS-6136] cleanup e2e files (protractor) (#9009)
Browse files Browse the repository at this point in the history
* cleanup e2e

* clean e2e
  • Loading branch information
DenysVuika committed Oct 19, 2023
1 parent b49c86f commit d13db25
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 912 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, User
import { FileModel } from '../../models/ACS/file.model';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { NodeEntry } from '@alfresco/js-api';
import { DateFnsUtils } from '../../../lib/core/src/lib/common/utils/date-fns-utils';
import { format } from 'date-fns';

describe('Document List Component', () => {
let uploadedFolder: NodeEntry;
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('Document List Component', () => {
await navigationBarPage.clickLogoutButton();
});

it('[C279926] Should only display the user\'s files and folders', async () => {
it("[C279926] Should only display the user's files and folders", async () => {
await contentServicesPage.goToDocumentList();
await contentServicesPage.checkContentIsDisplayed(folderName);
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
Expand All @@ -150,7 +150,7 @@ describe('Document List Component', () => {
it('[C279929] Should be able to display the date with date type', async () => {
await apiService.login(acsUser.username, acsUser.password);
mediumDateUploadedNode = await uploadActions.uploadFile(mediumFileModel.location, mediumFileModel.name, '-my-');
const createdDate = DateFnsUtils.formatDate(mediumDateUploadedNode.entry.createdAt, 'll');
const createdDate = format(new Date(mediumDateUploadedNode.entry.createdAt), 'PP');
await contentServicesPage.goToDocumentList();
await contentServicesPage.enableMediumTimeFormat();
const dateValue = await contentServicesPage.getColumnValueForRow(mediumFileModel.name, 'Created');
Expand All @@ -174,7 +174,9 @@ describe('Document List Component', () => {
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
});

let fileANode; let fileBNode; let fileCNode;
let fileANode: NodeEntry;
let fileBNode: NodeEntry;
let fileCNode: NodeEntry;

beforeAll(async () => {
await apiService.loginWithProfile('admin');
Expand Down Expand Up @@ -232,7 +234,6 @@ describe('Document List Component', () => {
});

describe('', () => {

afterEach(async () => {
await navigationBarPage.clickLogoutButton();
});
Expand Down Expand Up @@ -351,7 +352,7 @@ describe('Document List Component', () => {
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path
});

let file: any;
let file: NodeEntry;
const viewer = new ViewerPage();

beforeAll(async () => {
Expand Down
168 changes: 0 additions & 168 deletions e2e/content-services/document-list/document-list-gallery.e2e.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@
import { browser } from 'protractor';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { createApiService, BrowserActions, ErrorPage, LoginPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
import { SitesApi } from '@alfresco/js-api';
import { SiteEntry, SitesApi } from '@alfresco/js-api';

describe('Document List Component', () => {

const loginPage = new LoginPage();
const errorPage = new ErrorPage();
const navigationBarPage = new NavigationBarPage();
const apiService = createApiService();
const usersActions = new UsersActions(apiService);

let privateSite;
let privateSite: SiteEntry;
let acsUser = null;

describe('Permission Message', () => {
Expand Down Expand Up @@ -57,7 +56,7 @@ describe('Document List Component', () => {
it('[C217334] Should display a message when accessing file without permissions', async () => {
await BrowserActions.getUrl(browser.baseUrl + '/files/' + privateSite.entry.guid);
await expect(await errorPage.getErrorCode()).toBe('403');
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
await expect(await errorPage.getErrorDescription()).toBe("You're not allowed access to this resource on the server.");
});
});
});
});
Loading

0 comments on commit d13db25

Please sign in to comment.