-
Notifications
You must be signed in to change notification settings - Fork 471
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
base: main
Are you sure you want to change the base?
Conversation
PR Changes
|
Are you planning to add these tests to the CI pipeline in a seperate PR? |
Yes, I'm adding it in later |
} | ||
|
||
export async function tabToQueryPlanToolbar(vsCodePage: Page): Promise<void> { | ||
// Go to query plan toolbar from main state |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you looked into https://playwright.dev/docs/api/class-framelocator?
eclipse-theia/theia#14896 (reply in thread) They use iframe tho.
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.