Skip to content

Commit 320f52b

Browse files
committed
try entire suite 1000 times
1 parent 89c340b commit 320f52b

File tree

2 files changed

+46
-47
lines changed

2 files changed

+46
-47
lines changed

buildspec/linuxTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
install:
1919
run-as: root
2020
runtime-versions:
21-
nodejs: 18.20.4
21+
nodejs: 18
2222
commands:
2323
- bash buildspec/shared/linux-install.sh
2424

packages/core/src/test/login/webview/vue/backend.test.ts

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,43 @@ import { CancellationError } from '../../../../shared/utilities/timeoutUtils'
99
import { TelemetryMetadata } from '../../../../auth/connection'
1010

1111
// TODO: remove auth page and tests
12-
//eslint-disable-next-line aws-toolkits/no-only-in-tests
13-
describe.only('Amazon Q Login', function () {
14-
const region = 'fakeRegion'
15-
const startUrl = 'fakeUrl'
12+
for (const _ of Array.from({ length: 1000 }, (i) => i)) {
13+
describe('Amazon Q Login', function () {
14+
const region = 'fakeRegion'
15+
const startUrl = 'fakeUrl'
1616

17-
let backend: AmazonQLoginWebview
17+
let backend: AmazonQLoginWebview
1818

19-
beforeEach(function () {
20-
backend = new AmazonQLoginWebview()
21-
})
19+
beforeEach(function () {
20+
backend = new AmazonQLoginWebview()
21+
})
2222

23-
it('emits ui_click telemetry', function () {
24-
backend.emitUiClick('auth_backButton')
23+
it('emits ui_click telemetry', function () {
24+
backend.emitUiClick('auth_backButton')
2525

26-
assertTelemetry('ui_click', {
27-
elementId: 'auth_backButton',
26+
assertTelemetry('ui_click', {
27+
elementId: 'auth_backButton',
28+
})
2829
})
29-
})
3030

31-
it('runs setup and emits success and recorded metrics', async function () {
32-
const metadata: TelemetryMetadata = {
33-
credentialSourceId: 'iamIdentityCenter',
34-
credentialStartUrl: startUrl,
35-
awsRegion: region,
36-
}
37-
const setupFunc = async () => {
38-
backend.storeMetricMetadata(metadata)
39-
}
31+
it('runs setup and emits success and recorded metrics', async function () {
32+
const metadata: TelemetryMetadata = {
33+
credentialSourceId: 'iamIdentityCenter',
34+
credentialStartUrl: startUrl,
35+
awsRegion: region,
36+
}
37+
const setupFunc = async () => {
38+
backend.storeMetricMetadata(metadata)
39+
}
4040

41-
// method under test
42-
await backend.ssoSetup('test', setupFunc, true)
41+
// method under test
42+
await backend.ssoSetup('test', setupFunc, true)
4343

44-
assertTelemetry('auth_addConnection', {
45-
result: 'Succeeded',
46-
...metadata,
44+
assertTelemetry('auth_addConnection', {
45+
result: 'Succeeded',
46+
...metadata,
47+
})
4748
})
48-
})
49-
for (const _ of Array.from({ length: 1000 }, (i) => i)) {
5049
it('runs setup and emits failed and recorded metrics', async function () {
5150
const metadata: TelemetryMetadata = {
5251
credentialSourceId: 'iamIdentityCenter',
@@ -66,25 +65,25 @@ describe.only('Amazon Q Login', function () {
6665
...metadata,
6766
})
6867
})
69-
}
7068

71-
it('runs setup and emits cancelled and recorded metrics', async function () {
72-
const metadata: TelemetryMetadata = {
73-
credentialSourceId: 'iamIdentityCenter',
74-
credentialStartUrl: startUrl,
75-
awsRegion: region,
76-
}
77-
const setupFunc = async () => {
78-
backend.storeMetricMetadata(metadata)
79-
throw new CancellationError('user')
80-
}
69+
it('runs setup and emits cancelled and recorded metrics', async function () {
70+
const metadata: TelemetryMetadata = {
71+
credentialSourceId: 'iamIdentityCenter',
72+
credentialStartUrl: startUrl,
73+
awsRegion: region,
74+
}
75+
const setupFunc = async () => {
76+
backend.storeMetricMetadata(metadata)
77+
throw new CancellationError('user')
78+
}
8179

82-
// method under test
83-
await backend.ssoSetup('test', setupFunc, true)
80+
// method under test
81+
await backend.ssoSetup('test', setupFunc, true)
8482

85-
assertTelemetry('auth_addConnection', {
86-
result: 'Cancelled',
87-
...metadata,
83+
assertTelemetry('auth_addConnection', {
84+
result: 'Cancelled',
85+
...metadata,
86+
})
8887
})
8988
})
90-
})
89+
}

0 commit comments

Comments
 (0)