Skip to content

Commit

Permalink
Tests #17290
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Dec 15, 2016
1 parent b904ab2 commit 5b4cf98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ suite('ExtensionsActions Test', () => {
const workbenchService = instantiationService.get(IExtensionsWorkbenchService);
instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', local);
workbenchService.queryLocal().done(() => {
instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { id: local[0].id, version: '1.0.2' }), aGalleryExtension('b', { id: local[1].id, version: '1.0.2' }), aGalleryExtension('c', local)));
instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { id: local[0].id, version: '1.0.2' }), aGalleryExtension('b', { id: local[1].id, version: '1.0.2' }), aGalleryExtension('c', local[2].manifest)));
workbenchService.queryGallery().done(() => {
assert.ok(testObject.enabled);
done();
Expand All @@ -854,7 +854,7 @@ suite('ExtensionsActions Test', () => {
test('Test UpdateAllAction when some installed extensions are outdated and some outdated are being installed', (done) => {
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label');
const local = [aLocalExtension('a', { version: '1.0.1' }), aLocalExtension('b', { version: '1.0.1' }), aLocalExtension('c', { version: '1.0.1' })];
const gallery = [aGalleryExtension('a', { id: local[0].id, version: '1.0.2' }), aGalleryExtension('b', { id: local[1].id, version: '1.0.2' }), aGalleryExtension('c', local)];
const gallery = [aGalleryExtension('a', { id: local[0].id, version: '1.0.2' }), aGalleryExtension('b', { id: local[1].id, version: '1.0.2' }), aGalleryExtension('c', local[2].manifest)];
const workbenchService = instantiationService.get(IExtensionsWorkbenchService);
instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', local);
workbenchService.queryLocal().done(() => {
Expand All @@ -870,7 +870,7 @@ suite('ExtensionsActions Test', () => {
test('Test UpdateAllAction when some installed extensions are outdated and all outdated are being installed', (done) => {
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label');
const local = [aLocalExtension('a', { version: '1.0.1' }), aLocalExtension('b', { version: '1.0.1' }), aLocalExtension('c', { version: '1.0.1' })];
const gallery = [aGalleryExtension('a', { id: local[0].id, version: '1.0.2' }), aGalleryExtension('b', { id: local[1].id, version: '1.0.2' }), aGalleryExtension('c', local)];
const gallery = [aGalleryExtension('a', { id: local[0].id, version: '1.0.2' }), aGalleryExtension('b', { id: local[1].id, version: '1.0.2' }), aGalleryExtension('c', local[2].manifest)];
const workbenchService = instantiationService.get(IExtensionsWorkbenchService);
instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', local);
workbenchService.queryLocal().done(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ suite('ExtensionsWorkbenchService Test', () => {
readmeUrl: 'localReadmeUrl2',
changelogUrl: 'localChangelogUrl2',
});
const gallery1 = aGalleryExtension('expectedName', {
const gallery1 = aGalleryExtension(local1.manifest.name, {
id: local1.id,
displayName: 'expectedDisplayName',
version: '1.5.0',
publisherId: 'expectedPublisherId',
publisher: 'expectedPublisher',
publisher: local1.manifest.publisher,
publisherDisplayName: 'expectedPublisherDisplayName',
description: 'expectedDescription',
installCount: 1000,
Expand All @@ -250,10 +250,10 @@ suite('ExtensionsWorkbenchService Test', () => {

let actual = actuals[0];
assert.equal(LocalExtensionType.User, actual.type);
assert.equal('expectedName', actual.name);
assert.equal('local1', actual.name);
assert.equal('expectedDisplayName', actual.displayName);
assert.equal('expectedPublisher.expectedName', actual.identifier);
assert.equal('expectedPublisher', actual.publisher);
assert.equal('localPublisher1.local1', actual.identifier);
assert.equal('localPublisher1', actual.publisher);
assert.equal('1.1.0', actual.version);
assert.equal('1.5.0', actual.latestVersion);
assert.equal('expectedDescription', actual.description);
Expand Down

0 comments on commit 5b4cf98

Please sign in to comment.