|
4 | 4 | */ |
5 | 5 |
|
6 | 6 | import assert from 'assert' |
7 | | -import { AmazonQLoginWebview } from '../../../../login/webview/vue/amazonq/backend_amazonq' |
8 | | -import { AuthUtil } from '../../../../codewhisperer/util/authUtil' |
9 | 7 | import * as sinon from 'sinon' |
10 | | -import { assertTelemetry } from '../../../testUtil' |
11 | | -import { connectToEnterpriseSso } from '../../../../codewhisperer/util/getStartUrl' |
12 | | -import { awsIdSignIn } from '../../../../codewhisperer/util/showSsoPrompt' |
13 | | -import { createTestAuthUtil } from '../../../testAuthUtil' |
| 8 | +import { assertTelemetry, createTestAuthUtil } from 'aws-core-vscode/test' |
| 9 | +import { AuthUtil, awsIdSignIn, getStartUrl } from 'aws-core-vscode/codewhisperer' |
| 10 | +import { backendAmazonQ } from 'aws-core-vscode/login' |
14 | 11 |
|
15 | 12 | describe('Amazon Q Login', async function () { |
16 | 13 | const region = 'fakeRegion' |
17 | 14 | const startUrl = 'fakeUrl' |
18 | 15 |
|
19 | 16 | let sandbox: sinon.SinonSandbox |
20 | | - let backend: AmazonQLoginWebview |
| 17 | + let backend: backendAmazonQ.AmazonQLoginWebview |
21 | 18 |
|
22 | | - beforeEach(async function () { |
23 | | - await createTestAuthUtil() |
| 19 | + await createTestAuthUtil() |
24 | 20 |
|
| 21 | + beforeEach(function () { |
25 | 22 | sandbox = sinon.createSandbox() |
26 | | - backend = new AmazonQLoginWebview() |
| 23 | + backend = new backendAmazonQ.AmazonQLoginWebview() |
27 | 24 | }) |
28 | 25 |
|
29 | 26 | afterEach(function () { |
@@ -85,7 +82,7 @@ describe('Amazon Q Login', async function () { |
85 | 82 | }) |
86 | 83 |
|
87 | 84 | it('reauths IdC and emits telemetry', async function () { |
88 | | - await connectToEnterpriseSso(startUrl, region) |
| 85 | + await getStartUrl.connectToEnterpriseSso(startUrl, region) |
89 | 86 |
|
90 | 87 | await backend.reauthenticateConnection() |
91 | 88 |
|
|
0 commit comments