Skip to content

Commit

Permalink
Merge branch 'master' of github.com:theia-ide/theia into vf/fix-ui-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vince-fugnitto committed Jan 23, 2019
2 parents 0962f1f + 831ad92 commit 4f3cef3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ build_script:

test_script:
- appveyor-retry yarn test:theia
- appveyor-retry yarn test:electron
- appveyor-retry yarn test:browser
- appveyor-retry yarn test:electron
- appveyor-retry yarn test:browser

notifications:
- provider: Webhook
Expand Down
4 changes: 0 additions & 4 deletions examples/browser/test/main-page/main-page.ui-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ describe('theia main page', () => {
mainPage.waitForStartup();
});

it.only('fail me', () => {
expect(2).to.equal(5);
});

it('should show the application shell', () => {
expect(mainPage.applicationShellExists()).to.be.true;
});
Expand Down
29 changes: 23 additions & 6 deletions packages/navigator/src/browser/navigator-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,17 @@ export class FileNavigatorContribution extends AbstractViewContribution<FileNavi

this.workspacePreferences.ready.then(() => {
if (this.workspacePreferences['workspace.supportMultiRootWorkspace']) {
registry.registerMenuAction(NavigatorContextMenu.WORKSPACE, {
commandId: WorkspaceCommands.ADD_FOLDER.id
});
registry.registerMenuAction(NavigatorContextMenu.WORKSPACE, {
commandId: WorkspaceCommands.REMOVE_FOLDER.id
});
this.registerAddRemoveFolderActions(registry);
}
this.workspacePreferences.onPreferenceChanged(change => {
if (change.preferenceName === 'workspace.supportMultiRootWorkspace') {
if (change.newValue) {
this.registerAddRemoveFolderActions(registry);
} else {
this.unregisterAddRemoveFolderActions(registry);
}
}
});
});
}

Expand Down Expand Up @@ -266,4 +270,17 @@ export class FileNavigatorContribution extends AbstractViewContribution<FileNavi
}
}

private registerAddRemoveFolderActions(registry: MenuModelRegistry): void {
registry.registerMenuAction(NavigatorContextMenu.WORKSPACE, {
commandId: WorkspaceCommands.ADD_FOLDER.id
});
registry.registerMenuAction(NavigatorContextMenu.WORKSPACE, {
commandId: WorkspaceCommands.REMOVE_FOLDER.id
});
}

private unregisterAddRemoveFolderActions(registry: MenuModelRegistry): void {
registry.unregisterMenuAction({ commandId: WorkspaceCommands.ADD_FOLDER.id }, NavigatorContextMenu.WORKSPACE);
registry.unregisterMenuAction({ commandId: WorkspaceCommands.REMOVE_FOLDER.id }, NavigatorContextMenu.WORKSPACE);
}
}

0 comments on commit 4f3cef3

Please sign in to comment.