mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Ban xit and xdescribe use in the future (#4923)
* remove xit test and ban xit and xdescribe use in the future * remove xit test and ban xit and xdescribe use in the future * remove test excluded * remove consecutive blank line
This commit is contained in:
@@ -236,16 +236,6 @@ describe('Document List Component', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C260121] Should show the spinner on content loading', async (done) => {
|
|
||||||
acsUser = new AcsUserModel();
|
|
||||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
|
||||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
|
||||||
contentServicesPage.clickOnContentServices();
|
|
||||||
contentServicesPage.checkSpinnerIsShowed();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C279959] Should display empty folder state for new folders', async (done) => {
|
it('[C279959] Should display empty folder state for new folders', async (done) => {
|
||||||
acsUser = new AcsUserModel();
|
acsUser = new AcsUserModel();
|
||||||
|
|
||||||
|
@@ -24,7 +24,6 @@ import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
|||||||
|
|
||||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||||
import { FileModel } from '../../models/ACS/fileModel';
|
import { FileModel } from '../../models/ACS/fileModel';
|
||||||
import { FolderModel } from '../../models/ACS/folderModel';
|
|
||||||
|
|
||||||
import resources = require('../../util/resources');
|
import resources = require('../../util/resources');
|
||||||
|
|
||||||
@@ -44,11 +43,6 @@ describe('Upload component - Excluded Files', () => {
|
|||||||
'location': resources.Files.ADF_DOCUMENTS.INI.file_location
|
'location': resources.Files.ADF_DOCUMENTS.INI.file_location
|
||||||
});
|
});
|
||||||
|
|
||||||
const folderWithExcludedFile = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.FOLDER_EXCLUDED.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.FOLDER_EXCLUDED.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
const txtFileModel = new FileModel({
|
const txtFileModel = new FileModel({
|
||||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||||
@@ -106,18 +100,6 @@ describe('Upload component - Excluded Files', () => {
|
|||||||
.checkContentIsNotDisplayed(iniExcludedFile.name);
|
.checkContentIsNotDisplayed(iniExcludedFile.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C260125] Should not upload excluded file when they are in a Folder', () => {
|
|
||||||
uploadToggles.enableFolderUpload();
|
|
||||||
|
|
||||||
contentServicesPage.uploadFolder(folderWithExcludedFile.location);
|
|
||||||
|
|
||||||
uploadDialog.checkUploadCompleted().then(() => {
|
|
||||||
contentServicesPage.doubleClickRow(folderWithExcludedFile.name)
|
|
||||||
.checkContentIsNotDisplayed(iniExcludedFile.name)
|
|
||||||
.checkContentIsDisplayed('a_file.txt');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C212862] Should not allow upload file excluded in the files extension of app.config.json', async () => {
|
it('[C212862] Should not allow upload file excluded in the files extension of app.config.json', async () => {
|
||||||
await LocalStorageUtil.setConfigField('files', JSON.stringify({
|
await LocalStorageUtil.setConfigField('files', JSON.stringify({
|
||||||
excluded: ['.DS_Store', 'desktop.ini', '*.txt'],
|
excluded: ['.DS_Store', 'desktop.ini', '*.txt'],
|
||||||
|
@@ -23,7 +23,6 @@ import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
|||||||
import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
||||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||||
import { FileModel } from '../../models/ACS/fileModel';
|
import { FileModel } from '../../models/ACS/fileModel';
|
||||||
import { FolderModel } from '../../models/ACS/folderModel';
|
|
||||||
import resources = require('../../util/resources');
|
import resources = require('../../util/resources');
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
@@ -67,16 +66,6 @@ describe('Upload component', () => {
|
|||||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||||
});
|
});
|
||||||
const folderOne = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.FOLDER_ONE.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.FOLDER_ONE.folder_location
|
|
||||||
});
|
|
||||||
const folderTwo = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.FOLDER_TWO.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.FOLDER_TWO.folder_location
|
|
||||||
});
|
|
||||||
const uploadedFileInFolder = new FileModel({ 'name': resources.Files.ADF_DOCUMENTS.FILE_INSIDE_FOLDER_ONE.file_name });
|
|
||||||
const uploadedFileInFolderTwo = new FileModel({ 'name': resources.Files.ADF_DOCUMENTS.FILE_INSIDE_FOLDER_TWO.file_name });
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
beforeAll(async (done) => {
|
||||||
|
|
||||||
@@ -126,22 +115,6 @@ describe('Upload component', () => {
|
|||||||
.checkContentIsDisplayed(firstPdfFileModel.name);
|
.checkContentIsDisplayed(firstPdfFileModel.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C260173] Should be able to upload folder when enabled', () => {
|
|
||||||
uploadToggles.enableFolderUpload();
|
|
||||||
uploadToggles.checkFolderUploadToggleIsEnabled();
|
|
||||||
|
|
||||||
contentServicesPage.uploadFolder(folderOne.location);
|
|
||||||
uploadDialog.checkUploadCompleted().then(() => {
|
|
||||||
contentServicesPage.checkContentIsDisplayed(folderOne.name);
|
|
||||||
});
|
|
||||||
expect(contentServicesPage.getFolderButtonTooltip()).toEqual('Custom tooltip');
|
|
||||||
uploadDialog.fileIsUploaded(uploadedFileInFolder.name);
|
|
||||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
|
||||||
contentServicesPage.doubleClickRow(folderOne.name).checkContentIsDisplayed(uploadedFileInFolder.name);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
uploadToggles.disableFolderUpload();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C272789] Should be able to upload PDF file', () => {
|
it('[C272789] Should be able to upload PDF file', () => {
|
||||||
contentServicesPage
|
contentServicesPage
|
||||||
.uploadFile(pdfFileModel.location)
|
.uploadFile(pdfFileModel.location)
|
||||||
@@ -298,32 +271,6 @@ describe('Upload component', () => {
|
|||||||
uploadToggles.clickCheckboxDisableUpload();
|
uploadToggles.clickCheckboxDisableUpload();
|
||||||
expect(contentServicesPage.uploadButtonIsEnabled()).toBeTruthy();
|
expect(contentServicesPage.uploadButtonIsEnabled()).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C279882] Should be possible Upload a folder in a folder', () => {
|
|
||||||
uploadToggles.enableFolderUpload();
|
|
||||||
browser.driver.sleep(1000);
|
|
||||||
contentServicesPage.uploadFolder(folderOne.location);
|
|
||||||
uploadDialog.checkUploadCompleted().then(() => {
|
|
||||||
contentServicesPage.checkContentIsDisplayed(folderOne.name);
|
|
||||||
});
|
|
||||||
uploadDialog.fileIsUploaded(uploadedFileInFolder.name);
|
|
||||||
|
|
||||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
|
||||||
contentServicesPage.doubleClickRow(folderOne.name).checkContentIsDisplayed(uploadedFileInFolder.name);
|
|
||||||
|
|
||||||
uploadToggles.enableFolderUpload();
|
|
||||||
browser.driver.sleep(1000);
|
|
||||||
contentServicesPage.uploadFolder(folderTwo.location);
|
|
||||||
uploadDialog.checkUploadCompleted().then(() => {
|
|
||||||
contentServicesPage.checkContentIsDisplayed(folderTwo.name);
|
|
||||||
});
|
|
||||||
uploadDialog.fileIsUploaded(uploadedFileInFolderTwo.name);
|
|
||||||
|
|
||||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
|
||||||
contentServicesPage.doubleClickRow(folderTwo.name).checkContentIsDisplayed(uploadedFileInFolderTwo.name);
|
|
||||||
|
|
||||||
uploadToggles.disableFolderUpload();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260171] Should upload only the extension filter allowed when Enable extension filter is enabled', () => {
|
it('[C260171] Should upload only the extension filter allowed when Enable extension filter is enabled', () => {
|
||||||
|
@@ -20,12 +20,10 @@ import { browser } from 'protractor';
|
|||||||
import { StringUtil, LoginPage, NotificationHistoryPage } from '@alfresco/adf-testing';
|
import { StringUtil, LoginPage, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||||
import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||||
|
|
||||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||||
import { FileModel } from '../../models/ACS/fileModel';
|
import { FileModel } from '../../models/ACS/fileModel';
|
||||||
import { FolderModel } from '../../models/ACS/folderModel';
|
|
||||||
|
|
||||||
import resources = require('../../util/resources');
|
import resources = require('../../util/resources');
|
||||||
|
|
||||||
@@ -37,7 +35,6 @@ describe('Upload - User permission', () => {
|
|||||||
|
|
||||||
const contentServicesPage = new ContentServicesPage();
|
const contentServicesPage = new ContentServicesPage();
|
||||||
const uploadDialog = new UploadDialog();
|
const uploadDialog = new UploadDialog();
|
||||||
const uploadToggles = new UploadToggles();
|
|
||||||
const loginPage = new LoginPage();
|
const loginPage = new LoginPage();
|
||||||
let acsUser;
|
let acsUser;
|
||||||
let acsUserTwo;
|
let acsUserTwo;
|
||||||
@@ -59,11 +56,6 @@ describe('Upload - User permission', () => {
|
|||||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||||
});
|
});
|
||||||
|
|
||||||
const folder = new FolderModel({
|
|
||||||
'name': resources.Files.ADF_DOCUMENTS.FOLDER_TWO.folder_name,
|
|
||||||
'location': resources.Files.ADF_DOCUMENTS.FOLDER_TWO.folder_location
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
provider: 'ECM',
|
provider: 'ECM',
|
||||||
@@ -114,31 +106,6 @@ describe('Upload - User permission', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C212861] Should not be allowed to Drag and drop a file/folder in a folder with consumer permissions', () => {
|
|
||||||
contentServicesPage.checkDragAndDropDIsDisplayed();
|
|
||||||
|
|
||||||
contentServicesPage.dragAndDropFolder(folder.location);
|
|
||||||
contentServicesPage.checkContentIsDisplayed(folder.name);
|
|
||||||
|
|
||||||
contentServicesPage.dragAndDropFile(emptyFile.location);
|
|
||||||
contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
|
||||||
|
|
||||||
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
|
||||||
|
|
||||||
browser.sleep(3000);
|
|
||||||
|
|
||||||
contentServicesPage.dragAndDropFile(emptyFile.location);
|
|
||||||
contentServicesPage.dragAndDropFolder(folder.location);
|
|
||||||
|
|
||||||
const fileInTheUploadedFolder = 'share_profile_pic.png';
|
|
||||||
|
|
||||||
uploadDialog.fileIsError(emptyFile.name);
|
|
||||||
uploadDialog.fileIsError(fileInTheUploadedFolder);
|
|
||||||
|
|
||||||
contentServicesPage.checkContentIsNotDisplayed(emptyFile.name);
|
|
||||||
contentServicesPage.checkContentIsNotDisplayed(folder.name);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C291921] Should display tooltip for uploading files without permissions', () => {
|
it('[C291921] Should display tooltip for uploading files without permissions', () => {
|
||||||
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
||||||
|
|
||||||
@@ -169,30 +136,6 @@ describe('Upload - User permission', () => {
|
|||||||
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C279916] Should not be allowed to upload a folder in folder with consumer permissions', () => {
|
|
||||||
uploadToggles.enableFolderUpload();
|
|
||||||
uploadToggles.checkFolderUploadToggleIsEnabled();
|
|
||||||
|
|
||||||
contentServicesPage.uploadFolder(folder.location)
|
|
||||||
.checkContentIsDisplayed(folder.name);
|
|
||||||
|
|
||||||
const fileInTheUploadedFolder = 'share_profile_pic.png';
|
|
||||||
|
|
||||||
uploadDialog.fileIsUploaded(fileInTheUploadedFolder);
|
|
||||||
|
|
||||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
|
||||||
|
|
||||||
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
|
||||||
|
|
||||||
browser.sleep(3000);
|
|
||||||
|
|
||||||
uploadToggles.enableFolderUpload();
|
|
||||||
uploadToggles.checkFolderUploadToggleIsEnabled();
|
|
||||||
|
|
||||||
contentServicesPage.uploadFolder(folder.location);
|
|
||||||
|
|
||||||
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('full permissions', () => {
|
describe('full permissions', () => {
|
||||||
@@ -205,40 +148,12 @@ describe('Upload - User permission', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C260130] Should be allowed to Drag and drop a file/folder in a folder with manager permissions', () => {
|
|
||||||
contentServicesPage.checkDragAndDropDIsDisplayed();
|
|
||||||
|
|
||||||
contentServicesPage.dragAndDropFile(emptyFile.location);
|
|
||||||
contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
|
||||||
|
|
||||||
contentServicesPage.dragAndDropFolder(folder.location);
|
|
||||||
contentServicesPage.checkContentIsDisplayed(folder.name);
|
|
||||||
|
|
||||||
const fileInTheUploadedFolder = 'share_profile_pic.png';
|
|
||||||
|
|
||||||
uploadDialog.fileIsUploaded(emptyFile.name);
|
|
||||||
uploadDialog.fileIsUploaded(fileInTheUploadedFolder);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C279917] Should be allowed to upload a file in a folder with manager permissions', () => {
|
it('[C279917] Should be allowed to upload a file in a folder with manager permissions', () => {
|
||||||
contentServicesPage.uploadFile(emptyFile.location);
|
contentServicesPage.uploadFile(emptyFile.location);
|
||||||
|
|
||||||
uploadDialog.fileIsUploaded(emptyFile.name);
|
uploadDialog.fileIsUploaded(emptyFile.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C279918] Should be allowed to upload a folder in a folder with manager permissions', () => {
|
|
||||||
uploadToggles.enableFolderUpload();
|
|
||||||
uploadToggles.checkFolderUploadToggleIsEnabled();
|
|
||||||
|
|
||||||
contentServicesPage.uploadFolder(folder.location);
|
|
||||||
uploadDialog.checkUploadCompleted().then(() => {
|
|
||||||
contentServicesPage.checkContentIsDisplayed(folder.name);
|
|
||||||
});
|
|
||||||
|
|
||||||
const fileInTheUploadedFolder = 'share_profile_pic.png';
|
|
||||||
|
|
||||||
uploadDialog.fileIsUploaded(fileInTheUploadedFolder);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('multiple users', () => {
|
describe('multiple users', () => {
|
||||||
|
@@ -49,28 +49,6 @@ describe('Settings component', () => {
|
|||||||
loginPage.waitForElements();
|
loginPage.waitForElements();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C291946] Should not save BPM Settings changes when User clicks Back button', () => {
|
|
||||||
settingsPage.setProvider(settingsPage.getBpmOption(), 'BPM');
|
|
||||||
settingsPage.setProcessServicesURL('http://myenvUrl.co.uk');
|
|
||||||
settingsPage.clickBackButton();
|
|
||||||
loginPage.waitForElements();
|
|
||||||
settingsPage.goToSettingsPage();
|
|
||||||
expect(settingsPage.getSelectedOptionText()).not.toEqual('BPM', 'The Settings changes are saved');
|
|
||||||
expect(settingsPage.getBpmHostUrl()).not.toEqual('http://myenvUrl.co.uk', 'The Settings changes are saved');
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('[C291947] Should not save ECM Settings changes when User clicks Back button', () => {
|
|
||||||
settingsPage.setProvider(settingsPage.getEcmOption(), 'ECM');
|
|
||||||
settingsPage.setContentServicesURL('http://myenvUrl.co.uk');
|
|
||||||
settingsPage.clickBackButton();
|
|
||||||
loginPage.waitForElements();
|
|
||||||
settingsPage.goToSettingsPage();
|
|
||||||
expect(settingsPage.getSelectedOptionText()).not.toEqual('ECM', 'The Settings changes are saved');
|
|
||||||
expect(settingsPage.getBpmHostUrl()).not.toEqual('http://myenvUrl.co.uk', 'The Settings changes are saved');
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C291948] Should save ALL Settings changes when User clicks Apply button', () => {
|
it('[C291948] Should save ALL Settings changes when User clicks Apply button', () => {
|
||||||
loginPage.goToLoginPage();
|
loginPage.goToLoginPage();
|
||||||
loginPage.clickSettingsIcon();
|
loginPage.clickSettingsIcon();
|
||||||
|
@@ -69,7 +69,7 @@ describe('User Info component', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C260111] Should display UserInfo when Process Services and Content Services are enabled', async () => {
|
it('[C260111] Should display UserInfo when Process Services and Content Services are enabled', async () => {
|
||||||
await loginPage.loginToAllUsingUserModel(contentUserModel);
|
await loginPage.loginToAllUsingUserModel(contentUserModel);
|
||||||
|
|
||||||
userInfoPage.clickUserProfile();
|
userInfoPage.clickUserProfile();
|
||||||
|
@@ -444,58 +444,6 @@ describe('Start Task - Custom App', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// failing due to ADF-3667, blocked by ACTIVITI-1975
|
|
||||||
xit('[C286599] Should be able to sort tasks ascending by due date when choosing due(asc) from sort drop down', () => {
|
|
||||||
const sortAscByDueDate = [taskWithDueDate.name, completedTasks[0].name, completedTasks[1].name, completedTasks[2].name];
|
|
||||||
|
|
||||||
navigationBarPage.clickTaskListButton();
|
|
||||||
taskListSinglePage.clickResetButton();
|
|
||||||
|
|
||||||
taskListSinglePage.typeDueAfter(beforeDate);
|
|
||||||
taskListSinglePage.selectState('All');
|
|
||||||
taskListSinglePage.selectSort('Due (asc)');
|
|
||||||
|
|
||||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
|
||||||
expect(Util.arrayContainsArray(list, sortAscByDueDate)).toEqual(true);
|
|
||||||
});
|
|
||||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(4);
|
|
||||||
|
|
||||||
taskListSinglePage.clickResetButton();
|
|
||||||
taskListSinglePage.selectState('All');
|
|
||||||
taskListSinglePage.selectSort('Due (asc)');
|
|
||||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(23);
|
|
||||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
|
||||||
expect(Util.arrayContainsArray(list.slice(0, 4), sortAscByDueDate)).toEqual(true);
|
|
||||||
expect(Util.arrayContainsArray(list.slice(4, list.length), allTasksName)).toEqual(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// failing due to ADF-3667, blocked by ACTIVITI-1975
|
|
||||||
xit('[C286600] Should be able to sort tasks descending by due date when choosing due(desc) from sort drop down', () => {
|
|
||||||
const sortDescByDueDate = [completedTasks[2].name, completedTasks[1].name, completedTasks[0].name, taskWithDueDate.name];
|
|
||||||
|
|
||||||
navigationBarPage.clickTaskListButton();
|
|
||||||
taskListSinglePage.clickResetButton();
|
|
||||||
|
|
||||||
taskListSinglePage.typeDueAfter(beforeDate);
|
|
||||||
taskListSinglePage.selectState('All');
|
|
||||||
taskListSinglePage.selectSort('Due (desc)');
|
|
||||||
|
|
||||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
|
||||||
expect(Util.arrayContainsArray(list, sortDescByDueDate)).toEqual(true);
|
|
||||||
});
|
|
||||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(4);
|
|
||||||
|
|
||||||
taskListSinglePage.clickResetButton();
|
|
||||||
taskListSinglePage.selectState('All');
|
|
||||||
taskListSinglePage.selectSort('Due (asc)');
|
|
||||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(23);
|
|
||||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
|
||||||
expect(Util.arrayContainsArray(list.slice(0, 4), sortDescByDueDate)).toEqual(true);
|
|
||||||
expect(Util.arrayContainsArray(list.slice(4, list.length), allTasksName)).toEqual(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C286622] Should be able to see only tasks that are part of a specific process when processDefinitionId is set', () => {
|
it('[C286622] Should be able to see only tasks that are part of a specific process when processDefinitionId is set', () => {
|
||||||
const processDefinitionIds = [processDefinitionId.processDefinitionId, processDefinitionId.processDefinitionId,
|
const processDefinitionIds = [processDefinitionId.processDefinitionId, processDefinitionId.processDefinitionId,
|
||||||
processDefinitionId.processDefinitionId, processDefinitionId.processDefinitionId];
|
processDefinitionId.processDefinitionId, processDefinitionId.processDefinitionId];
|
||||||
|
@@ -282,13 +282,4 @@ describe('Start Task - Custom App', () => {
|
|||||||
taskPage.taskDetails().taskInfoDrawerIsDisplayed();
|
taskPage.taskDetails().taskInfoDrawerIsDisplayed();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C263950] Should be able to see Spinner loading on task list when clicking on Tasks on custom app', () => {
|
|
||||||
navigationBarPage.navigateToProcessServicesPage().goToApp(appModel.name).clickTasksButton();
|
|
||||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
|
||||||
taskPage.createNewTask().addName(tasks[7]).clickStartButton();
|
|
||||||
|
|
||||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp();
|
|
||||||
taskPage.tasksListPage().getDataTable().checkSpinnerIsDisplayed();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -172,10 +172,6 @@ describe('Start Task - Task App', () => {
|
|||||||
taskPage.taskDetails().taskInfoDrawerIsDisplayed();
|
taskPage.taskDetails().taskInfoDrawerIsDisplayed();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C260424] Should be able to see Spinner loading on task list when clicking on Tasks', () => {
|
|
||||||
taskPage.tasksListPage().getDataTable().checkSpinnerIsDisplayed();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C291780] Should be displayed an error message if task name exceed 255 characters', () => {
|
it('[C291780] Should be displayed an error message if task name exceed 255 characters', () => {
|
||||||
const startDialog = taskPage.createNewTask().addName(taskName255Characters).checkStartButtonIsEnabled();
|
const startDialog = taskPage.createNewTask().addName(taskName255Characters).checkStartButtonIsEnabled();
|
||||||
startDialog.addName(taskNameBiggerThen255Characters)
|
startDialog.addName(taskNameBiggerThen255Characters)
|
||||||
|
@@ -25,7 +25,6 @@ import { SearchResultsPage } from '../pages/adf/searchResultsPage';
|
|||||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||||
import { FileModel } from '../models/ACS/fileModel';
|
import { FileModel } from '../models/ACS/fileModel';
|
||||||
import { FolderModel } from '../models/ACS/folderModel';
|
import { FolderModel } from '../models/ACS/folderModel';
|
||||||
import { Util } from '../util/util';
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||||
import { SearchConfiguration } from './search.config';
|
import { SearchConfiguration } from './search.config';
|
||||||
@@ -269,22 +268,6 @@ describe('Search component - Search Bar', () => {
|
|||||||
expect(contentServicesPage.currentFolderName()).toEqual(secondFolder.name);
|
expect(contentServicesPage.currentFolderName()).toEqual(secondFolder.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C260254] Search bar should get closed when changing browser tab', () => {
|
|
||||||
searchDialog
|
|
||||||
.checkSearchIconIsVisible()
|
|
||||||
.clickOnSearchIcon()
|
|
||||||
.checkSearchBarIsVisible()
|
|
||||||
.enterText(secondFolder.shortName);
|
|
||||||
|
|
||||||
searchDialog.resultTableContainsRow(secondFolder.name);
|
|
||||||
|
|
||||||
Util.openNewTabInBrowser();
|
|
||||||
Util.switchToWindowHandler(0);
|
|
||||||
|
|
||||||
browser.sleep(500);
|
|
||||||
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C290137] Should be able to search by \'%\'', () => {
|
it('[C290137] Should be able to search by \'%\'', () => {
|
||||||
searchDialog
|
searchDialog
|
||||||
.clickOnSearchIcon()
|
.clickOnSearchIcon()
|
||||||
|
@@ -108,31 +108,6 @@ describe('DropdownBreadcrumb', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should display the path in reverse order', (done) => {
|
|
||||||
const fakeNodeWithCreatePermissionInstance = JSON.parse(JSON.stringify(fakeNodeWithCreatePermission));
|
|
||||||
fakeNodeWithCreatePermissionInstance.path.elements = [
|
|
||||||
{ id: '1', name: 'Stark Industries' },
|
|
||||||
{ id: '2', name: 'User Homes' },
|
|
||||||
{ id: '3', name: 'J.A.R.V.I.S' }
|
|
||||||
];
|
|
||||||
|
|
||||||
triggerComponentChange(fakeNodeWithCreatePermissionInstance);
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
|
|
||||||
openSelect();
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
const options = fixture.debugElement.queryAll(By.css('[data-automation-class="dropdown-breadcrumb-path-option"]'));
|
|
||||||
expect(options.length).toBe(3);
|
|
||||||
expect(options[0].nativeElement.innerText.trim()).toBe('J.A.R.V.I.S');
|
|
||||||
expect(options[1].nativeElement.innerText.trim()).toBe('User Homes');
|
|
||||||
expect(options[2].nativeElement.innerText.trim()).toBe('Stark Industries');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should emit navigation event when clicking on an option', (done) => {
|
it('should emit navigation event when clicking on an option', (done) => {
|
||||||
const fakeNodeWithCreatePermissionInstance = JSON.parse(JSON.stringify(fakeNodeWithCreatePermission));
|
const fakeNodeWithCreatePermissionInstance = JSON.parse(JSON.stringify(fakeNodeWithCreatePermission));
|
||||||
fakeNodeWithCreatePermissionInstance.path.elements = [{ id: '1', name: 'Stark Industries' }];
|
fakeNodeWithCreatePermissionInstance.path.elements = [{ id: '1', name: 'Stark Industries' }];
|
||||||
|
@@ -40,7 +40,6 @@ class TestComponent {
|
|||||||
describe('FolderEditDirective', () => {
|
describe('FolderEditDirective', () => {
|
||||||
let fixture: ComponentFixture<TestComponent>;
|
let fixture: ComponentFixture<TestComponent>;
|
||||||
let element;
|
let element;
|
||||||
let node: any;
|
|
||||||
let dialog: MatDialog;
|
let dialog: MatDialog;
|
||||||
let contentService: ContentService;
|
let contentService: ContentService;
|
||||||
let dialogRefMock;
|
let dialogRefMock;
|
||||||
@@ -68,8 +67,6 @@ describe('FolderEditDirective', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
node = { entry: { id: 'folderId' } };
|
|
||||||
|
|
||||||
dialogRefMock = {
|
dialogRefMock = {
|
||||||
afterClosed: (val) => of(val),
|
afterClosed: (val) => of(val),
|
||||||
componentInstance: {
|
componentInstance: {
|
||||||
@@ -81,18 +78,6 @@ describe('FolderEditDirective', () => {
|
|||||||
spyOn(dialog, 'open').and.returnValue(dialogRefMock);
|
spyOn(dialog, 'open').and.returnValue(dialogRefMock);
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should emit folderEdit event when input value is not undefined', (done) => {
|
|
||||||
spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(node));
|
|
||||||
|
|
||||||
contentService.folderEdit.subscribe((val) => {
|
|
||||||
expect(val).toBe(node);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
element.triggerEventHandler('click', event);
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not emit folderEdit event when input value is undefined', () => {
|
it('should not emit folderEdit event when input value is undefined', () => {
|
||||||
spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(null));
|
spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(null));
|
||||||
spyOn(contentService.folderEdit, 'next');
|
spyOn(contentService.folderEdit, 'next');
|
||||||
|
@@ -227,23 +227,6 @@ describe('SearchControlComponent', () => {
|
|||||||
expect(element.querySelector('#adf-control-input').getAttribute('autocomplete')).toBe('on');
|
expect(element.querySelector('#adf-control-input').getAttribute('autocomplete')).toBe('on');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
xit('should fire a search when a enter key is pressed', (done) => {
|
|
||||||
const searchDisposable = component.submit.subscribe((value) => {
|
|
||||||
expect(value).toBe('TEST');
|
|
||||||
searchDisposable.unsubscribe();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
spyOn(component, 'isSearchBarActive').and.returnValue(true);
|
|
||||||
searchServiceSpy.and.returnValue(of(JSON.parse(JSON.stringify(results))));
|
|
||||||
|
|
||||||
fixture.detectChanges();
|
|
||||||
const inputDebugElement = debugElement.query(By.css('#adf-control-input'));
|
|
||||||
typeWordIntoSearchInput('TEST');
|
|
||||||
const enterKeyEvent: any = new Event('keyup');
|
|
||||||
enterKeyEvent.keyCode = '13';
|
|
||||||
inputDebugElement.nativeElement.dispatchEvent(enterKeyEvent);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('autocomplete list', () => {
|
describe('autocomplete list', () => {
|
||||||
@@ -408,67 +391,6 @@ describe('SearchControlComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should select the first item on autocomplete list when ARROW DOWN is pressed on input', (done) => {
|
|
||||||
searchServiceSpy.and.returnValue(of(JSON.parse(JSON.stringify(results))));
|
|
||||||
fixture.detectChanges();
|
|
||||||
typeWordIntoSearchInput('TEST');
|
|
||||||
const inputDebugElement = debugElement.query(By.css('#adf-control-input'));
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(element.querySelector('#autocomplete-search-result-list')).not.toBeNull();
|
|
||||||
|
|
||||||
inputDebugElement.triggerEventHandler('keyup.arrowdown', {});
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(document.activeElement.id).toBe('result_option_0');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('should select the second item on autocomplete list when ARROW DOWN is pressed on list', (done) => {
|
|
||||||
searchServiceSpy.and.returnValue(of(JSON.parse(JSON.stringify(results))));
|
|
||||||
fixture.detectChanges();
|
|
||||||
const inputDebugElement = debugElement.query(By.css('#adf-control-input'));
|
|
||||||
typeWordIntoSearchInput('TEST');
|
|
||||||
fixture.detectChanges();
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(element.querySelector('#autocomplete-search-result-list')).not.toBeNull();
|
|
||||||
|
|
||||||
inputDebugElement.triggerEventHandler('keyup.arrowdown', {});
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(document.activeElement.id).toBe('result_option_0');
|
|
||||||
|
|
||||||
const firstElement = debugElement.query(By.css('#result_option_0'));
|
|
||||||
firstElement.triggerEventHandler('keyup.arrowdown', { target: firstElement.nativeElement });
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(document.activeElement.id).toBe('result_option_1');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('should focus the input search when ARROW UP is pressed on the first list item', (done) => {
|
|
||||||
searchServiceSpy.and.returnValue(of(JSON.parse(JSON.stringify(results))));
|
|
||||||
fixture.detectChanges();
|
|
||||||
const inputDebugElement = debugElement.query(By.css('#adf-control-input'));
|
|
||||||
typeWordIntoSearchInput('TEST');
|
|
||||||
fixture.detectChanges();
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(element.querySelector('#autocomplete-search-result-list')).not.toBeNull();
|
|
||||||
|
|
||||||
inputDebugElement.triggerEventHandler('keyup.arrowdown', {});
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(document.activeElement.id).toBe('result_option_0');
|
|
||||||
|
|
||||||
const firstElement = debugElement.query(By.css('#result_option_0'));
|
|
||||||
firstElement.triggerEventHandler('keyup.arrowup', { target: firstElement.nativeElement });
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(document.activeElement.id).toBe('adf-control-input');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('search button', () => {
|
describe('search button', () => {
|
||||||
@@ -515,24 +437,6 @@ describe('SearchControlComponent', () => {
|
|||||||
discardPeriodicTasks();
|
discardPeriodicTasks();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
xit('click on the search button should apply focus on input', fakeAsync(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
tick(100);
|
|
||||||
|
|
||||||
const searchButton: DebugElement = debugElement.query(By.css('#adf-search-button'));
|
|
||||||
searchButton.triggerEventHandler('click', null);
|
|
||||||
|
|
||||||
const inputDebugElement = debugElement.query(By.css('#adf-control-input'));
|
|
||||||
|
|
||||||
tick(100);
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
tick(100);
|
|
||||||
|
|
||||||
expect(document.activeElement.id).toBe(inputDebugElement.nativeElement.id);
|
|
||||||
discardPeriodicTasks();
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('Search button should not change the input state too often', fakeAsync(() => {
|
it('Search button should not change the input state too often', fakeAsync(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@@ -17,11 +17,7 @@
|
|||||||
|
|
||||||
import { SearchDateRangeComponent } from './search-date-range.component';
|
import { SearchDateRangeComponent } from './search-date-range.component';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { MomentDateAdapter } from '@alfresco/adf-core';
|
||||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
|
||||||
import { setupTestBed, MomentDateAdapter } from '@alfresco/adf-core';
|
|
||||||
import { By } from '@angular/platform-browser';
|
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
|
||||||
|
|
||||||
declare let moment: any;
|
declare let moment: any;
|
||||||
|
|
||||||
@@ -156,48 +152,4 @@ describe('SearchDateRangeComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('component DOM', () => {
|
|
||||||
let component: SearchDateRangeComponent;
|
|
||||||
let fixture: ComponentFixture<SearchDateRangeComponent>;
|
|
||||||
let translateService: TranslateService;
|
|
||||||
let translationSpy: jasmine.Spy;
|
|
||||||
const dateFormatFixture = 'DD MMM YYYY';
|
|
||||||
|
|
||||||
setupTestBed({
|
|
||||||
imports: [ContentTestingModule]
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(SearchDateRangeComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
|
|
||||||
translateService = TestBed.get(TranslateService);
|
|
||||||
translationSpy = spyOn(translateService, 'get').and.callFake((key) => {
|
|
||||||
return of(key);
|
|
||||||
});
|
|
||||||
|
|
||||||
component.settings = { 'dateFormat': dateFormatFixture, field: 'cm:created' };
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
fixture.destroy();
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('should display the required format when input date is invalid', () => {
|
|
||||||
const inputEl = fixture.debugElement.query(By.css('input')).nativeElement;
|
|
||||||
|
|
||||||
inputEl.value = 'invalid-date';
|
|
||||||
inputEl.dispatchEvent(new Event('input'));
|
|
||||||
fixture.detectChanges();
|
|
||||||
inputEl.dispatchEvent(new Event('blur'));
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
expect(translationSpy.calls.mostRecent().args)
|
|
||||||
.toEqual(['SEARCH.FILTER.VALIDATION.INVALID-DATE', { requiredFormat: dateFormatFixture }]);
|
|
||||||
|
|
||||||
inputEl.value = '';
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -234,33 +234,6 @@ describe('SearchQueryBuilder', () => {
|
|||||||
expect(field.field).toBe('content.size');
|
expect(field.field).toBe('content.size');
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should build query and raise an event on update', async () => {
|
|
||||||
const builder = new SearchQueryBuilderService(buildConfig({}), null);
|
|
||||||
const query = {};
|
|
||||||
spyOn(builder, 'buildQuery').and.returnValue(query);
|
|
||||||
|
|
||||||
let eventArgs;
|
|
||||||
builder.updated.subscribe((args) => eventArgs = args);
|
|
||||||
|
|
||||||
await builder.execute();
|
|
||||||
expect(eventArgs).toBe(query);
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('should build query and raise an event on execute', async () => {
|
|
||||||
const data = {};
|
|
||||||
const api = jasmine.createSpyObj('api', ['search']);
|
|
||||||
api.search.and.returnValue(data);
|
|
||||||
|
|
||||||
const builder = new SearchQueryBuilderService(buildConfig({}), api);
|
|
||||||
spyOn(builder, 'buildQuery').and.returnValue({});
|
|
||||||
|
|
||||||
let eventArgs;
|
|
||||||
builder.executed.subscribe((args) => eventArgs = args);
|
|
||||||
|
|
||||||
await builder.execute();
|
|
||||||
expect(eventArgs).toBe(data);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should require a query fragment to build query', () => {
|
it('should require a query fragment to build query', () => {
|
||||||
const config: SearchConfiguration = {
|
const config: SearchConfiguration = {
|
||||||
categories: [
|
categories: [
|
||||||
|
@@ -131,24 +131,6 @@ describe('WebscriptComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('HTML response should be displayed', (done) => {
|
|
||||||
component.scriptPath = 'sample/folder/Company%20Home';
|
|
||||||
component.contentType = 'HTML';
|
|
||||||
|
|
||||||
component.ngOnChanges(null).then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(element.querySelector('#webscript-data-HTML').innerHTML)
|
|
||||||
.toBe('<test-element-id><test-elemt-id>');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
status: 200,
|
|
||||||
contentType: 'text/html',
|
|
||||||
responseText: '<test-element-id><test-elemt-id>'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('datatable response should be displayed', (done) => {
|
it('datatable response should be displayed', (done) => {
|
||||||
// reset MDL handler
|
// reset MDL handler
|
||||||
window['componentHandler'] = null;
|
window['componentHandler'] = null;
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { CardViewSelectItemModel } from '../../models/card-view-selectitem.model';
|
import { CardViewSelectItemModel } from '../../models/card-view-selectitem.model';
|
||||||
import { CardViewUpdateService } from '../../services/card-view-update.service';
|
|
||||||
import { CardViewSelectItemComponent } from './card-view-selectitem.component';
|
import { CardViewSelectItemComponent } from './card-view-selectitem.component';
|
||||||
import { setupTestBed } from '../../../testing/setupTestBed';
|
import { setupTestBed } from '../../../testing/setupTestBed';
|
||||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||||
@@ -28,7 +27,6 @@ describe('CardViewSelectItemComponent', () => {
|
|||||||
|
|
||||||
let fixture: ComponentFixture<CardViewSelectItemComponent>;
|
let fixture: ComponentFixture<CardViewSelectItemComponent>;
|
||||||
let component: CardViewSelectItemComponent;
|
let component: CardViewSelectItemComponent;
|
||||||
let cardViewUpdateService;
|
|
||||||
const mockData = [{ key: 'one', label: 'One' }, { key: 'two', label: 'Two' }, { key: 'three', label: 'Three' }];
|
const mockData = [{ key: 'one', label: 'One' }, { key: 'two', label: 'Two' }, { key: 'three', label: 'Three' }];
|
||||||
const mockDefaultProps = {
|
const mockDefaultProps = {
|
||||||
label: 'Select box label',
|
label: 'Select box label',
|
||||||
@@ -44,7 +42,6 @@ describe('CardViewSelectItemComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(CardViewSelectItemComponent);
|
fixture = TestBed.createComponent(CardViewSelectItemComponent);
|
||||||
cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
component.property = new CardViewSelectItemModel(mockDefaultProps);
|
component.property = new CardViewSelectItemModel(mockDefaultProps);
|
||||||
});
|
});
|
||||||
@@ -96,27 +93,5 @@ describe('CardViewSelectItemComponent', () => {
|
|||||||
expect(label).toBeNull();
|
expect(label).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should update property on input blur', async(() => {
|
|
||||||
spyOn(cardViewUpdateService, 'update');
|
|
||||||
|
|
||||||
component.ngOnChanges();
|
|
||||||
component.editable = true;
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
const selectBox = fixture.debugElement.query(By.css('[data-automation-class="select-box"]'));
|
|
||||||
selectBox.nativeElement.click();
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
const option = fixture.debugElement.query(By.css(`mat-option[ng-reflect-value="${mockData[2].key}"]`));
|
|
||||||
option.nativeElement.click();
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
expect(cardViewUpdateService.update).toHaveBeenCalled();
|
|
||||||
expect(component.property.value).toBe(mockData[2].key);
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -124,29 +124,6 @@ describe('DateTimeWidgetComponent', () => {
|
|||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
xit('should check correctly the min value with different formats', async(() => {
|
|
||||||
widget.field = new FormFieldModel(new FormModel(), {
|
|
||||||
id: 'date-field-id',
|
|
||||||
name: 'date-name',
|
|
||||||
value: '11-29-9999 10:30 AM',
|
|
||||||
dateDisplayFormat: 'MM-DD-YYYY HH:mm A',
|
|
||||||
type: 'datetime',
|
|
||||||
readOnly: 'false',
|
|
||||||
minValue: '9999-11-30T10:30Z'
|
|
||||||
});
|
|
||||||
fixture.detectChanges();
|
|
||||||
widget.field.validate();
|
|
||||||
fixture.detectChanges();
|
|
||||||
fixture.whenStable()
|
|
||||||
.then(() => {
|
|
||||||
expect(element.querySelector('#date-field-id')).toBeDefined();
|
|
||||||
expect(element.querySelector('#date-field-id')).not.toBeNull();
|
|
||||||
const dateElement: any = element.querySelector('#date-field-id');
|
|
||||||
expect(dateElement.value).toContain('11-29-9999 10:30 AM');
|
|
||||||
expect(element.querySelector('.adf-error-text').textContent).toBe('FORM.FIELD.VALIDATOR.NOT_LESS_THAN');
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should show the correct format type', async(() => {
|
it('should show the correct format type', async(() => {
|
||||||
widget.field = new FormFieldModel(new FormModel(), {
|
widget.field = new FormFieldModel(new FormModel(), {
|
||||||
id: 'date-field-id',
|
id: 'date-field-id',
|
||||||
|
@@ -124,29 +124,6 @@ describe('DateWidgetComponent', () => {
|
|||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
xit('should check correctly the min value with different formats', async(() => {
|
|
||||||
widget.field = new FormFieldModel(new FormModel(), {
|
|
||||||
id: 'date-field-id',
|
|
||||||
name: 'date-name',
|
|
||||||
value: '11-30-9999',
|
|
||||||
type: 'date',
|
|
||||||
readOnly: 'false',
|
|
||||||
dateDisplayFormat : 'MM-DD-YYYY',
|
|
||||||
minValue : '30-12-9999'
|
|
||||||
});
|
|
||||||
fixture.detectChanges();
|
|
||||||
widget.field.validate();
|
|
||||||
fixture.whenStable()
|
|
||||||
.then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(element.querySelector('#date-field-id')).toBeDefined();
|
|
||||||
expect(element.querySelector('#date-field-id')).not.toBeNull();
|
|
||||||
const dateElement: any = element.querySelector('#date-field-id');
|
|
||||||
expect(dateElement.value).toContain('11-30-9999');
|
|
||||||
expect(element.querySelector('.adf-error-text').textContent).toBe('FORM.FIELD.VALIDATOR.NOT_LESS_THAN');
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should show the correct format type', async(() => {
|
it('should show the correct format type', async(() => {
|
||||||
widget.field = new FormFieldModel(new FormModel(), {
|
widget.field = new FormFieldModel(new FormModel(), {
|
||||||
id: 'date-field-id',
|
id: 'date-field-id',
|
||||||
|
@@ -488,15 +488,6 @@ describe('WidgetVisibilityCloudService', () => {
|
|||||||
expect(isVisible).toBeTruthy();
|
expect(isVisible).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should return empty string for a value that is not on variable or form', () => {
|
|
||||||
visibilityObjTest.leftType = WidgetTypeEnum.field;
|
|
||||||
visibilityObjTest.leftValue = 'NO_FIELD_FORM';
|
|
||||||
const rightValue = service.getRightValue(fakeFormWithField, visibilityObjTest);
|
|
||||||
|
|
||||||
expect(rightValue).not.toBeUndefined();
|
|
||||||
expect(rightValue).toBe('');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should evaluate the visibility for the field with single visibility condition between form values', () => {
|
it('should evaluate the visibility for the field with single visibility condition between form values', () => {
|
||||||
visibilityObjTest.leftType = 'LEFT_FORM_FIELD_ID';
|
visibilityObjTest.leftType = 'LEFT_FORM_FIELD_ID';
|
||||||
visibilityObjTest.operator = '!=';
|
visibilityObjTest.operator = '!=';
|
||||||
@@ -559,14 +550,6 @@ describe('WidgetVisibilityCloudService', () => {
|
|||||||
expect(leftValue).toBe('form_value_test');
|
expect(leftValue).toBe('form_value_test');
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should determine visibility for dropdown on label condition', () => {
|
|
||||||
const dropdownValue = service.getFieldValue(formTest.values, 'Dropdown');
|
|
||||||
|
|
||||||
expect(dropdownValue).not.toBeNull();
|
|
||||||
expect(dropdownValue).toBeDefined();
|
|
||||||
expect(dropdownValue).toBe('Dropdown');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be able to get the value for a standard field', () => {
|
it('should be able to get the value for a standard field', () => {
|
||||||
const dropdownValue = service.getFieldValue(formTest.values, 'test_2');
|
const dropdownValue = service.getFieldValue(formTest.values, 'test_2');
|
||||||
|
|
||||||
@@ -575,14 +558,6 @@ describe('WidgetVisibilityCloudService', () => {
|
|||||||
expect(dropdownValue).toBe('value_2');
|
expect(dropdownValue).toBe('value_2');
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should get the dropdown label value from a form', () => {
|
|
||||||
const dropdownValue = service.getFormValue(formTest, 'Dropdown');
|
|
||||||
|
|
||||||
expect(dropdownValue).not.toBeNull();
|
|
||||||
expect(dropdownValue).toBeDefined();
|
|
||||||
expect(dropdownValue).toBe('Dropdown');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should get the dropdown id value from a form', () => {
|
it('should get the dropdown id value from a form', () => {
|
||||||
const dropdownValue = service.getFormValue(formTest, 'dropdown');
|
const dropdownValue = service.getFormValue(formTest, 'dropdown');
|
||||||
|
|
||||||
@@ -600,26 +575,6 @@ describe('WidgetVisibilityCloudService', () => {
|
|||||||
expect(rightValue).toBe('dropdown_id');
|
expect(rightValue).toBe('dropdown_id');
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should retrieve the value for the right field when it is a dropdown label', () => {
|
|
||||||
visibilityObjTest.rightType = 'field';
|
|
||||||
visibilityObjTest.rightValue = 'Dropdown';
|
|
||||||
const rightValue = service.getRightValue(formTest, visibilityObjTest);
|
|
||||||
|
|
||||||
expect(rightValue).toBeDefined();
|
|
||||||
expect(rightValue).toBe('Dropdown');
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('should be able to evaluate condition with a dropdown <label>', () => {
|
|
||||||
visibilityObjTest.leftType = 'field';
|
|
||||||
visibilityObjTest.leftValue = 'test_5';
|
|
||||||
visibilityObjTest.operator = '==';
|
|
||||||
visibilityObjTest.rightValue = 'Dropdown';
|
|
||||||
const fakeFormField: FormFieldModel = new FormFieldModel(formTest, jsonFieldFake);
|
|
||||||
service.refreshEntityVisibility(fakeFormField);
|
|
||||||
|
|
||||||
expect(fakeFormField.isVisible).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be able to evaluate condition with a dropdown <id>', () => {
|
it('should be able to evaluate condition with a dropdown <id>', () => {
|
||||||
visibilityObjTest.rightType = 'field';
|
visibilityObjTest.rightType = 'field';
|
||||||
visibilityObjTest.leftType = 'field';
|
visibilityObjTest.leftType = 'field';
|
||||||
|
@@ -21,8 +21,6 @@ import { TranslationService } from './translation.service';
|
|||||||
import { setupTestBed } from '../testing/setupTestBed';
|
import { setupTestBed } from '../testing/setupTestBed';
|
||||||
import { CoreModule } from '../core.module';
|
import { CoreModule } from '../core.module';
|
||||||
|
|
||||||
const componentJson1 = ' {"TEST": "This is a test", "TEST2": "This is another test"} ' ;
|
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
describe('TranslateLoader', () => {
|
describe('TranslateLoader', () => {
|
||||||
@@ -57,20 +55,4 @@ describe('TranslateLoader', () => {
|
|||||||
expect(customLoader.providerRegistered('login')).toBeTruthy();
|
expect(customLoader.providerRegistered('login')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should return the Json translation ', () => {
|
|
||||||
customLoader.registerProvider('login', 'path/login');
|
|
||||||
customLoader.getTranslation('en').subscribe(
|
|
||||||
(response) => {
|
|
||||||
expect(response).toBeDefined();
|
|
||||||
expect(response).toEqual(JSON.parse(componentJson1));
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
'status': 200,
|
|
||||||
contentType: 'application/json',
|
|
||||||
responseText: componentJson1
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -1,85 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { SimpleChange } from '@angular/core';
|
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
import { MediaPlayerComponent } from './mediaPlayer.component';
|
|
||||||
import { setupTestBed } from '../../testing/setupTestBed';
|
|
||||||
import { CoreModule } from '../../core.module';
|
|
||||||
import { ContentService } from '../../services/content.service';
|
|
||||||
|
|
||||||
xdescribe('Test Media player component ', () => {
|
|
||||||
|
|
||||||
let component: MediaPlayerComponent;
|
|
||||||
let service: ContentService;
|
|
||||||
let fixture: ComponentFixture<MediaPlayerComponent>;
|
|
||||||
|
|
||||||
function createFakeBlob() {
|
|
||||||
const data = atob('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==');
|
|
||||||
return new Blob([data], {type: 'image/png'});
|
|
||||||
}
|
|
||||||
|
|
||||||
setupTestBed({
|
|
||||||
imports: [CoreModule.forRoot()]
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
service = TestBed.get(ContentService);
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(MediaPlayerComponent);
|
|
||||||
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
fixture.destroy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should thrown an error If no url or no blob are passed', () => {
|
|
||||||
expect(() => {
|
|
||||||
component.ngOnChanges({});
|
|
||||||
}).toThrow(new Error('Attribute urlFile or blobFile is required'));
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not thrown an error If url is passed', () => {
|
|
||||||
component.urlFile = 'fake-url';
|
|
||||||
expect(() => {
|
|
||||||
component.ngOnChanges(null);
|
|
||||||
}).not.toThrow(new Error('Attribute urlFile or blobFile is required'));
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not thrown an error If url is passed', () => {
|
|
||||||
component.urlFile = 'fake-url';
|
|
||||||
expect(() => {
|
|
||||||
component.ngOnChanges(null);
|
|
||||||
}).not.toThrow(new Error('Attribute urlFile or blobFile is required'));
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not thrown an error If blob is passed', () => {
|
|
||||||
const blob = createFakeBlob();
|
|
||||||
|
|
||||||
spyOn(service, 'createTrustedUrl').and.returnValue('fake-blob-url');
|
|
||||||
const change = new SimpleChange(null, blob, true);
|
|
||||||
expect(() => {
|
|
||||||
component.ngOnChanges({ 'blobFile': change });
|
|
||||||
}).not.toThrow(new Error('Attribute urlFile or blobFile is required'));
|
|
||||||
expect(component.urlFile).toEqual('fake-blob-url');
|
|
||||||
});
|
|
||||||
});
|
|
@@ -204,30 +204,6 @@ describe('ViewerComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should extension file mp3 be loaded', (done) => {
|
|
||||||
component.urlFile = 'fake-url-file.mp3';
|
|
||||||
component.ngOnChanges(null);
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(element.querySelector('adf-media-player')).not.toBeNull();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('should extension file wav be loaded', (done) => {
|
|
||||||
component.urlFile = 'fake-url-file.wav';
|
|
||||||
component.ngOnChanges(null);
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(element.querySelector('adf-media-player')).not.toBeNull();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should extension file txt be loaded', (done) => {
|
it('should extension file txt be loaded', (done) => {
|
||||||
component.urlFile = 'fake-test-file.txt';
|
component.urlFile = 'fake-test-file.txt';
|
||||||
component.ngOnChanges(null);
|
component.ngOnChanges(null);
|
||||||
|
@@ -402,33 +402,6 @@ describe('AnalyticsReportParametersComponent', () => {
|
|||||||
|
|
||||||
describe('When the form is rendered correctly', () => {
|
describe('When the form is rendered correctly', () => {
|
||||||
|
|
||||||
const values: any = {
|
|
||||||
dateRange: {
|
|
||||||
startDate: '2016-09-01', endDate: '2016-10-05'
|
|
||||||
},
|
|
||||||
statusGroup: {
|
|
||||||
status: 'All'
|
|
||||||
},
|
|
||||||
processDefGroup: {
|
|
||||||
processDefinitionId: 'FakeProcess:1:22'
|
|
||||||
},
|
|
||||||
taskGroup: {
|
|
||||||
taskName: 'FakeTaskName'
|
|
||||||
},
|
|
||||||
durationGroup: {
|
|
||||||
duration: 22
|
|
||||||
},
|
|
||||||
dateIntervalGroup: {
|
|
||||||
dateRangeInterval: 120
|
|
||||||
},
|
|
||||||
processInstanceGroup: {
|
|
||||||
slowProcessInstanceInteger: 2
|
|
||||||
},
|
|
||||||
typeFilteringGroup: {
|
|
||||||
typeFiltering: true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
const reportId = 1;
|
const reportId = 1;
|
||||||
const change = new SimpleChange(null, reportId, true);
|
const change = new SimpleChange(null, reportId, true);
|
||||||
@@ -471,76 +444,6 @@ describe('AnalyticsReportParametersComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('Should show a dialog to allowing report save', async(() => {
|
|
||||||
component.saveReportSuccess.subscribe((repId) => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
expect(repId).toBe('1');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
component.submit(values);
|
|
||||||
fixture.detectChanges();
|
|
||||||
const saveButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#save-button');
|
|
||||||
expect(saveButton).toBeDefined();
|
|
||||||
expect(saveButton).not.toBeNull();
|
|
||||||
saveButton.click();
|
|
||||||
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
const reportDialogTitle: HTMLElement = <HTMLElement> window.document.querySelector('#report-dialog-title');
|
|
||||||
const saveTitleSubMessage: HTMLElement = <HTMLElement> window.document.querySelector('#save-title-submessage');
|
|
||||||
const inputSaveName: HTMLInputElement = <HTMLInputElement> window.document.querySelector('#repName');
|
|
||||||
const performActionButton: HTMLButtonElement = <HTMLButtonElement> window.document.querySelector('#action-dialog-button');
|
|
||||||
const todayDate = component.getTodayDate();
|
|
||||||
|
|
||||||
expect(reportDialogTitle).not.toBeNull('Dialog title should not be null');
|
|
||||||
expect(saveTitleSubMessage).not.toBeNull('Dialog save title submessage should not be null');
|
|
||||||
expect(inputSaveName.value.trim()).toEqual(analyticParamsMock.reportDefParamStatus.name + ' ( ' + todayDate + ' )');
|
|
||||||
expect(performActionButton).not.toBeNull('Dialog action button should not be null');
|
|
||||||
|
|
||||||
performActionButton.click();
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
status: 200,
|
|
||||||
contentType: 'json'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
||||||
xit('Should show a dialog to allowing report export', async(() => {
|
|
||||||
component.submit(values);
|
|
||||||
fixture.detectChanges();
|
|
||||||
const exportButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#export-button');
|
|
||||||
|
|
||||||
expect(exportButton).toBeDefined();
|
|
||||||
expect(exportButton).not.toBeNull();
|
|
||||||
exportButton.click();
|
|
||||||
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
const reportDialogTitle: HTMLElement = <HTMLElement> window.document.querySelector('#report-dialog-title');
|
|
||||||
const inputSaveName: HTMLInputElement = <HTMLInputElement> window.document.querySelector('#repName');
|
|
||||||
const performActionButton: HTMLButtonElement = <HTMLButtonElement> window.document.querySelector('#action-dialog-button');
|
|
||||||
const todayDate = component.getTodayDate();
|
|
||||||
|
|
||||||
expect(reportDialogTitle).not.toBeNull();
|
|
||||||
expect(inputSaveName.value.trim()).toEqual(analyticParamsMock.reportDefParamStatus.name + ' ( ' + todayDate + ' )');
|
|
||||||
expect(performActionButton).not.toBeNull();
|
|
||||||
|
|
||||||
performActionButton.click();
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
status: 200,
|
|
||||||
contentType: 'json'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should render adf-buttons-menu component', async(() => {
|
it('should render adf-buttons-menu component', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
|
@@ -387,23 +387,6 @@ describe('StartProcessCloudComponent', () => {
|
|||||||
expect(component.processDefinitionList).toBe(fakeProcessDefinitions);
|
expect(component.processDefinitionList).toBe(fakeProcessDefinitions);
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('should NOT filter processes in the select list if input is empty', fakeAsync(() => {
|
|
||||||
component.processDefinitionList = fakeProcessDefinitions;
|
|
||||||
component.ngOnInit();
|
|
||||||
component.ngOnChanges({ appName: change });
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
const el = fixture.nativeElement.querySelector('#processDefinitionName');
|
|
||||||
el.value = '';
|
|
||||||
el.dispatchEvent(new Event('keyup'));
|
|
||||||
el.dispatchEvent(new Event('input'));
|
|
||||||
fixture.detectChanges();
|
|
||||||
expect(component.processDefinition.value).toEqual('', 'processDefinition value should be the one from input');
|
|
||||||
|
|
||||||
tick(3000);
|
|
||||||
expect(component.filteredProcesses.length).toEqual(fakeProcessDefinitions.length);
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should display the matching results in the dropdown as the user types down', fakeAsync(() => {
|
it('should display the matching results in the dropdown as the user types down', fakeAsync(() => {
|
||||||
component.processDefinitionList = fakeProcessDefinitions;
|
component.processDefinitionList = fakeProcessDefinitions;
|
||||||
component.ngOnInit();
|
component.ngOnInit();
|
||||||
|
@@ -1,30 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { StartProcessCloudModule } from './start-process-cloud.module';
|
|
||||||
|
|
||||||
describe('StartProcessCloudModule', () => {
|
|
||||||
let startProcessCloudModule: StartProcessCloudModule;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
startProcessCloudModule = new StartProcessCloudModule();
|
|
||||||
});
|
|
||||||
|
|
||||||
xit('should create an instance', () => {
|
|
||||||
expect(startProcessCloudModule).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@@ -45,9 +45,7 @@ const definedSourceParams = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tslint:disable */
|
describe('AttachFolderWidgetComponent', () => {
|
||||||
// TODO: crashes because of LogService problem
|
|
||||||
xdescribe('AttachFolderWidgetComponent', () => {
|
|
||||||
|
|
||||||
let widget: AttachFolderWidgetComponent;
|
let widget: AttachFolderWidgetComponent;
|
||||||
let fixture: ComponentFixture<AttachFolderWidgetComponent>;
|
let fixture: ComponentFixture<AttachFolderWidgetComponent>;
|
||||||
|
@@ -22,7 +22,9 @@
|
|||||||
true,
|
true,
|
||||||
"eval",
|
"eval",
|
||||||
"fdescribe",
|
"fdescribe",
|
||||||
"fit"
|
"fit",
|
||||||
|
"xit",
|
||||||
|
"xdescribe"
|
||||||
],
|
],
|
||||||
"class-name": true,
|
"class-name": true,
|
||||||
"comment-format": [
|
"comment-format": [
|
||||||
|
Reference in New Issue
Block a user