-
Notifications
You must be signed in to change notification settings - Fork 220
[QA] set_control
action http request tests
#1436
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
base: qa/set_control_action_dom_elements_tests
Are you sure you want to change the base?
[QA] set_control
action http request tests
#1436
Conversation
View the example dashboards of the current commit live on PyCafe ☕ 🚀Updated on: 2025-10-02 13:01:53 UTC Compare the examples using the commit's wheel file vs the latest released version: vizro-core/examples/scratch_devView with commit's wheel vs View with latest release vizro-core/examples/dev/View with commit's wheel vs View with latest release vizro-core/examples/visual-vocabulary/View with commit's wheel vs View with latest release vizro-core/examples/tutorial/ |
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.
Awesome work, so +1 approval from my side! ✅ 🏅
# filter interaction between charts (3 http) | ||
element = page.locator('path[class="point plotly-customdata"]').nth(20) | ||
box = element.bounding_box() | ||
page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2) | ||
check_http_requests_count(page, http_requests_paths, 5) |
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.
When you remove unnecessary custom action from here https://github.com/mckinsey/vizro/pull/1422/files#r2410395577, the number of https will drop 5 -> 4
. After that, could you explain here in the comment what happens under the hood so that clicking on the graph triggers two instead of one http request (which is intuitively expected number as one action triggers one http). You can explain that implicit actions chain happens and that set_control
implicitly triggers the filter_action
.
# filter interaction between af grid and chart (2 http) | ||
page.get_by_role("gridcell", name="Europe").nth(0).click() | ||
check_http_requests_count(page, http_requests_paths, 4) |
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.
Add similar comment here.
# filter drill_through between charts (3 http) | ||
element = page.locator('path[class="point plotly-customdata"]').nth(20) | ||
box = element.bounding_box() | ||
page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2) | ||
check_http_requests_count(page, http_requests_paths, 5) |
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.
Let's also add a comment here and in other tests below that explain why 3 http requests happen. (set_control + 2 for on page load that happen while opening a targeted page)
|
||
# checking that no additional http has occurred | ||
check_http_requests_count(page, http_requests_paths, 4, sleep=cnst.HTTP_TIMEOUT_LONG) | ||
|
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.
When you add a test(s) for chaining multiple set_control
actions (see this comment), could you also include an additional test(s) here to cover that scenario(s)? Actually, that will be the most important http test for the set_control
feature.
Description
http requests count for
set_control
action drill_through and interactionsNotice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":