Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not activate extension if config is not found #12

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

DudaGod
Copy link
Member

@DudaGod DudaGod commented Oct 1, 2024

No description provided.

@DudaGod DudaGod force-pushed the TESTPLANE-265.do_not_activate_by_default branch from a94a9ad to 6526909 Compare October 2, 2024 09:11
@@ -4,7 +4,7 @@ node_modules
.DS_Store
vscode.d.ts
.eslintcache
samples/**/.*
samples/**/.testplane
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to not ignore .vscode folder

@@ -38,6 +38,16 @@
"name": "Testplane"
}
]
},
"configuration": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The options described in this section are displayed in settings interface

package.json Show resolved Hide resolved
"test-e2e:basic": "wdio run ./tests/e2e/basic/wdio.conf.ts",
"test-e2e:settings-view": "wdio run ./tests/e2e/settings-view/wdio.conf.ts",
"test-e2e:vscode-settings": "wdio run ./tests/e2e/vscode-settings/wdio.conf.ts",
"test-e2e:empty": "wdio run ./tests/e2e/empty/wdio.conf.ts",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I test that extension do nothing on open testing bar

const workerPath = resolve(__dirname, "worker.js");
const configPaths = await vscode.workspace.findFiles(CONFIG_GLOB, CONFIG_GLOB_EXCLUDE);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now config read only in one place and only if user not specify configPath in .vscode/settings.json

"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"extends": "../tsconfig.common.json",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just refactor the same tsconfig files

await fs.mkdir(screenshotDir, { recursive: true });
await browser.saveScreenshot(path.join(screenshotDir, `${test.parent} - ${test.title}.png`));
},
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just refactor the same wdio configs

const [firstSection] = await sidebar.getSections();
const items = await firstSection.getVisibleItems();

expect(items).toHaveLength(0);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I check that nothing render inside Test explorer. It means that Reading Testplane tests is removed

expect(items).toHaveLength(0);

const webview = await vscodePO.getWebviewByTitle("Testplane");
expect(webview.elem).toBeDisplayed();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that Testplane webview displayed.

tests/e2e/vscode-settings/specs/use-vscode-settings.ts Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
src/config/index.ts Outdated Show resolved Hide resolved
src/config/settings.ts Outdated Show resolved Hide resolved
src/config/utils.ts Show resolved Hide resolved
src/config/utils.ts Outdated Show resolved Hide resolved
tests/e2e/vscode-settings/specs/use-vscode-settings.ts Outdated Show resolved Hide resolved
@DudaGod DudaGod force-pushed the TESTPLANE-265.do_not_activate_by_default branch 2 times, most recently from 28dc0a2 to ebc6075 Compare October 7, 2024 09:13
@DudaGod DudaGod force-pushed the TESTPLANE-265.do_not_activate_by_default branch 2 times, most recently from 0149751 to fd81f6f Compare October 7, 2024 10:07
@DudaGod DudaGod force-pushed the TESTPLANE-265.do_not_activate_by_default branch from fd81f6f to 22fab0a Compare October 7, 2024 10:13
@DudaGod DudaGod merged commit fd3b789 into master Oct 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants