Skip to content

Commit 6c4f2c7

Browse files
committed
test(e2e): skip some tests to speed up workflow
Signed-off-by: Zacharias Fragkiadakis <[email protected]>
1 parent ac86704 commit 6c4f2c7

File tree

1 file changed

+74
-75
lines changed

1 file changed

+74
-75
lines changed

test/e2e/specs/onboarding.spec.ts

Lines changed: 74 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import path from 'node:path'
2-
import { browser, expect } from '@wdio/globals'
2+
import { browser } from '@wdio/globals'
33
import type { Workbench } from 'wdio-vscode-service'
44
import { $, cd } from 'zx'
5-
import type * as VsCode from 'vscode'
65
import isEqual from 'lodash/isEqual'
76
import { expectStandardSidebarViewsToBeVisible } from '../helpers/assertions'
87
import { closeRadicleViewContainer, openRadicleViewContainer } from '../helpers/actions'
98
import { getFirstWelcomeViewText } from '../helpers/queries'
10-
import { e2eTestDirPath, nodeHomePath } from '../constants/config'
9+
import { e2eTestDirPath } from '../constants/config'
1110

1211
describe('Onboarding Flow', () => {
1312
let workbench: Workbench
@@ -20,78 +19,78 @@ describe('Onboarding Flow', () => {
2019
await closeRadicleViewContainer(workbench)
2120
})
2221

23-
describe('VS Code, *before* Radicle is installed,', () => {
24-
const tempPathToNodeHome = `${nodeHomePath}.temp`
25-
26-
before(async () => {
27-
// Simulate radicle "not being installed" by renaming the node home directory
28-
await $`mv ${nodeHomePath} ${tempPathToNodeHome}`
29-
})
30-
31-
after(async () => {
32-
await $`mv ${tempPathToNodeHome} ${nodeHomePath}`
33-
await workbench.executeCommand('Developer: Reload Window')
34-
})
35-
36-
it('has our Radicle extension installed and available', async () => {
37-
const extensions = await browser.executeWorkbench(
38-
(vscode: typeof VsCode) => vscode.extensions.all,
39-
)
40-
41-
expect(
42-
extensions.some((extension) => extension.id === 'radicle-ide-plugins-team.radicle'),
43-
).toBe(true)
44-
})
45-
46-
it('shows the Radicle button in the Activity Bar', async () => {
47-
const radicleViewControl = await workbench.getActivityBar().getViewControl('Radicle')
48-
const title = await radicleViewControl?.getTitle()
49-
50-
expect(title).toBe('Radicle')
51-
})
52-
53-
it('instructs the user to install radicle', async () => {
54-
await openRadicleViewContainer(workbench)
55-
56-
const welcomeText = await getFirstWelcomeViewText(workbench)
57-
const buttonTitles = await getFirstWelcomeViewButtonTitles(workbench)
58-
59-
expect(welcomeText).toEqual([
60-
/* eslint-disable max-len */
61-
'Failed resolving the Radicle CLI binary.',
62-
"Please ensure it is installed on your machine and either that it is globally accessible in the shell as `rad` or that its path is correctly defined in the extension's settings.",
63-
"Please expect the extention's capabilities to remain severely limited until this issue is resolved.",
64-
/* eslint-enable max-len */
65-
])
66-
67-
expect(buttonTitles).toEqual(['Troubleshoot'])
68-
})
69-
})
70-
71-
describe('VS Code, *before* the workspace is git-initialized,', () => {
72-
it('guides the user on how to git-initialize their workspace', async () => {
73-
await openRadicleViewContainer(workbench)
74-
75-
await browser.waitUntil(async () => {
76-
const welcomeText = await getFirstWelcomeViewText(workbench)
77-
const welcomeButtonTitles = await getFirstWelcomeViewButtonTitles(workbench)
78-
79-
return (
80-
isEqual(welcomeText, [
81-
/* eslint-disable max-len */
82-
'The folder currently opened in your workspace is not a Git code repository.',
83-
'In order to use Radicle with it, this folder must first be initialized as a Git code repository.',
84-
'To learn more about how to use Git and source control in VS Code read the docs.',
85-
/* eslint-enable max-len */
86-
]) &&
87-
isEqual(welcomeButtonTitles, [
88-
'Initialize Repository With Git',
89-
'Choose a Different Folder',
90-
])
91-
)
92-
})
93-
})
94-
})
22+
// describe('VS Code, *before* Radicle is installed,', () => {
23+
// const tempPathToNodeHome = `${nodeHomePath}.temp`
24+
25+
// before(async () => {
26+
// // Simulate radicle "not being installed" by renaming the node home directory
27+
// await $`mv ${nodeHomePath} ${tempPathToNodeHome}`
28+
// })
29+
30+
// after(async () => {
31+
// await $`mv ${tempPathToNodeHome} ${nodeHomePath}`
32+
// await workbench.executeCommand('Developer: Reload Window')
33+
// })
34+
35+
// it('has our Radicle extension installed and available', async () => {
36+
// const extensions = await browser.executeWorkbench(
37+
// (vscode: typeof VsCode) => vscode.extensions.all,
38+
// )
39+
40+
// expect(
41+
// extensions.some((extension) => extension.id === 'radicle-ide-plugins-team.radicle'),
42+
// ).toBe(true)
43+
// })
44+
45+
// it('shows the Radicle button in the Activity Bar', async () => {
46+
// const radicleViewControl = await workbench.getActivityBar().getViewControl('Radicle')
47+
// const title = await radicleViewControl?.getTitle()
48+
49+
// expect(title).toBe('Radicle')
50+
// })
51+
52+
// it('instructs the user to install radicle', async () => {
53+
// await openRadicleViewContainer(workbench)
54+
55+
// const welcomeText = await getFirstWelcomeViewText(workbench)
56+
// const buttonTitles = await getFirstWelcomeViewButtonTitles(workbench)
57+
58+
// expect(welcomeText).toEqual([
59+
// /* eslint-disable max-len */
60+
// 'Failed resolving the Radicle CLI binary.',
61+
// "Please ensure it is installed on your machine and either that it is globally accessible in the shell as `rad` or that its path is correctly defined in the extension's settings.",
62+
// "Please expect the extention's capabilities to remain severely limited until this issue is resolved.",
63+
// /* eslint-enable max-len */
64+
// ])
65+
66+
// expect(buttonTitles).toEqual(['Troubleshoot'])
67+
// })
68+
// })
69+
70+
// describe('VS Code, *before* the workspace is git-initialized,', () => {
71+
// it('guides the user on how to git-initialize their workspace', async () => {
72+
// await openRadicleViewContainer(workbench)
73+
74+
// await browser.waitUntil(async () => {
75+
// const welcomeText = await getFirstWelcomeViewText(workbench)
76+
// const welcomeButtonTitles = await getFirstWelcomeViewButtonTitles(workbench)
77+
78+
// return (
79+
// isEqual(welcomeText, [
80+
// /* eslint-disable max-len */
81+
// 'The folder currently opened in your workspace is not a Git code repository.',
82+
// 'In order to use Radicle with it, this folder must first be initialized as a Git code repository.',
83+
// 'To learn more about how to use Git and source control in VS Code read the docs.',
84+
// /* eslint-enable max-len */
85+
// ]) &&
86+
// isEqual(welcomeButtonTitles, [
87+
// 'Initialize Repository With Git',
88+
// 'Choose a Different Folder',
89+
// ])
90+
// )
91+
// })
92+
// })
93+
// })
9594

9695
describe('VS Code, *before* the workspace is rad-initialized,', () => {
9796
before(async () => {

0 commit comments

Comments
 (0)