Skip to content

Commit de97b43

Browse files
committed
update tests to use icons
1 parent bf25145 commit de97b43

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/test/ec2/prompter.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as assert from 'assert'
66
import { Ec2Prompter, instanceFilter } from '../../ec2/prompter'
77
import { Ec2Instance } from '../../shared/clients/ec2Client'
88
import { RegionSubmenuResponse } from '../../shared/ui/common/regionSubmenu'
9-
import { Ec2Selection } from '../../ec2/utils'
9+
import { Ec2Selection, getIconForInstanceStatus } from '../../ec2/utils'
1010
import { AsyncCollection } from '../../shared/utilities/asyncCollection'
1111
import { intoCollection } from '../../shared/utilities/collectionUtils'
1212
import { DataQuickPickItem } from '../../shared/ui/pickerPrompter'
@@ -58,7 +58,7 @@ describe('Ec2Prompter', async function () {
5858

5959
const result = prompter.testAsQuickPickItem(testInstance)
6060
const expected = {
61-
label: '$(terminal) \t' + testInstance.name,
61+
label: `${getIconForInstanceStatus(testInstance)} \t ${testInstance.name}`,
6262
detail: testInstance.InstanceId,
6363
data: testInstance.InstanceId,
6464
}
@@ -72,7 +72,7 @@ describe('Ec2Prompter', async function () {
7272

7373
const result = prompter.testAsQuickPickItem(testInstance)
7474
const expected = {
75-
label: '$(terminal) \t' + '(no name)',
75+
label: `${getIconForInstanceStatus(testInstance)} \t (no name)`,
7676
detail: testInstance.InstanceId,
7777
data: testInstance.InstanceId,
7878
}
@@ -138,17 +138,17 @@ describe('Ec2Prompter', async function () {
138138
it('returns items mapped to QuickPick items without filter', async function () {
139139
const expected = [
140140
{
141-
label: '$(terminal) \t' + prompter.instances[0].name!,
141+
label: `${getIconForInstanceStatus(prompter.instances[0])} \t ${prompter.instances[0].name!}`,
142142
detail: prompter.instances[0].InstanceId!,
143143
data: prompter.instances[0].InstanceId!,
144144
},
145145
{
146-
label: '$(terminal) \t' + prompter.instances[1].name!,
146+
label: `${getIconForInstanceStatus(prompter.instances[1])} \t ${prompter.instances[1].name!}`,
147147
detail: prompter.instances[1].InstanceId!,
148148
data: prompter.instances[1].InstanceId!,
149149
},
150150
{
151-
label: '$(terminal) \t' + prompter.instances[2].name!,
151+
label: `${getIconForInstanceStatus(prompter.instances[2])} \t ${prompter.instances[2].name!}`,
152152
detail: prompter.instances[2].InstanceId!,
153153
data: prompter.instances[2].InstanceId!,
154154
},
@@ -163,12 +163,12 @@ describe('Ec2Prompter', async function () {
163163

164164
const expected = [
165165
{
166-
label: '$(terminal) \t' + prompter.instances[0].name!,
166+
label: `${getIconForInstanceStatus(prompter.instances[0])} \t ${prompter.instances[0].name!}`,
167167
detail: prompter.instances[0].InstanceId!,
168168
data: prompter.instances[0].InstanceId!,
169169
},
170170
{
171-
label: '$(terminal) \t' + prompter.instances[2].name!,
171+
label: `${getIconForInstanceStatus(prompter.instances[2])} \t ${prompter.instances[2].name!}`,
172172
detail: prompter.instances[2].InstanceId!,
173173
data: prompter.instances[2].InstanceId!,
174174
},

0 commit comments

Comments
 (0)