Skip to content

Commit 3ef4011

Browse files
hayemaxijustinmk3
andcommitted
Update packages/toolkit/.changes/next-release/Removal-3ef48be0-d3f3-4252-be69-9a0684406944.json
Co-authored-by: Justin M. Keyes <[email protected]>
1 parent a7f5069 commit 3ef4011

File tree

2 files changed

+2
-53
lines changed

2 files changed

+2
-53
lines changed

packages/core/src/test/shared/extensionUtilities.test.ts

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,16 @@
66
import assert from 'assert'
77

88
import { AWSError } from 'aws-sdk'
9-
import * as path from 'path'
109
import * as sinon from 'sinon'
1110
import { DefaultEc2MetadataClient } from '../../shared/clients/ec2MetadataClient'
1211
import * as vscode from 'vscode'
1312
import { UserActivity, getComputeRegion, initializeComputeRegion } from '../../shared/extensionUtilities'
1413
import { isDifferentVersion, setMostRecentVersion } from '../../shared/extensionUtilities'
15-
import * as filesystemUtilities from '../../shared/filesystemUtilities'
16-
import { FakeExtensionContext } from '../fakeExtensionContext'
1714
import { InstanceIdentity } from '../../shared/clients/ec2MetadataClient'
1815
import { extensionVersion } from '../../shared/vscode/env'
1916
import { sleep } from '../../shared/utilities/timeoutUtils'
2017
import globals from '../../shared/extensionGlobals'
21-
import { createQuickStartWebview, maybeShowMinVscodeWarning } from '../../shared/extensionStartup'
22-
import { fs } from '../../shared'
18+
import { maybeShowMinVscodeWarning } from '../../shared/extensionStartup'
2319
import { getTestWindow } from './vscode/window'
2420
import { assertTelemetry } from '../testUtil'
2521

@@ -34,53 +30,6 @@ describe('extensionUtilities', function () {
3430
assertTelemetry('toolkit_showNotification', [])
3531
})
3632

37-
describe('createQuickStartWebview', async function () {
38-
let context: FakeExtensionContext
39-
let tempDir: string | undefined
40-
41-
beforeEach(async function () {
42-
context = await FakeExtensionContext.create()
43-
tempDir = await filesystemUtilities.makeTemporaryToolkitFolder()
44-
context.extensionPath = tempDir
45-
})
46-
47-
afterEach(async function () {
48-
if (tempDir) {
49-
await fs.delete(tempDir, { recursive: true })
50-
}
51-
})
52-
53-
it("throws error if a quick start page doesn't exist", async () => {
54-
await assert.rejects(createQuickStartWebview(context, 'irresponsibly-named-file'))
55-
})
56-
57-
it('returns a webview with unaltered text if a valid file is passed without tokens', async function () {
58-
const filetext = 'this temp page does not have any tokens'
59-
const filepath = 'tokenless'
60-
await fs.writeFile(path.join(context.extensionPath, filepath), filetext)
61-
const webview = await createQuickStartWebview(context, filepath)
62-
63-
assert.strictEqual(typeof webview, 'object')
64-
const forcedWebview = webview as vscode.WebviewPanel
65-
assert.strictEqual(forcedWebview.webview.html.includes(filetext), true)
66-
})
67-
68-
it('returns a webview with tokens replaced', async function () {
69-
const token = '!!EXTENSIONROOT!!'
70-
const basetext = 'this temp page has tokens: '
71-
const filetext = basetext + token
72-
const filepath = 'tokenless'
73-
await fs.writeFile(path.join(context.extensionPath, filepath), filetext)
74-
const webview = await createQuickStartWebview(context, filepath)
75-
76-
assert.strictEqual(typeof webview, 'object')
77-
const forcedWebview = webview as vscode.WebviewPanel
78-
79-
const pathAsVsCodeResource = forcedWebview.webview.asWebviewUri(vscode.Uri.file(context.extensionPath))
80-
assert.strictEqual(forcedWebview.webview.html.includes(`${basetext}${pathAsVsCodeResource}`), true)
81-
})
82-
})
83-
8433
describe('isDifferentVersion', function () {
8534
it('returns false if the version exists and matches the existing version exactly', async function () {
8635
const goodVersion = '1.2.3'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"type": "Removal",
3-
"description": "Cloud9: Remove all support and compatibility."
3+
"description": "Cloud9: remove special-case logic."
44
}

0 commit comments

Comments
 (0)