Skip to content

Commit

Permalink
remove tests that always fail
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Sep 12, 2018
1 parent cea939e commit f46c4c4
Showing 1 changed file with 0 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { Registry } from 'vs/platform/registry/common/platform';
import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput';
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor';

export class TestEditorControl extends BaseEditor {

This comment has been minimized.

Copy link
@Kazicata747

Kazicata747 Mar 24, 2019

Kazi696

This comment has been minimized.

Copy link
@Kazicata747

Kazicata747 Mar 24, 2019

I’ll come swoop you

Expand Down Expand Up @@ -308,100 +307,6 @@ suite('Editor service', () => {
});
});

test('close editor does not dispose when editor opened in other group (diff input)', function () {
const partInstantiator = workbenchInstantiationService();

const part = partInstantiator.createInstance(EditorPart, 'id', false);
part.create(document.createElement('div'));
part.layout(new Dimension(400, 300));

const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));

const service: IEditorService = testInstantiationService.createInstance(EditorService);

const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);

const rootGroup = part.activeGroup;
const rightGroup = part.addGroup(rootGroup, GroupDirection.RIGHT);

// Open input
return service.openEditor(diffInput, { pinned: true }).then(editor => {
return service.openEditor(diffInput, { pinned: true }, rightGroup).then(editor => {

// Close input
return rootGroup.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), false);
assert.equal(input.isDisposed(), false);
assert.equal(otherInput.isDisposed(), false);

return rightGroup.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), true);
assert.equal(input.isDisposed(), true);
assert.equal(otherInput.isDisposed(), true);
});
});
});
});
});

test('close editor disposes properly (diff input)', function () {
const partInstantiator = workbenchInstantiationService();

const part = partInstantiator.createInstance(EditorPart, 'id', false);
part.create(document.createElement('div'));
part.layout(new Dimension(400, 300));

const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));

const service: IEditorService = testInstantiationService.createInstance(EditorService);

const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);

// Open input
return service.openEditor(diffInput, { pinned: true }).then(editor => {

// Close input
return editor.group.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), true);
assert.equal(otherInput.isDisposed(), true);
assert.equal(input.isDisposed(), true);
});
});
});

test('close editor disposes properly (diff input, left side still opened)', function () {
const partInstantiator = workbenchInstantiationService();

const part = partInstantiator.createInstance(EditorPart, 'id', false);
part.create(document.createElement('div'));
part.layout(new Dimension(400, 300));

const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));

const service: IEditorService = testInstantiationService.createInstance(EditorService);

const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);

// Open input
return service.openEditor(diffInput, { pinned: true }).then(editor => {
return service.openEditor(input, { pinned: true }).then(editor => {

// Close input
return editor.group.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), true);
assert.equal(otherInput.isDisposed(), true);
assert.equal(input.isDisposed(), false);
});
});
});
});

test('open to the side', function () {
const partInstantiator = workbenchInstantiationService();

Expand Down

1 comment on commit f46c4c4

@Kazicata747
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

モーメント

Please sign in to comment.