提交 378618f8 编写于 作者: T Tomas Vik

Merge branch '359-temp-disable-version-warning' into 'main'

fix: temporarily disable version warning

See merge request gitlab-org/gitlab-vscode-extension!285
......@@ -48,6 +48,7 @@ describe('check_version', () => {
${'13.5.0'}
${'13.6.3'}
${'13.6.0-pre'}
${'13.12.4'}
${'abc13.5def'}
`('gets $version successfully', async ({ version }) => {
mockedRepositories = [createMockRepo(`${version}`)];
......@@ -56,7 +57,7 @@ describe('check_version', () => {
expect(vscode.window.showErrorMessage).not.toHaveBeenCalled();
});
it(`shows warning when version is below 13.5`, async () => {
xit(`shows warning when version is below 13.5`, async () => {
mockedRepositories = [createMockRepo(`13.4.2`)];
await getVersionForEachRepo(gitExtensionWrapper, context as vscode.ExtensionContext);
......@@ -71,7 +72,7 @@ describe('check_version', () => {
expect(logMock.log).toHaveBeenCalledWith(`Could not match version from "${BAD_VERSION}"`);
});
it('stores user preference for not showing the warning', async () => {
xit('stores user preference for not showing the warning', async () => {
mockedRepositories = [createMockRepo('13.4')];
(vscode.window.showErrorMessage as jest.Mock).mockResolvedValue('Do not show again');
......
......@@ -27,12 +27,12 @@ export const getVersionForEachRepo = async (
log(warningMessage);
if (!context.workspaceState.get(DO_NOT_SHOW_VERSION_WARNING)) {
const action = await vscode.window.showErrorMessage(warningMessage, DO_NOT_SHOW_AGAIN_TEXT);
// if (!context.workspaceState.get(DO_NOT_SHOW_VERSION_WARNING)) {
// const action = await vscode.window.showErrorMessage(warningMessage, DO_NOT_SHOW_AGAIN_TEXT);
if (action === DO_NOT_SHOW_AGAIN_TEXT)
await context.workspaceState.update(DO_NOT_SHOW_VERSION_WARNING, true);
}
// if (action === DO_NOT_SHOW_AGAIN_TEXT)
// await context.workspaceState.update(DO_NOT_SHOW_VERSION_WARNING, true);
// }
}),
).catch(error => log(error));
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册