diff --git a/test/e2e/specs/settings.spec.ts b/test/e2e/specs/settings.spec.ts index 68286f3a..3fe5678b 100644 --- a/test/e2e/specs/settings.spec.ts +++ b/test/e2e/specs/settings.spec.ts @@ -88,6 +88,7 @@ describe('Settings', () => { describe('VS Code, when updating the "Path to Radicle to Node Home" setting,', () => { let pathToNodeHomeSetting: Setting + let outputView: OutputView before(async () => { pathToNodeHomeSetting = await settings.findSetting( @@ -95,6 +96,8 @@ describe('Settings', () => { 'Radicle', 'Advanced', ) + await workbench.executeCommand('Show Everything Logged in the Output Panel') + outputView = await workbench.getBottomBar().openOutputView() }) after(async () => { @@ -102,6 +105,13 @@ describe('Settings', () => { await clearInput(searchBox) }) + afterEach(async () => { + await outputView.clearText() + await clearTextSetting(pathToNodeHomeSetting) + + await expectOutputToContain(outputView, 'Using already unsealed Radicle identity') + }) + /** * In Linux CI: * - The extension is having issues resolving the correct node home directory (RAD_HOME). @@ -109,18 +119,23 @@ describe('Settings', () => { * non-authenticated. */ it('logs an error in the output console if the path is invalid @skipLinuxCI', async () => { - await workbench.executeCommand('Show Everything Logged in the Output Panel') - const outputView = await workbench.getBottomBar().openOutputView() await outputView.clearText() await setTextSettingValue(pathToNodeHomeSetting, '/tmp') await expectOutputToContain(outputView, '✗ Error: Radicle profile not found in') + }) + it('recognizes when a valid path is specified @skipLinuxCI', async () => { + const tempNodeHomePath = `${nodeHomePath}.temp` + await $`cp -r ${nodeHomePath} ${tempNodeHomePath}` await outputView.clearText() - await clearTextSetting(pathToNodeHomeSetting) + + await setTextSettingValue(pathToNodeHomeSetting, tempNodeHomePath) await expectOutputToContain(outputView, 'Using already unsealed Radicle identity') + + await $`rm -rf ${tempNodeHomePath}` }) }) })