mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-3962] sso download directive automated (#4452)
* sso download directive automated * temp changes * temp changes * moving of services under lib testing and ADF-3962 automated * removed the browser sleep * cspell and linting fixes. * codacy improvements * export public-api update * remove circular dep * remove circular dep * fixes * fix user info test * fix datatable * random commit * move other string * fix lint * fix lint * fix prolem type * fix failing test * fix tag test * fix problems after rebase * fix lint * remove space * remove visibility method duplicated
This commit is contained in:
committed by
Eugenio Romano
parent
89f612bbb0
commit
4376d357ac
@@ -31,7 +31,7 @@ import { SearchConfiguration } from '../search.config';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { Util } from '../../util/util';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
|
||||
describe('Search Checklist Component', () => {
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('Search Checklist Component', () => {
|
||||
custom: 'TEST_NAME'
|
||||
};
|
||||
|
||||
const randomName = Util.generateRandomString();
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const nodeNames = {
|
||||
document: `${randomName}.txt`,
|
||||
folder: `${randomName}Folder`
|
||||
|
||||
@@ -31,7 +31,7 @@ import { SearchConfiguration } from '../search.config';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { Util } from '../../util/util';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
|
||||
describe('Search Radio Component', () => {
|
||||
|
||||
@@ -53,7 +53,7 @@ describe('Search Radio Component', () => {
|
||||
custom: 'TEST_NAME'
|
||||
};
|
||||
|
||||
const randomName = Util.generateRandomString();
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const nodeNames = {
|
||||
document: `${randomName}.txt`,
|
||||
folder: `${randomName}Folder`
|
||||
|
||||
@@ -29,6 +29,7 @@ import { FolderModel } from '../models/ACS/folderModel';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import { Util } from '../util/util';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
@@ -43,7 +44,7 @@ describe('Search component - Search Bar', () => {
|
||||
firstChar: 'x',
|
||||
secondChar: 'y',
|
||||
thirdChar: 'z',
|
||||
name: 'impossible-name-folder' + Util.generateRandomString(8)
|
||||
name: 'impossible-name-folder' + StringUtil.generateRandomString(8)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -57,10 +58,10 @@ describe('Search component - Search Bar', () => {
|
||||
const acsUser = new AcsUserModel();
|
||||
const uploadActions = new UploadActions();
|
||||
|
||||
const filename = Util.generateRandomString(16);
|
||||
const firstFolderName = Util.generateRandomString(16);
|
||||
const secondFolderName = Util.generateRandomString(16);
|
||||
const thirdFolderName = Util.generateRandomString(16);
|
||||
const filename = StringUtil.generateRandomString(16);
|
||||
const firstFolderName = StringUtil.generateRandomString(16);
|
||||
const secondFolderName = StringUtil.generateRandomString(16);
|
||||
const thirdFolderName = StringUtil.generateRandomString(16);
|
||||
const filesToDelete = [];
|
||||
|
||||
const firstFileModel = new FileModel({
|
||||
@@ -98,7 +99,7 @@ describe('Search component - Search Bar', () => {
|
||||
Object.assign(firstFileModel, firstFileUploaded.entry);
|
||||
|
||||
fileHighlightUploaded = await this.alfrescoJsApi.nodes.addNode('-my-', {
|
||||
'name': Util.generateRandomString(16),
|
||||
'name': StringUtil.generateRandomString(16),
|
||||
'nodeType': 'cm:content',
|
||||
'properties': {
|
||||
'cm:title': term,
|
||||
|
||||
@@ -28,7 +28,7 @@ import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../models/ACS/fileModel';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import { Util } from '../util/util';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import resources = require('../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
@@ -50,11 +50,11 @@ describe('Search Filters', () => {
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const filename = Util.generateRandomString(16);
|
||||
const fileNamePrefix = Util.generateRandomString(5);
|
||||
const uniqueFileName1 = fileNamePrefix + Util.generateRandomString(5);
|
||||
const uniqueFileName2 = fileNamePrefix + Util.generateRandomString(5);
|
||||
const uniqueFileName3 = fileNamePrefix + Util.generateRandomString(5);
|
||||
const filename = StringUtil.generateRandomString(16);
|
||||
const fileNamePrefix = StringUtil.generateRandomString(5);
|
||||
const uniqueFileName1 = fileNamePrefix + StringUtil.generateRandomString(5);
|
||||
const uniqueFileName2 = fileNamePrefix + StringUtil.generateRandomString(5);
|
||||
const uniqueFileName3 = fileNamePrefix + StringUtil.generateRandomString(5);
|
||||
|
||||
const fileModel = new FileModel({
|
||||
'name': filename, 'shortName': filename.substring(0, 8)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import TestConfig = require('../test.config');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
|
||||
import { Util } from '../util/util';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import resources = require('../util/resources');
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
@@ -51,7 +51,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
let jpgFile, jpgFileSite, txtFile, txtFileSite;
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const randomName = Util.generateRandomString();
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const jpgFileInfo = new FileModel({
|
||||
'location': resources.Files.ADF_DOCUMENTS.JPG.file_location,
|
||||
'name': `${randomName}.jpg`
|
||||
@@ -69,7 +69,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
title: Util.generateRandomString(8),
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
@@ -132,7 +132,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
const userUploadingTxt = new AcsUserModel();
|
||||
const userUploadingImg = new AcsUserModel();
|
||||
|
||||
const randomName = Util.generateRandomString();
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const jpgFileInfo = new FileModel({
|
||||
'location': resources.Files.ADF_DOCUMENTS.JPG.file_location,
|
||||
'name': `${randomName}.jpg`
|
||||
@@ -151,7 +151,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
await this.alfrescoJsApi.login(userUploadingTxt.id, userUploadingTxt.password);
|
||||
|
||||
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
title: Util.generateRandomString(8),
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
@@ -201,7 +201,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
let txtFile;
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const randomName = Util.generateRandomString();
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const txtFileInfo = new FileModel({
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location,
|
||||
'name': `${randomName}.txt`
|
||||
@@ -215,7 +215,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
title: Util.generateRandomString(8),
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import { FileModel } from '../models/ACS/fileModel';
|
||||
import TestConfig = require('../test.config');
|
||||
import { Util } from '../util/util';
|
||||
import resources = require('../util/resources');
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
@@ -40,7 +41,7 @@ describe('Search component - Search Page', () => {
|
||||
active: {
|
||||
firstFile: null,
|
||||
secondFile: null,
|
||||
base: Util.generateRandomString(7),
|
||||
base: StringUtil.generateRandomString(7),
|
||||
extension: '.txt'
|
||||
},
|
||||
no_permission: {
|
||||
@@ -56,17 +57,16 @@ describe('Search component - Search Page', () => {
|
||||
const filePreviewPage = new FilePreviewPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
const emptyFolderModel = new FolderModel({ 'name': 'search' + Util.generateRandomString() });
|
||||
const emptyFolderModel = new FolderModel({ 'name': 'search' + StringUtil.generateRandomString() });
|
||||
let firstFileModel;
|
||||
const newFolderModel = new FolderModel({ 'name': 'newFolder' });
|
||||
let fileNames = [];
|
||||
let adminFileNames = [];
|
||||
const nrOfFiles = 15;
|
||||
const adminNrOfFiles = 5;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
fileNames = Util.generateSequenceFiles(1, nrOfFiles, search.active.base, search.active.extension);
|
||||
adminFileNames = Util.generateSequenceFiles(nrOfFiles + 1, nrOfFiles + adminNrOfFiles, search.active.base, search.active.extension);
|
||||
const adminFileNames = Util.generateSequenceFiles(nrOfFiles + 1, nrOfFiles + adminNrOfFiles, search.active.base, search.active.extension);
|
||||
search.active.firstFile = fileNames[0];
|
||||
search.active.secondFile = fileNames[1];
|
||||
fileNames.splice(0, 1);
|
||||
@@ -84,9 +84,7 @@ describe('Search component - Search Page', () => {
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
await uploadActions.createFolder(this.alfrescoJsApi, emptyFolderModel.name, '-my-');
|
||||
@@ -108,7 +106,7 @@ describe('Search component - Search Page', () => {
|
||||
});
|
||||
|
||||
it('[C260264] Should display message when no results are found', () => {
|
||||
const notExistentFileName = Util.generateRandomString();
|
||||
const notExistentFileName = StringUtil.generateRandomString();
|
||||
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
|
||||
.enterTextAndPressEnter(notExistentFileName);
|
||||
searchResultPage.checkNoResultMessageIsDisplayed();
|
||||
|
||||
Reference in New Issue
Block a user