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

Added E2E execution plan tests with coverage #18929

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

laurennat
Copy link
Collaborator

@laurennat laurennat commented Mar 12, 2025

Set up playwright infrastructure for collecting coverage on react webviews and testing react webviews. There's also a few really minor changes to some Execution Plan react components, which just make it easier to playwright test them.

This is also only for local testing.

Screenshot 2025-03-12 124128

Copy link

github-actions bot commented Mar 12, 2025

PR Changes

Category Main Branch PR Branch Difference
Code Coverage 51.06% 51.30% $${\color{lightgreen} .24\% }$$
VSIX Size 12989 KB 12983 KB $${\color{lightgreen} -6 KB \space (0\%) }$$
Webview Bundle Size 3196 KB 3192 KB $${\color{lightgreen} -4 KB \space (0\%) }$$

@caohai
Copy link
Member

caohai commented Mar 13, 2025

This is also only for local testing.

Are you planning to add these tests to the CI pipeline in a seperate PR?

@laurennat
Copy link
Collaborator Author

Yes, I'm adding it in later

}

export async function tabToQueryPlanToolbar(vsCodePage: Page): Promise<void> {
// Go to query plan toolbar from main state
Copy link
Contributor

@aasimkhan30 aasimkhan30 Mar 14, 2025

Choose a reason for hiding this comment

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

I don't know if this will be scalable. Should we think about creating mock vscode socket and run these the webview panels in the browser? I think we were doing something similar for Fabric.

vsCodePage,
"Actual Number of Rows For All Executions",
);
await checkScreenshot(
Copy link
Contributor

Choose a reason for hiding this comment

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

What does check screenshot functionality do exactly? Since we cannot access contents on the page, how will we check if our key downs are having intended effect?


For the bulk of the Playwright testing within the react webviews, we test the functionality by comparing screenshots of the expected results to the current test state.

We can't use playwright's builtin locator functions, because VSCode webviews are sandboxed- due to cross-origin restrictions, their HTML content can't be accessed outside the webview context (which unfortunately is where the Playwright test suite is run).
Copy link
Member

@caohai caohai Mar 14, 2025

Choose a reason for hiding this comment

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

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.

3 participants