mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix new lint
This commit is contained in:
@@ -627,9 +627,9 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
navigateToCardFolder(folderName) {
|
navigateToCardFolder(folderName) {
|
||||||
let folderCard = element(by.css(`.adf-document-list-container div.adf-image-table-cell.adf-datatable-cell[data-automation-id="${folderName}"]`));
|
const folderCard = element(by.css(`.adf-document-list-container div.adf-image-table-cell.adf-datatable-cell[data-automation-id="${folderName}"]`));
|
||||||
folderCard.click();
|
folderCard.click();
|
||||||
let folderSelected = element(by.css(`.adf-datatable-row.adf-is-selected div[data-automation-id="${folderName}"].adf-datatable-cell--image`));
|
const folderSelected = element(by.css(`.adf-datatable-row.adf-is-selected div[data-automation-id="${folderName}"].adf-datatable-cell--image`));
|
||||||
Util.waitUntilElementIsVisible(folderSelected);
|
Util.waitUntilElementIsVisible(folderSelected);
|
||||||
browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||||
}
|
}
|
||||||
|
@@ -39,16 +39,16 @@ describe('Process Header cloud component', () => {
|
|||||||
|
|
||||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||||
const simpleApp = 'simple-app', subProcessApp = 'projectsubprocess';
|
const simpleApp = 'simple-app', subProcessApp = 'projectsubprocess';
|
||||||
let formatDate = 'DD-MM-YYYY';
|
const formatDate = 'DD-MM-YYYY';
|
||||||
|
|
||||||
let processHeaderCloudPage = new ProcessHeaderCloudPage();
|
const processHeaderCloudPage = new ProcessHeaderCloudPage();
|
||||||
|
|
||||||
const settingsPage = new SettingsPage();
|
const settingsPage = new SettingsPage();
|
||||||
const loginSSOPage = new LoginSSOPage();
|
const loginSSOPage = new LoginSSOPage();
|
||||||
const navigationBarPage = new NavigationBarPage();
|
const navigationBarPage = new NavigationBarPage();
|
||||||
const appListCloudComponent = new AppListCloudPage();
|
const appListCloudComponent = new AppListCloudPage();
|
||||||
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||||
let processCloudDemoPage = new ProcessCloudDemoPage();
|
const processCloudDemoPage = new ProcessCloudDemoPage();
|
||||||
|
|
||||||
const processDefinitionService: ProcessDefinitions = new ProcessDefinitions();
|
const processDefinitionService: ProcessDefinitions = new ProcessDefinitions();
|
||||||
const processInstancesService: ProcessInstances = new ProcessInstances();
|
const processInstancesService: ProcessInstances = new ProcessInstances();
|
||||||
@@ -65,8 +65,8 @@ describe('Process Header cloud component', () => {
|
|||||||
loginSSOPage.loginSSOIdentityService(user, password);
|
loginSSOPage.loginSSOIdentityService(user, password);
|
||||||
|
|
||||||
await processDefinitionService.init(user, password);
|
await processDefinitionService.init(user, password);
|
||||||
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
|
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
|
||||||
let childProcessDefinition = await processDefinitionService.getProcessDefinitions(subProcessApp);
|
const childProcessDefinition = await processDefinitionService.getProcessDefinitions(subProcessApp);
|
||||||
|
|
||||||
await processInstancesService.init(user, password);
|
await processInstancesService.init(user, password);
|
||||||
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key,
|
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key,
|
||||||
@@ -75,7 +75,7 @@ describe('Process Header cloud component', () => {
|
|||||||
parentCompleteProcess = await processInstancesService.createProcessInstance(childProcessDefinition.list.entries[0].entry.key,
|
parentCompleteProcess = await processInstancesService.createProcessInstance(childProcessDefinition.list.entries[0].entry.key,
|
||||||
subProcessApp, {name: 'cris'});
|
subProcessApp, {name: 'cris'});
|
||||||
|
|
||||||
let parentProcessInstance = await queryService.getProcessInstanceSubProcesses(parentCompleteProcess.entry.id,
|
const parentProcessInstance = await queryService.getProcessInstanceSubProcesses(parentCompleteProcess.entry.id,
|
||||||
subProcessApp);
|
subProcessApp);
|
||||||
childCompleteProcess = parentProcessInstance.list.entries[0];
|
childCompleteProcess = parentProcessInstance.list.entries[0];
|
||||||
completedCreatedDate = moment(childCompleteProcess.entry.startDate).format(formatDate);
|
completedCreatedDate = moment(childCompleteProcess.entry.startDate).format(formatDate);
|
||||||
|
@@ -49,9 +49,6 @@ describe('Search component - Search Bar', () => {
|
|||||||
|
|
||||||
const loginPage = new LoginPage();
|
const loginPage = new LoginPage();
|
||||||
const contentServicesPage = new ContentServicesPage();
|
const contentServicesPage = new ContentServicesPage();
|
||||||
const searchDialog = new SearchDialog();
|
|
||||||
const searchResultPage = new SearchResultsPage();
|
|
||||||
const filePreviewPage = new FilePreviewPage();
|
|
||||||
|
|
||||||
const searchDialog = new SearchDialog();
|
const searchDialog = new SearchDialog();
|
||||||
const searchResultPage = new SearchResultsPage();
|
const searchResultPage = new SearchResultsPage();
|
||||||
@@ -80,7 +77,7 @@ describe('Search component - Search Bar', () => {
|
|||||||
'name': thirdFolderName, 'shortName': thirdFolderName.substring(0, 8)
|
'name': thirdFolderName, 'shortName': thirdFolderName.substring(0, 8)
|
||||||
});
|
});
|
||||||
|
|
||||||
let term = 'Zoizo';
|
const term = 'Zoizo';
|
||||||
|
|
||||||
let fileHighlightUploaded;
|
let fileHighlightUploaded;
|
||||||
|
|
||||||
@@ -309,7 +306,7 @@ describe('Search component - Search Bar', () => {
|
|||||||
const navigationBar = new NavigationBarPage();
|
const navigationBar = new NavigationBarPage();
|
||||||
const configEditor = new ConfigEditorPage();
|
const configEditor = new ConfigEditorPage();
|
||||||
|
|
||||||
let searchConfiguration = new SearchConfiguration().getConfiguration();
|
const searchConfiguration = new SearchConfiguration().getConfiguration();
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
let getRunningApplicationsSpy: jasmine.Spy;
|
let getRunningApplicationsSpy: jasmine.Spy;
|
||||||
let getProcessFilterByIdSpy: jasmine.Spy;
|
let getProcessFilterByIdSpy: jasmine.Spy;
|
||||||
|
|
||||||
let fakeFilter = new ProcessFilterCloudModel({
|
const fakeFilter = new ProcessFilterCloudModel({
|
||||||
name: 'FakeRunningProcess',
|
name: 'FakeRunningProcess',
|
||||||
icon: 'adjust',
|
icon: 'adjust',
|
||||||
id: 'mock-process-filter-id',
|
id: 'mock-process-filter-id',
|
||||||
@@ -85,7 +85,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should fetch process instance filter by id', async(() => {
|
it('should fetch process instance filter by id', async(() => {
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -100,7 +100,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should display filter name as title', () => {
|
it('should display filter name as title', () => {
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const title = fixture.debugElement.nativeElement.querySelector('#adf-edit-process-filter-title-id');
|
const title = fixture.debugElement.nativeElement.querySelector('#adf-edit-process-filter-title-id');
|
||||||
@@ -117,7 +117,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
describe('EditProcessFilter form', () => {
|
describe('EditProcessFilter form', () => {
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
@@ -145,33 +145,33 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
|
|
||||||
it('should disable save button if the process filter is not changed', async(() => {
|
it('should disable save button if the process filter is not changed', async(() => {
|
||||||
component.toggleFilterActions = true;
|
component.toggleFilterActions = true;
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
let saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-save"]');
|
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-save"]');
|
||||||
expect(saveButton.disabled).toEqual(true);
|
expect(saveButton.disabled).toEqual(true);
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should disable saveAs button if the process filter is not changed', async(() => {
|
it('should disable saveAs button if the process filter is not changed', async(() => {
|
||||||
component.toggleFilterActions = true;
|
component.toggleFilterActions = true;
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
let saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-saveAs"]');
|
||||||
expect(saveButton.disabled).toEqual(true);
|
expect(saveButton.disabled).toEqual(true);
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should enable delete button by default', async(() => {
|
it('should enable delete button by default', async(() => {
|
||||||
component.toggleFilterActions = true;
|
component.toggleFilterActions = true;
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
let deleteButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-delete"]');
|
const deleteButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-delete"]');
|
||||||
expect(deleteButton.disabled).toEqual(false);
|
expect(deleteButton.disabled).toEqual(false);
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
@@ -179,12 +179,12 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
it('should display current process filter details', async(() => {
|
it('should display current process filter details', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let stateElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-status"]');
|
const stateElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-status"]');
|
||||||
let sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"]');
|
const sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"]');
|
||||||
let orderElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-order"]');
|
const orderElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-order"]');
|
||||||
expect(stateElement).toBeDefined();
|
expect(stateElement).toBeDefined();
|
||||||
expect(sortElement).toBeDefined();
|
expect(sortElement).toBeDefined();
|
||||||
expect(orderElement).toBeDefined();
|
expect(orderElement).toBeDefined();
|
||||||
@@ -196,9 +196,9 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
|
|
||||||
it('should enable save button if the process filter is changed', async(() => {
|
it('should enable save button if the process filter is changed', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
let stateElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-status"] .mat-select-trigger');
|
const stateElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-status"] .mat-select-trigger');
|
||||||
stateElement.click();
|
stateElement.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-save"]');
|
const saveButton = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-filter-action-save"]');
|
||||||
@@ -212,7 +212,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
|
|
||||||
it('should display state drop down', async(() => {
|
it('should display state drop down', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
const stateElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-status"] .mat-select-trigger');
|
const stateElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-status"] .mat-select-trigger');
|
||||||
stateElement.click();
|
stateElement.click();
|
||||||
@@ -225,7 +225,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
|
|
||||||
it('should display sort drop down', async(() => {
|
it('should display sort drop down', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
const sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"] .mat-select-trigger');
|
const sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"] .mat-select-trigger');
|
||||||
sortElement.click();
|
sortElement.click();
|
||||||
@@ -238,7 +238,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
|
|
||||||
it('should display order drop down', async(() => {
|
it('should display order drop down', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
const orderElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-order"] .mat-select-trigger');
|
const orderElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-order"] .mat-select-trigger');
|
||||||
orderElement.click();
|
orderElement.click();
|
||||||
@@ -254,7 +254,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.filterProperties = ['appName', 'processName'];
|
component.filterProperties = ['appName', 'processName'];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -269,7 +269,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.filterProperties = [];
|
component.filterProperties = [];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -293,7 +293,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.filterProperties = ['appName', 'processName'];
|
component.filterProperties = ['appName', 'processName'];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const appController = component.editProcessFilterForm.get('appName');
|
const appController = component.editProcessFilterForm.get('appName');
|
||||||
@@ -306,13 +306,13 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should display default sort properties', async(() => {
|
it('should display default sort properties', async(() => {
|
||||||
let processFilterIdchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIdchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIdchange });
|
component.ngOnChanges({ 'id': processFilterIdchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"]');
|
const sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"]');
|
||||||
sortElement.click();
|
sortElement.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -336,13 +336,13 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
});
|
});
|
||||||
component.sortProperties = ['id', 'processName', 'processDefinitionId'];
|
component.sortProperties = ['id', 'processName', 'processDefinitionId'];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let processFilterIdchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIdchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIdchange });
|
component.ngOnChanges({ 'id': processFilterIdchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"]');
|
const sortElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-sort"]');
|
||||||
sortElement.click();
|
sortElement.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -359,7 +359,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
describe('edit filter actions', () => {
|
describe('edit filter actions', () => {
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
@@ -367,7 +367,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
it('should emit save event and save the filter on click save button', async(() => {
|
it('should emit save event and save the filter on click save button', async(() => {
|
||||||
component.toggleFilterActions = true;
|
component.toggleFilterActions = true;
|
||||||
const saveFilterSpy = spyOn(service, 'updateFilter').and.returnValue(fakeFilter);
|
const saveFilterSpy = spyOn(service, 'updateFilter').and.returnValue(fakeFilter);
|
||||||
let saveSpy: jasmine.Spy = spyOn(component.action, 'emit');
|
const saveSpy: jasmine.Spy = spyOn(component.action, 'emit');
|
||||||
|
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
@@ -390,7 +390,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
it('should emit delete event and delete the filter on click of delete button', async(() => {
|
it('should emit delete event and delete the filter on click of delete button', async(() => {
|
||||||
component.toggleFilterActions = true;
|
component.toggleFilterActions = true;
|
||||||
const deleteFilterSpy = spyOn(service, 'deleteFilter').and.callThrough();
|
const deleteFilterSpy = spyOn(service, 'deleteFilter').and.callThrough();
|
||||||
let deleteSpy: jasmine.Spy = spyOn(component.action, 'emit');
|
const deleteSpy: jasmine.Spy = spyOn(component.action, 'emit');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
@@ -411,7 +411,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
it('should emit saveAs event and add filter on click saveAs button', async(() => {
|
it('should emit saveAs event and add filter on click saveAs button', async(() => {
|
||||||
component.toggleFilterActions = true;
|
component.toggleFilterActions = true;
|
||||||
const saveAsFilterSpy = spyOn(service, 'addFilter').and.callThrough();
|
const saveAsFilterSpy = spyOn(service, 'addFilter').and.callThrough();
|
||||||
let saveAsSpy: jasmine.Spy = spyOn(component.action, 'emit');
|
const saveAsSpy: jasmine.Spy = spyOn(component.action, 'emit');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
@@ -436,7 +436,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
it('should display default filter actions', async(() => {
|
it('should display default filter actions', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.toggleFilterActions = true;
|
component.toggleFilterActions = true;
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -459,7 +459,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.actions = ['save'];
|
component.actions = ['save'];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
const processFilterIDchange = new SimpleChange(null, 'mock-process-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': processFilterIDchange });
|
component.ngOnChanges({ 'id': processFilterIDchange });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -475,7 +475,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
component.actions = [];
|
component.actions = [];
|
||||||
component.id = 'mock-process-filter-id';
|
component.id = 'mock-process-filter-id';
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
const expansionPanel = fixture.debugElement.nativeElement.querySelector('mat-expansion-panel-header');
|
||||||
expansionPanel.click();
|
expansionPanel.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
|
Reference in New Issue
Block a user