restore PS xit tests (#3173)

This commit is contained in:
Eugenio Romano
2018-04-11 17:23:56 +01:00
committed by GitHub
parent 38de016893
commit 8b4af90b46
6 changed files with 22 additions and 64 deletions

View File

@@ -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();

View File

@@ -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');

View File

@@ -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';