Skip to content

Commit 44b1177

Browse files
author
JadenSimon
committed
Move Step Functions test case to fix CI
1 parent 1822fb6 commit 44b1177

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/integrationTest/stepFunctions/visualizeStateMachine.test.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { MessageObject } from '../../stepFunctions/commands/visualizeStateMachin
1212
import { makeTemporaryToolkitFolder } from '../../shared/filesystemUtilities'
1313
import { closeAllEditors } from '../../test/testUtil'
1414
import { previewStateMachineCommand } from '../../stepFunctions/activation'
15-
import { getTestWindow } from '../../test/globalSetup.test'
1615

1716
const sampleStateMachine = `
1817
{
@@ -207,16 +206,6 @@ describe('visualizeStateMachine', async function () {
207206
}
208207
})
209208

210-
it('throws an error if no active text editor is open', async function () {
211-
// Make sure nothing is open from previous tests.
212-
await closeAllEditors()
213-
assert.strictEqual(vscode.window.activeTextEditor, undefined)
214-
215-
const errorMessage = getTestWindow().waitForMessage(/no active text editor/i)
216-
217-
await Promise.all([previewStateMachineCommand.execute(), errorMessage.then(dialog => dialog.close())])
218-
})
219-
220209
it('doesnt update the graph if a seperate file is opened or modified', async function () {
221210
const stateMachineFileText = '{}'
222211
const stateMachineDefinitionFile = 'mystatemachine.json'

src/test/stepFunctions/commands/visualizeStateMachine.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import { YAML_ASL, JSON_ASL } from '../../../../src/stepFunctions/constants/aslF
1616
import { FakeExtensionContext } from '../../fakeExtensionContext'
1717
import { closeAllEditors } from '../../testUtil'
1818
import { getLogger } from '../../../shared/logger'
19+
import { previewStateMachineCommand } from '../../../stepFunctions/activation'
20+
import { getTestWindow } from '../../globalSetup.test'
1921

2022
// Top level defintions
2123
let aslVisualizationManager: AslVisualizationManager
@@ -191,6 +193,16 @@ describe('StepFunctions VisualizeStateMachine', async function () {
191193
assert.strictEqual(aslVisualizationManager.getManagedVisualizations().size, 1)
192194
})
193195

196+
it('throws an error if no active text editor is open', async function () {
197+
// Make sure nothing is open from previous tests.
198+
await closeAllEditors()
199+
assert.strictEqual(vscode.window.activeTextEditor, undefined)
200+
201+
const errorMessage = getTestWindow().waitForMessage(/no active text editor/i)
202+
203+
await Promise.all([previewStateMachineCommand.execute(), errorMessage.then(dialog => dialog.close())])
204+
})
205+
194206
it('Test AslVisualisation sendUpdateMessage posts a correct update message for YAML files', async function () {
195207
const yamlDoc = await getYamlDoc()
196208
const postMessage = sinon.spy()

0 commit comments

Comments
 (0)