Skip to content

Commit a697cfc

Browse files
committed
fix test
1 parent b6d1735 commit a697cfc

File tree

2 files changed

+44
-9
lines changed

2 files changed

+44
-9
lines changed

packages/amazonq/package.json

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,26 +1393,61 @@
13931393
"fontCharacter": "\\f1e0"
13941394
}
13951395
},
1396-
"aws-schemas-registry": {
1396+
"aws-sagemakerunifiedstudio-catalog": {
13971397
"description": "AWS Contributed Icon",
13981398
"default": {
13991399
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
14001400
"fontCharacter": "\\f1e1"
14011401
}
14021402
},
1403-
"aws-schemas-schema": {
1403+
"aws-sagemakerunifiedstudio-spaces": {
14041404
"description": "AWS Contributed Icon",
14051405
"default": {
14061406
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
14071407
"fontCharacter": "\\f1e2"
14081408
}
14091409
},
1410-
"aws-stepfunctions-preview": {
1410+
"aws-sagemakerunifiedstudio-spaces-dark": {
14111411
"description": "AWS Contributed Icon",
14121412
"default": {
14131413
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
14141414
"fontCharacter": "\\f1e3"
14151415
}
1416+
},
1417+
"aws-sagemakerunifiedstudio-symbol-int": {
1418+
"description": "AWS Contributed Icon",
1419+
"default": {
1420+
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
1421+
"fontCharacter": "\\f1e4"
1422+
}
1423+
},
1424+
"aws-sagemakerunifiedstudio-table": {
1425+
"description": "AWS Contributed Icon",
1426+
"default": {
1427+
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
1428+
"fontCharacter": "\\f1e5"
1429+
}
1430+
},
1431+
"aws-schemas-registry": {
1432+
"description": "AWS Contributed Icon",
1433+
"default": {
1434+
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
1435+
"fontCharacter": "\\f1e6"
1436+
}
1437+
},
1438+
"aws-schemas-schema": {
1439+
"description": "AWS Contributed Icon",
1440+
"default": {
1441+
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
1442+
"fontCharacter": "\\f1e7"
1443+
}
1444+
},
1445+
"aws-stepfunctions-preview": {
1446+
"description": "AWS Contributed Icon",
1447+
"default": {
1448+
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
1449+
"fontCharacter": "\\f1e8"
1450+
}
14161451
}
14171452
},
14181453
"walkthroughs": [

packages/amazonq/test/unit/app/inline/completion.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('AmazonQInlineCompletionItemProvider', function () {
4343
const session = {
4444
sessionId: 'test-session',
4545
firstCompletionDisplayLatency: 100,
46-
requestStartTime: performance.now() - 1000,
46+
requestStartTime: Date.now() - 1000,
4747
}
4848

4949
provider.batchDiscardTelemetryForEditSuggestion(items, session)
@@ -84,7 +84,7 @@ describe('AmazonQInlineCompletionItemProvider', function () {
8484
const session = {
8585
sessionId: 'test-session',
8686
firstCompletionDisplayLatency: 100,
87-
requestStartTime: performance.now() - 1000,
87+
requestStartTime: Date.now() - 1000,
8888
}
8989

9090
provider.batchDiscardTelemetryForEditSuggestion(items, session)
@@ -108,7 +108,7 @@ describe('AmazonQInlineCompletionItemProvider', function () {
108108
const session = {
109109
sessionId: 'test-session',
110110
firstCompletionDisplayLatency: 100,
111-
requestStartTime: performance.now() - 1000,
111+
requestStartTime: Date.now() - 1000,
112112
}
113113

114114
provider.batchDiscardTelemetryForEditSuggestion(items, session)
@@ -166,7 +166,7 @@ describe('AmazonQInlineCompletionItemProvider', function () {
166166
mockSessionManager.getActiveSession.returns({
167167
displayed: true,
168168
suggestions: [{ isInlineEdit: true }],
169-
lastVisibleTime: performance.now(),
169+
lastVisibleTime: Date.now(),
170170
})
171171

172172
const result = await provider.isCompletionActive()
@@ -176,7 +176,7 @@ describe('AmazonQInlineCompletionItemProvider', function () {
176176
})
177177

178178
it('should return true when VS Code command executes successfully', async function () {
179-
const currentTime = performance.now()
179+
const currentTime = Date.now()
180180
mockSessionManager.getActiveSession.returns({
181181
displayed: true,
182182
suggestions: [{ isInlineEdit: false }],
@@ -192,7 +192,7 @@ describe('AmazonQInlineCompletionItemProvider', function () {
192192
})
193193

194194
it('should return false when VS Code command fails', async function () {
195-
const oldTime = performance.now() - 100 // Old timestamp (>50ms ago)
195+
const oldTime = Date.now() - 100 // Old timestamp (>50ms ago)
196196
mockSessionManager.getActiveSession.returns({
197197
displayed: true,
198198
suggestions: [{ isInlineEdit: false }],

0 commit comments

Comments
 (0)