Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
eromano committed Jul 14, 2020
1 parent 612f3ff commit 6f2bbf0
Show file tree
Hide file tree
Showing 183 changed files with 480 additions and 513 deletions.
2 changes: 1 addition & 1 deletion demo-shell/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ registerLocaleData(localeSv);
BrowserModule,
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
ReactiveFormsModule,
RouterModule.forRoot(appRoutes, { initialNavigation: true, useHash: true }),
RouterModule.forRoot(appRoutes, { initialNavigation: true }),
FormsModule,
HttpClientModule,
MaterialModule,
Expand Down
4 changes: 2 additions & 2 deletions e2e/content-services/about-content-services.component.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AboutPage, ApiService, LoginSSOPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { AboutPage, ApiService, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';

describe('About Content Services', () => {

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
const aboutPage = new AboutPage();
let acsUser: UserModel;
Expand Down
4 changes: 2 additions & 2 deletions e2e/content-services/comments/comment-component.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import {
ApiService,
LoginSSOPage,
LoginPage,
StringUtil,
UploadActions,
UserModel,
Expand All @@ -33,7 +33,7 @@ import CONSTANTS = require('../../util/constants');

describe('Comment Component', () => {

const loginPage: LoginSSOPage = new LoginSSOPage();
const loginPage: LoginPage = new LoginPage();
const contentServicesPage: ContentServicesPage = new ContentServicesPage();
const viewerPage: ViewerPage = new ViewerPage();
const commentsPage: CommentsPage = new CommentsPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import {
ApiService,
LoginSSOPage,
LoginPage,
NotificationHistoryPage,
StringUtil,
UserModel,
Expand All @@ -31,7 +31,7 @@ import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';

describe('Create folder directive', () => {

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const createFolderDialog = new FolderDialogPage();
const notificationHistoryPage = new NotificationHistoryPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { ApiService, BrowserActions, LoginSSOPage, StringUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
import { ApiService, BrowserActions, LoginPage, StringUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { CreateLibraryDialogPage } from '../../pages/adf/dialog/create-library-dialog.page';
import { CustomSourcesPage } from '../../pages/adf/demo-shell/custom-sources.page';
Expand All @@ -24,7 +24,7 @@ import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';

describe('Create library directive', () => {

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const createLibraryDialog = new CreateLibraryDialogPage();
const customSourcesPage = new CustomSourcesPage();
Expand Down
10 changes: 5 additions & 5 deletions e2e/content-services/directives/delete-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { FileModel } from '../../models/ACS/file.model';
import {
ApiService,
BrowserActions,
LoginSSOPage,
LoginPage,
PaginationPage,
PermissionActions,
StringUtil,
Expand All @@ -34,7 +34,7 @@ import { FolderModel } from '../../models/ACS/folder.model';
describe('Delete Directive', () => {

const apiService = new ApiService();
const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const paginationPage = new PaginationPage();
const contentListPage = contentServicesPage.getDocumentList();
Expand Down Expand Up @@ -118,7 +118,7 @@ describe('Delete Directive', () => {
await uploadActions.createFolder(folderSecond.name, baseFolderUploaded.entry.id);

await loginPage.login(acsUser.email, acsUser.password);
await BrowserActions.getUrl(`${browser.baseUrl}/#/files/${baseFolderUploaded.entry.id}`);
await BrowserActions.getUrl(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
await contentServicesPage.waitForTableBody();
});

Expand Down Expand Up @@ -191,7 +191,7 @@ describe('Delete Directive', () => {
await uploadActions.uploadFile(secondPngFileModel.location, secondPngFileModel.name, baseFolderUploaded.entry.id);

await loginPage.login(acsUser.email, acsUser.password);
await BrowserActions.getUrl(`${browser.baseUrl}/#/files/${baseFolderUploaded.entry.id}`);
await BrowserActions.getUrl(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
await contentServicesPage.waitForTableBody();
});

Expand Down Expand Up @@ -241,7 +241,7 @@ describe('Delete Directive', () => {
await permissionActions.disableInheritedPermissionsForNode(filePdf.entry.id);

await loginPage.login(secondAcsUser.email, secondAcsUser.password);
await BrowserActions.getUrl(`${browser.baseUrl}/#/files/${createdSite.entry.guid}`);
await BrowserActions.getUrl(`${browser.baseUrl}/files/${createdSite.entry.guid}`);
await contentServicesPage.waitForTableBody();
});

Expand Down
4 changes: 2 additions & 2 deletions e2e/content-services/directives/download-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ApiService,
BrowserVisibility,
FileBrowserUtil,
LoginSSOPage,
LoginPage,
UploadActions,
UserModel,
UsersActions
Expand All @@ -32,7 +32,7 @@ import { FolderModel } from '../../models/ACS/folder.model';

describe('Version component actions', () => {

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const navigationBarPage = new NavigationBarPage();
const contentListPage = contentServicesPage.getDocumentList();
Expand Down
6 changes: 3 additions & 3 deletions e2e/content-services/directives/edit-folder-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import {
ApiService,
BrowserActions,
LoginSSOPage,
LoginPage,
NotificationHistoryPage,
StringUtil,
UploadActions,
Expand All @@ -33,7 +33,7 @@ import { FileModel } from '../../models/ACS/file.model';

describe('Edit folder directive', () => {

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const editFolderDialog = new FolderDialogPage();
const acsUser = new UserModel();
Expand Down Expand Up @@ -229,7 +229,7 @@ describe('Edit folder directive', () => {
describe('Edit Folder - no permission', () => {
beforeEach(async () => {
await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
await BrowserActions.getUrl(browser.baseUrl + '/#/files/' + editFolder.entry.id);
await BrowserActions.getUrl(browser.baseUrl + '/files/' + editFolder.entry.id);
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
});

Expand Down
4 changes: 2 additions & 2 deletions e2e/content-services/directives/favorite-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import {
ApiService,
ContentNodeSelectorDialogPage,
LoginSSOPage,
LoginPage,
StringUtil,
UploadActions,
UserModel,
Expand All @@ -34,7 +34,7 @@ import { TrashcanPage } from '../../pages/adf/trashcan.page';

describe('Favorite directive', () => {

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const navigationBarPage = new NavigationBarPage();
let acsUser: UserModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
ApiService,
BreadcrumbPage,
BrowserActions,
LoginSSOPage,
LoginPage,
NotificationHistoryPage,
StringUtil,
UploadActions,
Expand All @@ -35,7 +35,7 @@ import {

describe('Restore content directive', () => {

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const navigationBarPage = new NavigationBarPage();
const acsUser = new UserModel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ApiService,
BreadcrumbPage,
ContentNodeSelectorDialogPage,
LoginSSOPage,
LoginPage,
PaginationPage,
StringUtil,
UploadActions,
Expand All @@ -37,7 +37,7 @@ import { FolderModel } from '../../models/ACS/folder.model';

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

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const navigationBarPage = new NavigationBarPage();
const contentListPage = contentServicesPage.getDocumentList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { browser } from 'protractor';
import { ApiService, LoginSSOPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
import { ApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
import { FileModel } from '../../models/ACS/file.model';
import moment from 'moment-es6';

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

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
let uploadedFolder, uploadedFolderExtra;
const apiService = new ApiService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ApiService,
BrowserActions,
ContentNodeSelectorDialogPage,
LoginSSOPage,
LoginPage,
NotificationHistoryPage,
StringUtil,
UploadActions,
Expand All @@ -34,7 +34,7 @@ import CONSTANTS = require('../../util/constants');

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

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const navigationBarPage = new NavigationBarPage();
const contentNodeSelector = new ContentNodeSelectorDialogPage();
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('Document List Component', () => {
describe('Document List actionns - Move, Copy on no permission folder', () => {
beforeAll(async () => {
await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
await BrowserActions.getUrl(`${browser.baseUrl}/#/files/${sourceFolder.entry.id}`);
await BrowserActions.getUrl(`${browser.baseUrl}/files/${sourceFolder.entry.id}`);
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
});

Expand Down Expand Up @@ -269,7 +269,7 @@ describe('Document List Component', () => {
await contentServicesPage.checkDeleteIsDisabled(pdfFileModel.name);

await loginPage.login(acsUser.email, acsUser.password);
await BrowserActions.getUrl(`${browser.baseUrl}/#/files/${sourceFolder.entry.id}`);
await BrowserActions.getUrl(`${browser.baseUrl}/files/${sourceFolder.entry.id}`);
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();

await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { browser } from 'protractor';
import { ApiService, LoginSSOPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
import { ApiService, LoginPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
import { FileModel } from '../../models/ACS/file.model';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';

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

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const apiService = new ApiService();
const usersActions = new UsersActions(apiService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ArrayUtil,
FileBrowserUtil,
LocalStorageUtil,
LoginSSOPage,
LoginPage,
PaginationPage,
StringUtil,
UploadActions,
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('Document List - Pagination', () => {
default: '25'
};

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const paginationPage = new PaginationPage();
const navigationBarPage = new NavigationBarPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import { browser } from 'protractor';
import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
import { ApiService, BrowserActions, ErrorPage, LoginSSOPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
import { ApiService, BrowserActions, ErrorPage, LoginPage, StringUtil, UsersActions } from '@alfresco/adf-testing';

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

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const errorPage = new ErrorPage();
const navigationBarPage = new NavigationBarPage();
Expand Down Expand Up @@ -52,15 +52,15 @@ 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 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.');
});

it('[C279924] Should display custom message when accessing a file without permissions', async () => {
await contentServicesPage.goToDocumentList();
await contentServicesPage.enableCustomPermissionMessage();
await BrowserActions.getUrl(browser.baseUrl + '/#/files/' + privateSite.entry.guid);
await BrowserActions.getUrl(browser.baseUrl + '/files/' + privateSite.entry.guid);
await expect(await errorPage.getErrorCode()).toBe('403');
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* limitations under the License.
*/

import { ApiService, DropActions, LoginSSOPage, UploadActions, UsersActions } from '@alfresco/adf-testing';
import { ApiService, DropActions, LoginPage, UploadActions, UsersActions } from '@alfresco/adf-testing';
import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
import { browser } from 'protractor';
import { FileModel } from '../../models/ACS/file.model';

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

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const navigationBar = new NavigationBarPage();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { ApiService, LoginSSOPage, PaginationPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { ApiService, LoginPage, PaginationPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
import { FolderModel } from '../../models/ACS/folder.model';
Expand All @@ -24,7 +24,7 @@ import { FileModel } from '../../models/ACS/file.model';
import { UploadDialogPage } from '../../pages/adf/dialog/upload-dialog.page';

describe('Document List - Selection', () => {
const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const navigationBarPage = new NavigationBarPage();
const uploadDialog = new UploadDialogPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { browser } from 'protractor';
import { ApiService, LoginSSOPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
import { ApiService, LoginPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
import { FileModel } from '../../models/ACS/file.model';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';

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

const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
let uploadedFolder, uploadedFolderExtra;
const apiService = new ApiService();
Expand Down

0 comments on commit 6f2bbf0

Please sign in to comment.