mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
restore PS xit tests (#3173)
This commit is contained in:
@@ -154,7 +154,7 @@ describe('ChecklistComponent', () => {
|
||||
expect(element.querySelector('#check-fake-check-id').textContent).toContain('fake-check-name');
|
||||
});
|
||||
|
||||
xit('should add checklist', async(() => {
|
||||
it('should add checklist', async(() => {
|
||||
showChecklistDialog.click();
|
||||
let addButtonDialog = <HTMLElement> window.document.querySelector('#add-check');
|
||||
addButtonDialog.click();
|
||||
|
@@ -334,7 +334,7 @@ describe('StartTaskComponent', () => {
|
||||
expect(testFullname4.trim()).toBe('');
|
||||
});
|
||||
|
||||
xit('should emit error when there is an error while creating task', () => {
|
||||
it('should emit error when there is an error while creating task', () => {
|
||||
let errorSpy = spyOn(component.error, 'emit');
|
||||
spyOn(service, 'createNewTask').and.returnValue(Observable.throw({}));
|
||||
let createTaskButton = <HTMLElement> element.querySelector('#button-start');
|
||||
|
@@ -77,10 +77,6 @@ describe('TaskListComponent', () => {
|
||||
]
|
||||
};
|
||||
|
||||
let mockErrorTaskList = {
|
||||
error: 'wrong request'
|
||||
};
|
||||
|
||||
let fakeCutomSchema = [
|
||||
{
|
||||
'key': 'fakeName',
|
||||
@@ -362,27 +358,6 @@ describe('TaskListComponent', () => {
|
||||
expect(dataRow[1].isSelected).toEqual(true);
|
||||
});
|
||||
|
||||
xit('should throw an exception when the response is wrong', (done) => {
|
||||
let state = new SimpleChange(null, 'open', true);
|
||||
let assignment = new SimpleChange(null, 'fake-assignee', true);
|
||||
|
||||
component.error.subscribe((err) => {
|
||||
expect(err).toBeDefined();
|
||||
expect(err.error).toBe('wrong request');
|
||||
done();
|
||||
});
|
||||
|
||||
component.ngAfterContentInit();
|
||||
fixture.detectChanges();
|
||||
component.ngOnChanges({'state': state, 'assignment': assignment});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
'status': 404,
|
||||
contentType: 'application/json',
|
||||
responseText: JSON.stringify(mockErrorTaskList)
|
||||
});
|
||||
});
|
||||
|
||||
it('should reload tasks when reload() is called', (done) => {
|
||||
component.state = 'open';
|
||||
component.assignment = 'fake-assignee';
|
||||
|
Reference in New Issue
Block a user