tests: an element handle serves every method of the client, queries and states of the node, its gestures, a handle of what a function returned (red: 16 of the 17 answer 'a gap', 64 tests fail) (+64 unit, +22 e2e)
This commit is contained in:
1 parent
929ed9df3a
commit
b3d9f167a0
3 files changed
+614
-4
No files matched your search
@@ -14,14 +14,14 @@
|
||||
{"id": "wrapper.e2e.fakeweb", "giro": "G2", "os": ["linux", "windows"], "min_tests": 4, "exact": true, "tests": ["tests/test_fakeweb_p2_e2e.py", "tests/test_fakeweb_p4_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The fake web, offline: our browser on the hard pages (profile P2: a reused routed page reaches networkidle every time, also under a load of three other browsers; the other site is another process) and on the 17-step journey of a person (profile P4), each judged against what stock Firefox does, as tests/fakeweb/pages.json declares it. 4 = 3 + 1. Stock itself is held to that declaration, and compared with ours step by step, by scripts/run_fakeweb.py in .github/workflows/fakeweb.yml. Needs the candidate binary (STEALTHFOX_E2E_BINARY)."},
|
||||
{"id": "wrapper.e2e.fontconfig", "giro": "G2", "os": ["linux"], "min_tests": 2, "exact": true, "tests": ["tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py"], "marker": "e2e", "needs_root": false, "linux_only": "Fontconfig exists only on Linux: the parent of the engine shows <GRE>/fonts to it (FcConfigAppFontAddDir) to rebuild a font from a path and a face index. On Windows DirectWrite opens the file from its path, with no folder to scan and no cache to read, so this test has no Windows counterpart.", "note": "2 = (1) the stand-in that runs the engine under strace stays in the engine's place, as the core launches it (the leader of a process group of its own): a fake engine with a child, no browser; the process the launcher holds lives as long as the fake engine, and the group killed holds strace and the child (the stand-in that exec'd setsid forked and exited 0 at once: candidate 44161687675); (2) the warm launch of the parent reads the bundle from fontconfig's cache and does not scan it again (from firefox-66, engine_at_least). Two launches under strace with the same XDG_CACHE_HOME of the test, the first cold and the second warm: the cold parent opens every font file of <GRE>/fonts (the folder as the disk lists it) before any page and fontconfig writes its cache; the warm parent does not open every one of them, and it opens a *.cache-* file of fontconfig (a few files are opened to be used, so the verdict asks about the whole folder, as a scan does). Scan and drawing are told apart by position: only what the parent opens before the first page counts (the opens that draw are written as after_startup). Evidence in RUNNER_TEMP/invpw-evidence/fontconfig-cache: the interval and the number of opens of the bundle, the names of the files of the bundle each launch opened before the first page, the size of the cache file, the VmRSS of the parent after about:blank and after a page with every family, and a third launch with gfx.bundled-fonts.activate=0 (the behaviour before), which is evidence only. Needs strace on the runner: without it both are red, not skipped. No threshold."},
|
||||
{"id": "wrapper.unit.compositing", "giro": "G1", "os": ["linux", "windows"], "min_tests": 30, "exact": true, "tests": ["tests/test_the_page_bytes_reference_compares_decoded_pixels.py"], "marker": "unit", "needs_root": false, "note": "The helpers of wrapper.e2e.compositing on known inputs, no browser: the PNG compared on decoded pixels (another deBG chunk and compression are the same, one pixel is not, every scanline filter), the comparison with a reference (changed, missing and extra keys named, the entry to record), the type of an engine process, an engine process known by its executable and not by the name it gives itself (Linux), and the CPU of a window, and the shape of the committed Windows reference, and the box cut out of a screenshot (its pixels, a box outside the picture refused, written as a PNG and read back, two boxes told apart by a pixel that is named, the pixels that are not grey)."},
|
||||
{"id": "wrapper.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 2533, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_launch_counters_run_on_github.py", "tests/test_launcher_config.py", "tests/test_launcher_helpers.py", "tests/test_motion_never_hides_a_programming_error.py", "tests/test_moving_page_model.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_no_event_of_any_family_is_lost_by_the_hand_over.py", "tests/test_no_legacy_in_the_wrapper.py", "tests/testLine truncated
|
||||
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 2534, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_launch_counters_run_on_github.py", "tests/test_launcher_config.py", "tests/test_launcher_helpers.py", "tests/test_motion_never_hides_a_programming_error.py", "tests/test_moving_page_model.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_no_event_of_any_family_is_lost_by_the_hand_over.py", "tests/test_no_legacy_in_the_wrapper.py", "tests/test_no_override_leaves_the_persona_Line truncated
|
||||
{"id": "wrapper.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 2597, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_launch_counters_run_on_github.py", "tests/test_launcher_config.py", "tests/test_launcher_helpers.py", "tests/test_motion_never_hides_a_programming_error.py", "tests/test_moving_page_model.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_no_event_of_any_family_is_lost_by_theLine truncated
|
||||
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 2598, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_held_request_of_the_journey_starts_after_the_load.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_every_wire_method_is_served_or_refused.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_launch_counters_run_on_github.py", "tests/test_launcher_config.py", "tests/test_launcher_helpers.py", "tests/test_motion_never_hides_a_programming_error.py", "tests/test_moving_page_model.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_no_event_of_any_family_is_lost_by_the_hand_over.py", "tests/test_no_lLine truncated
|
||||
{"id": "wrapper.e2e.securitystate", "giro": "G2", "os": ["linux", "windows"], "min_tests": 4, "exact": true, "tests": ["tests/test_security_state_engine_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The security state the core declares, against the engine: the engine launched directly in its generate mode makes what it is given (the contract's result, security_state/ with the bytes of the full filter and of the delta, the core's own validation of it); a normal launch declares no pref of the mode and re-imports nothing; a certificate that Mozilla's CRLite test data say is revoked in a delta is refused at the first navigation (SEC_ERROR_REVOKED_CERTIFICATE) while a valid one loads, and the revoked one loads when the ready directory has no data; a ready directory with no or an empty security_state/ starts. Certificates made on the run (a fresh root trusted in cert9.db by the engine's own xpcshell, Mozilla's default test key as the key of CN=int), servers on loopback, no network. Red on firefox-67 (no generate mode)."},
|
||||
{"id": "wrapper.e2e.suite.linux.1", "giro": "G2", "os": ["linux"], "min_tests": 377, "exact": true, "tests": ["tests/test_a_closed_browser_leaves_the_others_alone_e2e.py", "tests/test_a_context_that_ends_leaves_no_process_e2e.py", "tests/test_a_cors_preflight_is_not_a_request_of_the_page_e2e.py", "tests/test_a_declared_webgl_extension_survives_its_use_e2e.py", "tests/test_a_granted_permission_is_the_one_the_page_asks_for_e2e.py", "tests/test_a_held_ice_port_blinds_the_loopback_checks_e2e.py", "tests/test_a_launch_without_a_session_gets_one_e2e.py", "tests/test_a_left_documents_body_is_evicted_e2e.py", "tests/test_a_mouse_click_makes_one_mousemove_on_its_point_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py", "tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py", "tests/test_a_served_browser_answers_a_plain_client_e2e.py", "tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py", "tests/test_accept_language_on_the_wire_e2e.py", "tests/test_browser_output_is_drained.py", "tests/test_click_rhythm.py", "tests/test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py", "tests/test_control_a_selects_all_in_a_field_e2e.py", "tests/test_cross_origin_iframe.py", "tests/test_declared_host_network_e2e.py", "tests/test_detectors_e2e.py", "tests/test_e2e.py", "tests/test_element_handle_actions.py", "tests/test_element_screenshot_e2e.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_file_chooser.py", "tests/test_fingerprint_surface.py", "tests/test_fission_frames_history_and_processes_e2e.py", "tests/test_fission_frames_workers_storage_and_special_frames_e2e.py", "tests/test_frames_outlive_the_back_forward_cache_e2e.py", "tests/test_goto_networkidle_after_spa_e2e.py", "tests/test_goto_script_redirect_e2e.py", "tests/test_hidden_display_linux.py", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_the_ice_name_of_a_context_goes_by_the_proxy_of_that_context", "tests/test_ignore_https_errors_e2e.py", "tests/test_injected_node_surface.py", "tests/test_juggler_connection.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transport.py", "tests/test_navigation_across_processes_e2e.py", "tests/test_navigation_response.py", "tests/test_networkidle_reaches_the_client_e2e.py", "tests/test_oop_frame_element.py", "tests/test_oop_frame_geometry.py", "tests/test_page_number_follows_the_call.py", "tests/test_persistent_profile_keeps_state.py", "tests/test_pointer_position.py", "tests/test_popups_reach_the_client_e2e.py", "tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py", "tests/test_realness_behind_a_declared_exit_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_route_header_order_e2e.py", "tests/test_same_document_goto_e2e.py", "tests/test_screencast.py", "tests/test_screencast_stop_e2e.py", "tests/test_screenshot_looks_where_you_are.py", "tests/test_security_state_engine_e2e.py", "tests/test_service_worker.py", "tests/test_service_worker_controller_e2e.py", "tests/test_set_offline_e2e.py", "tests/test_shadow_trusted_input.py", "tests/test_strict_and_force.py", "tests/test_the_callers_code_is_not_counted_e2e.py", "tests/test_the_device_enumeration_takes_the_declared_time_e2e.py", "tests/test_the_engine_is_born_in_the_job_e2e.py::test_a_launch_scans_no_process_of_the_machine", "tests/test_the_engine_is_born_in_the_job_e2e.py::test_after_close_no_process_of_the_session_is_left", "tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_trial_does_not_act.py", "tests/test_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_ua_widget_not_selectable.py", "tests/test_voices_e2e.py", "tests/test_wait_for_function.py", "tests/test_webgl_draws_on_the_engine_s_own_gl_e2e.py", "tests/test_webgl_noise_active.py", "tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_not_blocked_behind_tcp_only_socks", "tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away", "tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_ofLine truncated
|
||||
{"id": "wrapper.e2e.suite.linux.2", "giro": "G2", "os": ["linux"], "min_tests": 411, "exact": true, "tests": ["tests/test_a_click_waits_for_the_navigation_it_plans_e2e.py", "tests/test_a_context_init_script_runs_once_e2e.py", "tests/test_a_drag_keeps_its_buttons_pressed_e2e.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_goto_to_a_response_with_no_document_ends_e2e.py", "tests/test_a_keepalive_request_reaches_the_client_e2e.py", "tests/test_a_latin_letter_on_a_cyrillic_persona_e2e.py", "tests/test_a_page_cannot_probe_the_juggler_e2e.py", "tests/test_a_page_that_moves_on_e2e.py", "tests/test_a_pointer_event_is_handled_before_the_call_returns_e2e.py", "tests/test_a_request_says_what_it_is_e2e.py", "tests/test_a_worker_comes_back_with_its_page_from_the_cache_e2e.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_isolated_page_and_the_next_e2e.py", "tests/test_bypass_csp_e2e.py", "tests/test_caller_world_handles_e2e.py", "tests/test_canvas_reads_as_drawn.py", "tests/test_canvas_render_stealth.py", "tests/test_context_locale_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_download_is_intercepted_e2e.py", "tests/test_drag_motion.py", "tests/test_expose_binding_e2e.py", "tests/test_fakeweb_p4_e2e.py", "tests/test_fingerprint_consistency.py", "tests/test_fission_frames_dialogs_downloads_popups_e2e.py", "tests/test_fission_frames_route_and_bindings_e2e.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fission_iframe_crash_e2e.py", "tests/test_fission_strategy1_bench.py", "tests/test_goto_to_the_same_url_e2e.py", "tests/test_http3_through_the_proxy_e2e.py", "tests/test_input_is_born_before_the_page_sees_it_e2e.py", "tests/test_juggler_actions.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py::test_a_javascript_that_THROWS_arrives_as_an_error_not_as_None", "tests/test_juggler_injected.py::test_actionability_DISTINGUISHES_instead_of_always_saying_yes", "tests/test_juggler_injected.py::test_reads_that_make_no_sense_are_REJECTED", "tests/test_juggler_injected.py::test_states_DISCRIMINATE_instead_of_always_saying_true", "tests/test_juggler_injected.py::test_the_DOM_READING_group", "tests/test_juggler_injected.py::test_the_selector_engines_respond", "tests/test_juggler_injected.py::test_the_text_reads", "tests/test_juggler_lifecycle_e2e.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_long_session_e2e.py", "tests/test_mouse.py", "tests/test_mouse_events_keep_their_values_e2e.py", "tests/test_new_page_defaults.py", "tests/test_popup_destinations_e2e.py", "tests/test_popup_pages.py", "tests/test_proxy_http_auth_e2e.py", "tests/test_proxy_reaches_the_browser.py", "tests/test_proxy_socks_auth_e2e.py", "tests/test_requestless_navigation.py", "tests/test_route_abort_code.py", "tests/test_route_e2e.py", "tests/test_route_post_data_e2e.py", "tests/test_route_sends_a_navigation_elsewhere_e2e.py", "tests/test_route_superseded_e2e.py", "tests/test_same_document_navigation.py", "tests/test_screenshot_of_text_returns_linux_e2e.py", "tests/test_scroll_into_view.py", "tests/test_scroll_only_if_needed_e2e.py", "tests/test_service_workers_blocked.py", "tests/test_set_input_files_payloads.py", "tests/test_software_compositing_is_declared_e2e.py", "tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py", "tests/test_the_callers_code_runs_once_e2e.py", "tests/test_the_close_returns_when_the_browser_has_exited_e2e.py", "tests/test_the_favicon_stays_out_of_sight_e2e.py", "tests/test_the_font_list_is_the_bundle_e2e.py", "tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py", "tests/test_the_scheme_is_the_personas_e2e.py", "tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_when_the_exit_of_the_lab_is_loopback", "tests/test_typing_a_character_without_a_key_e2e.py", "tests/test_wait_for_timeout.py", "tests/test_web_fonts_of_closed_contexts_e2e.py"], "marker": "e2e", "needs_root": false, "windows_twin": "wrapper.e2e.suite.windows.2", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 2 rows of linux are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 564 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapLine truncated
|
||||
{"id": "wrapper.e2e.suite.linux.3", "giro": "G2", "os": ["linux"], "min_tests": 269, "exact": true, "tests": ["tests/test_a_click_in_an_iframe_lands_at_the_frames_own_screen_origin_e2e.py", "tests/test_a_context_language_is_the_accept_language_of_every_request_e2e.py", "tests/test_a_goto_to_a_refused_port_ends_with_its_reason_e2e.py", "tests/test_a_launch_and_a_context_timezone_reach_the_page_e2e.py", "tests/test_a_navigation_that_moved_is_told_by_the_engine_e2e.py", "tests/test_a_popup_of_a_link_reaches_the_client_e2e.py", "tests/test_a_regional_indicator_pair_measures_the_same_first_and_after_other_families_e2e.py", "tests/test_audio_context_values_are_declared_e2e.py", "tests/test_audio_noise_e2e.py", "tests/test_audio_sample_rate_is_declared_e2e.py", "tests/test_bundle_font_names_e2e.py", "tests/test_canvas_create_pattern_projection_e2e.py", "tests/test_canvas_measure_text_metrics_e2e.py", "tests/test_css_media_reads_the_declared_screen_and_pointer_e2e.py", "tests/test_dom_iterables_from_evaluate_e2e.py", "tests/test_every_argument_reaches_the_page_e2e.py", "tests/test_every_reader_of_a_webgl_canvas_agrees_e2e.py", "tests/test_fakeweb_p2_e2e.py", "tests/test_fission_frames_tree_input_and_pixels_e2e.py", "tests/test_focus_survives_os_deactivation_e2e.py", "tests/test_fullscreen_without_wm_e2e.py", "tests/test_geolocation_reads_nothing_of_the_host_windows_e2e.py", "tests/test_goto_and_every_way_it_is_stopped_e2e.py", "tests/test_hardware_values_are_declared_e2e.py", "tests/test_ipv6_literal_connect_e2e.py", "tests/test_moz_element_paints_a_webgl_canvas_as_drawn_e2e.py", "tests/test_native_line_endings_are_windows_e2e.py", "tests/test_nested_frame_actions.py", "tests/test_networkidle_through_a_served_browser_with_routes_e2e.py", "tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py", "tests/test_page_element_atoms_run_in_a_sandbox_e2e.py", "tests/test_popup_geometry_is_the_declared_frame_e2e.py", "tests/test_script_cache_written_is_adopted_e2e.py", "tests/test_the_branding_a_page_loads_is_the_declared_archive_e2e.py", "tests/test_the_evaluated_code_has_no_debugger_name_e2e.py", "tests/test_the_host_gl_probe_runs_only_on_an_undeclared_engine_linux_e2e.py", "tests/test_the_launch_counter_is_one_plain_get_before_any_page_e2e.py", "tests/test_the_shutdown_ping_leaves_by_the_background_task_e2e.py", "tests/test_webgl_declared_parameters_e2e.py", "tests/test_webgl_shader_language_e2e.py", "tests/test_webgpu_adapter_is_declared_e2e.py", "tests/test_webgpu_canvas_readback_is_noised_e2e.py", "tests/test_webgpu_external_texture_e2e.py", "tests/test_window_occlusion_e2e.py"], "marker": "e2e", "needs_root": false, "windows_twin": "wrapper.e2e.suite.windows.3", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 2 rows of linux are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 565 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on linux (a skip is red in the verdict)."},
|
||||
{"id": "wrapper.e2e.suite.linux.3", "giro": "G2", "os": ["linux"], "min_tests": 291, "exact": true, "tests": ["tests/test_a_click_in_an_iframe_lands_at_the_frames_own_screen_origin_e2e.py", "tests/test_a_context_language_is_the_accept_language_of_every_request_e2e.py", "tests/test_a_goto_to_a_refused_port_ends_with_its_reason_e2e.py", "tests/test_a_launch_and_a_context_timezone_reach_the_page_e2e.py", "tests/test_a_navigation_that_moved_is_told_by_the_engine_e2e.py", "tests/test_a_popup_of_a_link_reaches_the_client_e2e.py", "tests/test_a_regional_indicator_pair_measures_the_same_first_and_after_other_families_e2e.py", "tests/test_an_element_handle_serves_every_method_of_the_client_e2e.py", "tests/test_audio_context_values_are_declared_e2e.py", "tests/test_audio_noise_e2e.py", "tests/test_audio_sample_rate_is_declared_e2e.py", "tests/test_bundle_font_names_e2e.py", "tests/test_canvas_create_pattern_projection_e2e.py", "tests/test_canvas_measure_text_metrics_e2e.py", "tests/test_css_media_reads_the_declared_screen_and_pointer_e2e.py", "tests/test_dom_iterables_from_evaluate_e2e.py", "tests/test_every_argument_reaches_the_page_e2e.py", "tests/test_every_reader_of_a_webgl_canvas_agrees_e2e.py", "tests/test_fakeweb_p2_e2e.py", "tests/test_fission_frames_tree_input_and_pixels_e2e.py", "tests/test_focus_survives_os_deactivation_e2e.py", "tests/test_fullscreen_without_wm_e2e.py", "tests/test_geolocation_reads_nothing_of_the_host_windows_e2e.py", "tests/test_goto_and_every_way_it_is_stopped_e2e.py", "tests/test_hardware_values_are_declared_e2e.py", "tests/test_ipv6_literal_connect_e2e.py", "tests/test_moz_element_paints_a_webgl_canvas_as_drawn_e2e.py", "tests/test_native_line_endings_are_windows_e2e.py", "tests/test_nested_frame_actions.py", "tests/test_networkidle_through_a_served_browser_with_routes_e2e.py", "tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py", "tests/test_page_element_atoms_run_in_a_sandbox_e2e.py", "tests/test_popup_geometry_is_the_declared_frame_e2e.py", "tests/test_script_cache_written_is_adopted_e2e.py", "tests/test_the_branding_a_page_loads_is_the_declared_archive_e2e.py", "tests/test_the_evaluated_code_has_no_debugger_name_e2e.py", "tests/test_the_host_gl_probe_runs_only_on_an_undeclared_engine_linux_e2e.py", "tests/test_the_launch_counter_is_one_plain_get_before_any_page_e2e.py", "tests/test_the_shutdown_ping_leaves_by_the_background_task_e2e.py", "tests/test_webgl_declared_parameters_e2e.py", "tests/test_webgl_shader_language_e2e.py", "tests/test_webgpu_adapter_is_declared_e2e.py", "tests/test_webgpu_canvas_readback_is_noised_e2e.py", "tests/test_webgpu_external_texture_e2e.py", "tests/test_window_occlusion_e2e.py"], "marker": "e2e", "needs_root": false, "windows_twin": "wrapper.e2e.suite.windows.3", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 2 rows of linux are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 565 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on linux (a skip is red in the verdict)."},
|
||||
{"id": "wrapper.e2e.suite.windows.1", "giro": "G2", "os": ["windows"], "min_tests": 261, "exact": true, "tests": ["tests/test_a_click_waits_for_the_navigation_it_plans_e2e.py", "tests/test_a_closed_browser_leaves_the_others_alone_e2e.py", "tests/test_a_context_init_script_runs_once_e2e.py", "tests/test_a_goto_to_a_refused_port_ends_with_its_reason_e2e.py", "tests/test_a_granted_permission_is_the_one_the_page_asks_for_e2e.py", "tests/test_a_held_ice_port_blinds_the_loopback_checks_e2e.py", "tests/test_a_left_documents_body_is_evicted_e2e.py", "tests/test_a_page_cannot_probe_the_juggler_e2e.py", "tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py", "tests/test_a_worker_comes_back_with_its_page_from_the_cache_e2e.py", "tests/test_browser_output_is_drained.py", "tests/test_canvas_create_pattern_projection_e2e.py", "tests/test_click_rhythm.py", "tests/test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py", "tests/test_context_locale_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_detectors_e2e.py", "tests/test_download_is_intercepted_e2e.py", "tests/test_e2e.py", "tests/test_element_handle_actions.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_reader_of_a_webgl_canvas_agrees_e2e.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fission_iframe_crash_e2e.py", "tests/test_focus_survives_os_deactivation_e2e.py", "tests/test_geolocation_reads_nothing_of_the_host_windows_e2e.py", "tests/test_goto_to_the_same_url_e2e.py", "tests/test_ignore_https_errors_e2e.py", "tests/test_juggler_actions.py", "tests/test_juggler_transport.py", "tests/test_keyboard_rhythm.py", "tests/test_moz_element_paints_a_webgl_canvas_as_drawn_e2e.py", "tests/test_nested_frame_actions.py", "tests/test_popups_reach_the_client_e2e.py", "tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py", "tests/test_route_superseded_e2e.py", "tests/test_scroll_only_if_needed_e2e.py", "tests/test_security_state_engine_e2e.py", "tests/test_service_worker.py", "tests/test_service_workers_blocked.py", "tests/test_strict_and_force.py", "tests/test_the_engine_is_born_in_the_job_e2e.py", "tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_the_shutdown_ping_leaves_by_the_background_task_e2e.py", "tests/test_trial_does_not_act.py", "tests/test_ua_widget_not_selectable.py", "tests/test_webgpu_canvas_readback_is_noised_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.1", "note": "Part 1 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 609 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict)."},
|
||||
{"id": "wrapper.e2e.suite.windows.2", "giro": "G2", "os": ["windows"], "min_tests": 246, "exact": true, "tests": ["tests/test_a_goto_to_a_response_with_no_document_ends_e2e.py", "tests/test_a_latin_letter_on_a_cyrillic_persona_e2e.py", "tests/test_a_navigation_that_moved_is_told_by_the_engine_e2e.py", "tests/test_a_regional_indicator_pair_measures_the_same_first_and_after_other_families_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py", "tests/test_add_script_tag.py", "tests/test_an_isolated_page_and_the_next_e2e.py", "tests/test_audio_context_values_are_declared_e2e.py", "tests/test_bundle_font_names_e2e.py", "tests/test_caller_world_handles_e2e.py", "tests/test_canvas_reads_as_drawn.py", "tests/test_canvas_render_stealth.py", "tests/test_css_media_reads_the_declared_screen_and_pointer_e2e.py", "tests/test_declared_host_network_e2e.py", "tests/test_every_argument_reaches_the_page_e2e.py", "tests/test_expose_binding_e2e.py", "tests/test_fission_frames_dialogs_downloads_popups_e2e.py", "tests/test_fullscreen_without_wm_e2e.py", "tests/test_goto_networkidle_after_spa_e2e.py", "tests/test_goto_script_redirect_e2e.py", "tests/test_hidden_desktop.py", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_the_ice_name_of_a_context_goes_by_the_proxy_of_that_context", "tests/test_juggler_lifecycle_e2e.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_long_session_e2e.py", "tests/test_mouse.py", "tests/test_native_line_endings_are_windows_e2e.py", "tests/test_navigation_across_processes_e2e.py", "tests/test_networkidle_reaches_the_client_e2e.py", "tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py", "tests/test_oop_frame_geometry.py", "tests/test_proxy_socks_auth_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_route_e2e.py", "tests/test_screencast_stop_e2e.py", "tests/test_the_branding_a_page_loads_is_the_declared_archive_e2e.py", "tests/test_the_device_enumeration_takes_the_declared_time_e2e.py", "tests/test_the_evaluated_code_has_no_debugger_name_e2e.py", "tests/test_the_favicon_stays_out_of_sight_e2e.py", "tests/test_the_font_list_is_the_bundle_e2e.py", "tests/test_the_scheme_is_the_personas_e2e.py", "tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_when_the_exit_of_the_lab_is_loopback", "tests/test_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_voices_e2e.py", "tests/test_wait_for_function.py", "tests/test_wait_for_timeout.py", "tests/test_web_fonts_of_closed_contexts_e2e.py", "tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_not_blocked_behind_tcp_only_socks", "tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away", "tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_of_its_own"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.2", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 610 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict)."},
|
||||
{"id": "wrapper.e2e.suite.windows.2", "giro": "G2", "os": ["windows"], "min_tests": 268, "exact": true, "tests": ["tests/test_a_goto_to_a_response_with_no_document_ends_e2e.py", "tests/test_a_latin_letter_on_a_cyrillic_persona_e2e.py", "tests/test_a_navigation_that_moved_is_told_by_the_engine_e2e.py", "tests/test_a_regional_indicator_pair_measures_the_same_first_and_after_other_families_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client_e2e.py", "tests/test_an_isolated_page_and_the_next_e2e.py", "tests/test_audio_context_values_are_declared_e2e.py", "tests/test_bundle_font_names_e2e.py", "tests/test_caller_world_handles_e2e.py", "tests/test_canvas_reads_as_drawn.py", "tests/test_canvas_render_stealth.py", "tests/test_css_media_reads_the_declared_screen_and_pointer_e2e.py", "tests/test_declared_host_network_e2e.py", "tests/test_every_argument_reaches_the_page_e2e.py", "tests/test_expose_binding_e2e.py", "tests/test_fission_frames_dialogs_downloads_popups_e2e.py", "tests/test_fullscreen_without_wm_e2e.py", "tests/test_goto_networkidle_after_spa_e2e.py", "tests/test_goto_script_redirect_e2e.py", "tests/test_hidden_desktop.py", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_the_ice_name_of_a_context_goes_by_the_proxy_of_that_context", "tests/test_juggler_lifecycle_e2e.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_long_session_e2e.py", "tests/test_mouse.py", "tests/test_native_line_endings_are_windows_e2e.py", "tests/test_navigation_across_processes_e2e.py", "tests/test_networkidle_reaches_the_client_e2e.py", "tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py", "tests/test_oop_frame_geometry.py", "tests/test_proxy_socks_auth_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_route_e2e.py", "tests/test_screencast_stop_e2e.py", "tests/test_the_branding_a_page_loads_is_the_declared_archive_e2e.py", "tests/test_the_device_enumeration_takes_the_declared_time_e2e.py", "tests/test_the_evaluated_code_has_no_debugger_name_e2e.py", "tests/test_the_favicon_stays_out_of_sight_e2e.py", "tests/test_the_font_list_is_the_bundle_e2e.py", "tests/test_the_scheme_is_the_personas_e2e.py", "tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_when_the_exit_of_the_lab_is_loopback", "tests/test_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_voices_e2e.py", "tests/test_wait_for_function.py", "tests/test_wait_for_timeout.py", "tests/test_web_fonts_of_closed_contexts_e2e.py", "tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_not_blocked_behind_tcp_only_socks", "tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away", "tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_of_its_own"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.2", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 610 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict)."},
|
||||
{"id": "wrapper.e2e.suite.windows.3", "giro": "G2", "os": ["windows"], "min_tests": 273, "exact": true, "tests": ["tests/test_a_click_in_an_iframe_lands_at_the_frames_own_screen_origin_e2e.py", "tests/test_a_context_that_ends_leaves_no_process_e2e.py", "tests/test_a_cors_preflight_is_not_a_request_of_the_page_e2e.py", "tests/test_a_launch_without_a_session_gets_one_e2e.py", "tests/test_a_mouse_click_makes_one_mousemove_on_its_point_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_a_served_browser_answers_a_plain_client_e2e.py", "tests/test_actions_without_a_point.py", "tests/test_audio_noise_e2e.py", "tests/test_audio_sample_rate_is_declared_e2e.py", "tests/test_bypass_csp_e2e.py", "tests/test_control_a_selects_all_in_a_field_e2e.py", "tests/test_cross_origin_iframe.py", "tests/test_dom_iterables_from_evaluate_e2e.py", "tests/test_drag_motion.py", "tests/test_element_screenshot_e2e.py", "tests/test_fakeweb_p4_e2e.py", "tests/test_fingerprint_consistency.py", "tests/test_first_launch_from_a_new_path.py", "tests/test_fission_frames_history_and_processes_e2e.py", "tests/test_fission_frames_workers_storage_and_special_frames_e2e.py", "tests/test_fission_strategy1_bench.py", "tests/test_goto_and_every_way_it_is_stopped_e2e.py", "tests/test_http3_through_the_proxy_e2e.py", "tests/test_input_is_born_before_the_page_sees_it_e2e.py", "tests/test_ipv6_literal_connect_e2e.py", "tests/test_networkidle_through_a_served_browser_with_routes_e2e.py", "tests/test_page_number_follows_the_call.py", "tests/test_persistent_profile_keeps_state.py", "tests/test_pointer_position.py", "tests/test_popup_destinations_e2e.py", "tests/test_popup_pages.py", "tests/test_proxy_http_auth_e2e.py", "tests/test_requestless_navigation.py", "tests/test_route_abort_code.py", "tests/test_route_post_data_e2e.py", "tests/test_same_document_navigation.py", "tests/test_screencast.py", "tests/test_screenshot_looks_where_you_are.py", "tests/test_service_worker_controller_e2e.py", "tests/test_set_input_files_payloads.py", "tests/test_set_offline_e2e.py", "tests/test_the_callers_code_is_not_counted_e2e.py", "tests/test_the_callers_code_runs_once_e2e.py", "tests/test_the_close_returns_when_the_browser_has_exited_e2e.py", "tests/test_the_launch_counter_is_one_plain_get_before_any_page_e2e.py", "tests/test_webgl_declared_parameters_e2e.py", "tests/test_webgl_shader_language_e2e.py", "tests/test_webgpu_adapter_is_declared_e2e.py", "tests/test_webgpu_external_texture_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.1", "note": "Part 3 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 610 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict)."},
|
||||
{"id": "wrapper.e2e.suite.windows.4", "giro": "G2", "os": ["windows"], "min_tests": 270, "exact": true, "tests": ["tests/test_a_context_language_is_the_accept_language_of_every_request_e2e.py", "tests/test_a_declared_webgl_extension_survives_its_use_e2e.py", "tests/test_a_drag_keeps_its_buttons_pressed_e2e.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_keepalive_request_reaches_the_client_e2e.py", "tests/test_a_launch_and_a_context_timezone_reach_the_page_e2e.py", "tests/test_a_page_that_moves_on_e2e.py", "tests/test_a_pointer_event_is_handled_before_the_call_returns_e2e.py", "tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py", "tests/test_a_popup_of_a_link_reaches_the_client_e2e.py", "tests/test_a_request_says_what_it_is_e2e.py", "tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py", "tests/test_accept_language_on_the_wire_e2e.py", "tests/test_canvas_measure_text_metrics_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_fakeweb_p2_e2e.py", "tests/test_file_chooser.py", "tests/test_fingerprint_surface.py", "tests/test_fission_frames_route_and_bindings_e2e.py", "tests/test_fission_frames_tree_input_and_pixels_e2e.py", "tests/test_frames_outlive_the_back_forward_cache_e2e.py", "tests/test_hardware_values_are_declared_e2e.py", "tests/test_injected_node_surface.py", "tests/test_juggler_connection.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py::test_a_javascript_that_THROWS_arrives_as_an_error_not_as_None", "tests/test_juggler_injected.py::test_actionability_DISTINGUISHES_instead_of_always_saying_yes", "tests/test_juggler_injected.py::test_reads_that_make_no_sense_are_REJECTED", "tests/test_juggler_injected.py::test_states_DISCRIMINATE_instead_of_always_saying_true", "tests/test_juggler_injected.py::test_the_DOM_READING_group", "tests/test_juggler_injected.py::test_the_selector_engines_respond", "tests/test_juggler_injected.py::test_the_text_reads", "tests/test_mouse_events_keep_their_values_e2e.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_oop_frame_element.py", "tests/test_page_element_atoms_run_in_a_sandbox_e2e.py", "tests/test_popup_geometry_is_the_declared_frame_e2e.py", "tests/test_proxy_reaches_the_browser.py", "tests/test_realness_behind_a_declared_exit_e2e.py", "tests/test_route_header_order_e2e.py", "tests/test_route_sends_a_navigation_elsewhere_e2e.py", "tests/test_same_document_goto_e2e.py", "tests/test_script_cache_written_is_adopted_e2e.py", "tests/test_scroll_into_view.py", "tests/test_shadow_trusted_input.py", "tests/test_software_compositing_is_declared_e2e.py", "tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py", "tests/test_typing_a_character_without_a_key_e2e.py", "tests/test_webgl_noise_active.py", "tests/test_window_occlusion_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.2", "note": "Part 4 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 609 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict)."},
|
||||
{"id": "wrapper.e2e.suite.windows.control_a", "giro": "G2", "os": ["windows"], "min_tests": 20, "exact": true, "tests": ["tests/test_control_a_selects_all_in_a_field_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.1", "note": "The keyboard shortcut Control+A selects all in a field (5 ways to press it x an input and a textarea, in-process and served to the stock client), alone on its own Windows runner (windows-latest), as e2e.yml runs it on the published engine: the Windows keyboard of a real user is what it needs. The same file is in one of wrapper.e2e.suite.windows.1..4 and in wrapper.e2e.suite.linux.1."}
|
||||
|
||||
@@ -0,0 +1,392 @@
|
||||
"""An element handle answers every method the client sends it, with what Playwright's own server answers, through the paths the rest of the server already has.
|
||||
|
||||
THE CLIENT'S `ElementHandle` (`_pw/_impl/_element_handle.py`) SENDS 55 WIRE METHODS AND `ElementHandleDispatcher` HAD A ROW FOR 38. The other 17 were answered
|
||||
"ElementHandle has no method 'x', and 'x' is INSIDE the perimeter this package covers - so this is a gap" (`Dispatcher.call`): `handle.query_selector`, the three
|
||||
`is_*` of the state, `handle.dblclick()`, `handle.wait_for_element_state()`, `handle.evaluate_handle()`... all of them ordinary Playwright, and the first person to learn
|
||||
it was a user whose script died. `test_every_wire_method_is_served_or_refused.py` found them and put them in a budget; this file is what takes them out.
|
||||
|
||||
What stock Playwright 1.61 does, read from the driver bundle (`coreBundle.js`, cited by function name):
|
||||
|
||||
* `ElementHandleDispatcher.querySelector` / `querySelectorAll` / `evalOnSelector` / `evalOnSelectorAll` run the SELECTOR with the element as ROOT
|
||||
(`FrameSelectors.query` / `queryAll`: `injected.querySelector(info.parsed, scope || document, info.strict)`); the root applies to the first frame hop only
|
||||
(`resolveFrameForSelector`: `scope: i === 0 ? scope : undefined`, and `if (frame !== this.frame) scope = undefined`). `evalOnSelector` that finds nothing is
|
||||
`Failed to find element matching selector "<selector>"`.
|
||||
* `isVisible` / `isHidden` / `isEnabled` / `isDisabled` / `isEditable` / `isChecked` are the Frame's, with the selector `:scope` and the handle as the root
|
||||
(`Frame.isVisibleInternal`, `_elementState`): one read, no wait. A node that is not attached is `false` for visible (`isHidden` is its negation) and for the
|
||||
four others `Element is not attached to the DOM` (`throwElementIsNotAttached`).
|
||||
* `waitForElementState` is `ElementHandle.waitForElementState`: `checkElementStates(node, [state])` until it is met, retried after 0, 20, 100, 100, 500 ms
|
||||
(`_retryAction`), `Element is not attached to the DOM` at once when the node is gone (`throwRetargetableDOMError`).
|
||||
* `dblclick`, `tap`, `selectText` and `dispatchEvent` are `ElementHandle._dblclick` / `_tap` (`_retryPointerAction`), `selectText` (`_retryAction`) and
|
||||
`Frame.dispatchEvent` with `:scope`: the action on THAT node, the same checks as the selector's.
|
||||
* `evaluateExpressionHandle` is `JSHandleDispatcher.evaluateExpressionHandle`: `fn(element, arg)` in the page's world, and a HANDLE of what it returned
|
||||
(`fromJSOrElementHandle`).
|
||||
|
||||
Here the server answers each through the path its sibling already has: the element-scoped actions (`op_click`'s: `Actions` with `element_id`, never a selector looked
|
||||
up again, never the caller's handle disposed), the Frame's reads and queries with the element as root, `_call_on_elements` and `_handle_from_caller` for the caller's
|
||||
code and the handle it makes. A second path for any of them would be a second fingerprint.
|
||||
|
||||
No browser here: the dispatchers run against an injected script and actions that record what they are asked. The browser half is
|
||||
`test_an_element_handle_serves_every_method_of_the_client_e2e.py`.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import threading
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
|
||||
from invisible_core.juggler.connection import EventListeners
|
||||
from invisible_core.juggler.injected import EvaluationError
|
||||
from invisible_core.juggler.keyboard import MODIFIER_MASK
|
||||
from invisible_core.juggler.lifecycle import Lifecycle
|
||||
from invisible_playwright._juggler.dispatcher import Dispatcher, ProtocolException
|
||||
from invisible_playwright._juggler.server import (
|
||||
ElementHandleDispatcher, FrameDispatcher, JugglerServer, PageDispatcher)
|
||||
|
||||
pytestmark = pytest.mark.unit
|
||||
|
||||
HANDLE = "<element handle>"
|
||||
NOT_ATTACHED = "Element is not attached to the DOM"
|
||||
|
||||
#: The wire methods this file serves (the client's `ElementHandle` sends 17 that the table lacked; `waitForSelector` is the one still named in
|
||||
#: `tests/gates/wire_method_debt.json`: the core's `Actions.wait_for_selector` has no root to scope it to).
|
||||
SERVED = [
|
||||
"querySelector", "querySelectorAll", "evalOnSelector", "evalOnSelectorAll", "evaluateExpressionHandle",
|
||||
"isVisible", "isHidden", "isEnabled", "isDisabled", "isChecked", "isEditable", "waitForElementState",
|
||||
"dblclick", "tap", "selectText", "dispatchEvent",
|
||||
]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def page():
|
||||
server = JugglerServer()
|
||||
server.attach(SimpleNamespace(emit_message=lambda message: None))
|
||||
context = Dispatcher(server, None)
|
||||
context.options = {}
|
||||
page = object.__new__(PageDispatcher)
|
||||
page.context = context
|
||||
page.lifecycle = Lifecycle(EventListeners(), "session")
|
||||
page.injected = Mock()
|
||||
page.actions = Mock()
|
||||
page.send = Mock(return_value={})
|
||||
page._frames = {}
|
||||
page._told_attached = set()
|
||||
page._frames_lock = threading.RLock()
|
||||
page._announce_lock = threading.RLock()
|
||||
page._announced = True
|
||||
page._said_before_announcement = []
|
||||
page._navigation_requests = {}
|
||||
page._announced_closed = False
|
||||
Dispatcher.__init__(page, server, context)
|
||||
page.frame = FrameDispatcher(server, page, "main")
|
||||
for fid, parent in (("main", None), ("payment", "main")):
|
||||
page.lifecycle._on_event("Page.frameAttached", {"frameId": fid, "parentFrameId": parent})
|
||||
return page
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def element(page):
|
||||
"""The handle the client holds: `el-1`, a node of the main frame's utility world."""
|
||||
return ElementHandleDispatcher(page.server, page.frame, "el-1")
|
||||
|
||||
|
||||
def handle_of(page, answer):
|
||||
return page.server._objects[answer["guid"]]
|
||||
|
||||
|
||||
def arg(value):
|
||||
return {"value": value, "handles": []}
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# The table
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@pytest.mark.parametrize("method", SERVED)
|
||||
def test_the_client_s_method_is_on_the_table_and_not_a_gap(method):
|
||||
"""Known-bad: the method is not in `METHODS`, and `Dispatcher.call` answers that it is a gap."""
|
||||
assert method in ElementHandleDispatcher.METHODS, "%s is sent by the client and the table has no row for it" % method
|
||||
|
||||
|
||||
def test_a_call_of_the_client_is_not_answered_as_a_gap(element):
|
||||
"""The sentence a user read: asked through `call()`, as the transport asks."""
|
||||
try:
|
||||
element.call("isVisible", {})
|
||||
except ProtocolException as failure:
|
||||
assert "gap" not in str(failure), str(failure)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Queries rooted at the element
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def test_query_selector_looks_inside_the_element_and_hands_back_a_handle_of_its_frame(page, element):
|
||||
page.injected.call.return_value = "child-1"
|
||||
answer = element.call("querySelector", {"selector": "span.x"})
|
||||
call = page.injected.call.call_args
|
||||
assert call.args[0] == "main" and call.args[2] == {"objectId": "el-1"} and call.args[3] == "span.x", call
|
||||
assert call.kwargs["by_value"] is False
|
||||
page.injected.query_selector.assert_not_called() # the document-rooted query is the Frame's, and would find a sibling's match
|
||||
child = handle_of(page, answer["element"])
|
||||
assert child.object_id == "child-1" and child.frame is page.frame and child.parent is page.frame
|
||||
|
||||
|
||||
def test_query_selector_forwards_strict(page, element):
|
||||
page.injected.call.return_value = "child-1"
|
||||
element.call("querySelector", {"selector": "span", "strict": True})
|
||||
assert page.injected.call.call_args.args[4] is True
|
||||
element.call("querySelector", {"selector": "span"})
|
||||
assert page.injected.call.call_args.args[4] is False
|
||||
|
||||
|
||||
def test_query_selector_that_finds_nothing_answers_no_element(page, element):
|
||||
page.injected.call.return_value = None
|
||||
assert element.call("querySelector", {"selector": "span"}) == {"element": None}
|
||||
|
||||
|
||||
def test_query_selector_all_looks_inside_the_element_and_hands_back_every_match(page, element):
|
||||
page.injected.call.side_effect = ["list-1", 2, "child-1", "child-2"]
|
||||
answer = element.call("querySelectorAll", {"selector": "li"})
|
||||
first = page.injected.call.call_args_list[0]
|
||||
assert first.args[0] == "main" and first.args[2] == {"objectId": "el-1"} and first.args[3] == "li", first
|
||||
page.injected.query_selector_all.assert_not_called()
|
||||
assert [handle_of(page, e).object_id for e in answer["elements"]] == ["child-1", "child-2"]
|
||||
assert all(handle_of(page, e).frame is page.frame for e in answer["elements"])
|
||||
page.injected.dispose.assert_called_once_with("main", "list-1") # the list that held them is not left in the page
|
||||
|
||||
|
||||
def test_query_selector_all_with_no_match_answers_an_empty_list(page, element):
|
||||
page.injected.call.side_effect = ["list-1", 0]
|
||||
assert element.call("querySelectorAll", {"selector": "li"}) == {"elements": []}
|
||||
page.injected.dispose.assert_called_once_with("main", "list-1")
|
||||
|
||||
|
||||
def test_the_element_is_the_root_of_the_first_frame_hop_only(page, element):
|
||||
"""Stock: `scope: i === 0 ? scope : undefined`. The owner of the frame is looked for inside the element, and what is inside the frame is the frame's."""
|
||||
page.injected.call.return_value = "owner-1"
|
||||
page.send.return_value = {"contentFrameId": "payment"}
|
||||
page.injected.query_selector.return_value = "inner-1"
|
||||
answer = element.call("querySelector", {"selector": "iframe >> internal:control=enter-frame >> li"})
|
||||
owner_query = page.injected.call.call_args_list[0]
|
||||
assert owner_query.args[2] == {"objectId": "el-1"} and owner_query.args[3] == "iframe"
|
||||
page.injected.query_selector.assert_called_once_with("payment", "li")
|
||||
inner = handle_of(page, answer["element"])
|
||||
assert inner.object_id == "inner-1" and inner.frame is page.frame_for("payment")
|
||||
|
||||
|
||||
def test_eval_on_selector_runs_the_callers_code_on_the_match_inside_the_element(page, element):
|
||||
page.injected.call.return_value = "child-1"
|
||||
page.frame._call_on_elements = Mock(return_value=42)
|
||||
params = {"selector": "span", "expression": "(e, n) => e.id + n", "isFunction": True, "arg": arg({"n": 1})}
|
||||
assert element.call("evalOnSelector", params) == {"value": {"n": 42}}
|
||||
assert page.injected.call.call_args.args[2] == {"objectId": "el-1"}
|
||||
page.frame._call_on_elements.assert_called_once_with("main", ["child-1"], params)
|
||||
page.injected.dispose.assert_called_once_with("main", "child-1")
|
||||
|
||||
|
||||
def test_eval_on_selector_that_finds_nothing_says_what_stock_says(page, element):
|
||||
page.injected.call.return_value = None
|
||||
with pytest.raises(ProtocolException) as failure:
|
||||
element.call("evalOnSelector", {"selector": "span.none", "expression": "e => e"})
|
||||
assert str(failure.value) == 'Failed to find element matching selector "span.none"'
|
||||
|
||||
|
||||
def test_eval_on_selector_all_runs_the_callers_code_on_the_matches_inside_the_element_as_one_array(page, element):
|
||||
page.injected.call.side_effect = ["list-1", 2, "child-1", "child-2"]
|
||||
page.frame._call_on_elements = Mock(return_value=2)
|
||||
params = {"selector": "li", "expression": "els => els.length", "isFunction": True, "arg": arg({"v": "null"})}
|
||||
assert element.call("evalOnSelectorAll", params) == {"value": {"n": 2}}
|
||||
assert page.injected.call.call_args_list[0].args[2] == {"objectId": "el-1"}
|
||||
page.frame._call_on_elements.assert_called_once_with("main", ["child-1", "child-2"], params, as_array=True)
|
||||
disposed = [c.args for c in page.injected.dispose.call_args_list]
|
||||
assert ("main", "child-1") in disposed and ("main", "child-2") in disposed and ("main", "list-1") in disposed
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# The state of the element
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@pytest.mark.parametrize("method, state", [
|
||||
("isVisible", "visible"), ("isEnabled", "enabled"), ("isDisabled", "disabled"),
|
||||
("isEditable", "editable"), ("isChecked", "checked")])
|
||||
@pytest.mark.parametrize("answer", [True, False])
|
||||
def test_a_state_is_read_of_this_node_and_answered_as_it_is(page, element, method, state, answer):
|
||||
page.injected.element_state.return_value = answer
|
||||
assert element.call(method, {}) == {"value": answer}
|
||||
page.injected.element_state.assert_called_once_with("main", "el-1", state)
|
||||
page.injected.read_match.assert_not_called() # the selector-rooted read is the Frame's: this is the handle's node
|
||||
|
||||
|
||||
@pytest.mark.parametrize("visible", [True, False])
|
||||
def test_is_hidden_is_the_negation_of_is_visible(page, element, visible):
|
||||
page.injected.element_state.return_value = visible
|
||||
assert element.call("isHidden", {}) == {"value": not visible}
|
||||
page.injected.element_state.assert_called_once_with("main", "el-1", "visible")
|
||||
|
||||
|
||||
def test_a_node_that_is_not_attached_is_not_visible_and_is_hidden(page, element):
|
||||
page.injected.element_state.side_effect = EvaluationError("elementState(visible): error:notconnected")
|
||||
assert element.call("isVisible", {}) == {"value": False}
|
||||
assert element.call("isHidden", {}) == {"value": True}
|
||||
|
||||
|
||||
@pytest.mark.parametrize("method", ["isEnabled", "isDisabled", "isEditable", "isChecked"])
|
||||
def test_a_node_that_is_not_attached_has_no_such_state_and_the_error_is_stock_s(page, element, method):
|
||||
page.injected.element_state.side_effect = EvaluationError("elementState(x): error:notconnected")
|
||||
with pytest.raises(ProtocolException) as failure:
|
||||
element.call(method, {})
|
||||
assert str(failure.value) == NOT_ATTACHED
|
||||
|
||||
|
||||
def test_a_failure_that_is_not_about_the_node_is_not_turned_into_not_attached(page, element):
|
||||
page.injected.element_state.side_effect = EvaluationError("Not a checkbox or radio button")
|
||||
with pytest.raises(EvaluationError, match="Not a checkbox"):
|
||||
element.call("isChecked", {})
|
||||
|
||||
|
||||
@pytest.mark.parametrize("state", ["visible", "hidden", "stable", "enabled", "disabled", "editable"])
|
||||
def test_wait_for_element_state_asks_the_actionability_check_of_this_node(page, element, state):
|
||||
page.injected.element_states.return_value = {"ok": True}
|
||||
assert element.call("waitForElementState", {"state": state}) is None
|
||||
page.injected.element_states.assert_called_once_with("main", "el-1", [state])
|
||||
|
||||
|
||||
def test_wait_for_element_state_tries_again_until_the_state_is_met(page, element):
|
||||
page.injected.element_states.side_effect = [
|
||||
{"ok": False, "missing": "visible"}, {"ok": False, "missing": "visible"}, {"ok": True}]
|
||||
assert element.call("waitForElementState", {"state": "visible", "timeout": 5000}) is None
|
||||
assert page.injected.element_states.call_count == 3
|
||||
|
||||
|
||||
def test_wait_for_element_state_on_a_node_that_left_the_document_fails_at_once_with_stock_s_error(page, element):
|
||||
"""Stock: `throwRetargetableDOMError`. Known-bad: the node is retried until the timeout and the error is a timeout."""
|
||||
page.injected.element_states.return_value = {"ok": False, "missing": "error:notconnected"}
|
||||
with pytest.raises(ProtocolException) as failure:
|
||||
element.call("waitForElementState", {"state": "visible", "timeout": 5000})
|
||||
assert str(failure.value) == NOT_ATTACHED
|
||||
assert page.injected.element_states.call_count == 1
|
||||
|
||||
|
||||
def test_wait_for_element_state_that_is_never_met_ends_in_a_timeout(page, element):
|
||||
page.injected.element_states.return_value = {"ok": False, "missing": "enabled"}
|
||||
with pytest.raises(TimeoutError, match="Timeout 150ms exceeded"):
|
||||
element.call("waitForElementState", {"state": "enabled", "timeout": 150})
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# The gestures: the actions of the node, as `op_click`'s
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def the_call(mock):
|
||||
assert mock.call_count == 1, mock.call_args_list
|
||||
return mock.call_args
|
||||
|
||||
|
||||
def test_dblclick_is_the_actions_dblclick_on_this_node(page, element):
|
||||
assert element.call("dblclick", {"position": {"x": 3, "y": 4}, "button": "right", "modifiers": ["Shift"],
|
||||
"delay": 40, "timeout": 5000}) is None
|
||||
call = the_call(page.actions.dblclick)
|
||||
assert call.args == (HANDLE,)
|
||||
assert call.kwargs == {"position": {"x": 3, "y": 4}, "button": 2, "modifiers": MODIFIER_MASK["Shift"], "delay_ms": 40,
|
||||
"timeout": 5.0, "frame_id": "main", "element_id": "el-1",
|
||||
"trial": False, "strict": False, "force": False}, call.kwargs
|
||||
page.injected.query_selector.assert_not_called() # the node is not looked up again, and the caller's handle is not disposed
|
||||
page.injected.dispose.assert_not_called()
|
||||
|
||||
|
||||
def test_dblclick_carries_trial_and_force(page, element):
|
||||
element.call("dblclick", {"trial": True, "force": True})
|
||||
kwargs = the_call(page.actions.dblclick).kwargs
|
||||
assert kwargs["trial"] is True and kwargs["force"] is True and kwargs["element_id"] == "el-1"
|
||||
assert kwargs["timeout"] == 30.0 and kwargs["position"] is None
|
||||
|
||||
|
||||
def test_tap_is_the_actions_tap_on_this_node(page, element):
|
||||
assert element.call("tap", {"position": {"x": 1, "y": 2}, "timeout": 7000, "trial": True}) is None
|
||||
call = the_call(page.actions.tap)
|
||||
assert call.args == (HANDLE,)
|
||||
assert call.kwargs == {"position": {"x": 1, "y": 2}, "timeout": 7.0, "frame_id": "main", "element_id": "el-1",
|
||||
"trial": True, "strict": False, "force": False}, call.kwargs
|
||||
|
||||
|
||||
def test_select_text_is_the_actions_select_text_on_this_node(page, element):
|
||||
assert element.call("selectText", {"force": True, "timeout": 2000}) is None
|
||||
call = the_call(page.actions.select_text)
|
||||
assert call.args == (HANDLE,)
|
||||
assert call.kwargs == {"timeout": 2.0, "frame_id": "main", "element_id": "el-1",
|
||||
"trial": False, "strict": False, "force": True}, call.kwargs
|
||||
|
||||
|
||||
def test_dispatch_event_is_the_actions_dispatch_event_on_this_node_with_the_init_decoded(page, element):
|
||||
init = arg({"o": [{"k": "bubbles", "v": {"b": True}}, {"k": "detail", "v": {"n": 3}}]})
|
||||
assert element.call("dispatchEvent", {"type": "click", "eventInit": init, "timeout": 4000}) is None
|
||||
call = the_call(page.actions.dispatch_event)
|
||||
assert call.args == (HANDLE, "click", {"bubbles": True, "detail": 3})
|
||||
assert call.kwargs == {"timeout": 4.0, "frame_id": "main", "element_id": "el-1",
|
||||
"trial": False, "strict": False, "force": False}, call.kwargs
|
||||
|
||||
|
||||
def test_dispatch_event_with_no_init_dispatches_an_empty_one(page, element):
|
||||
element.call("dispatchEvent", {"type": "focus", "eventInit": arg({"v": "undefined"})})
|
||||
assert the_call(page.actions.dispatch_event).args == (HANDLE, "focus", {})
|
||||
|
||||
|
||||
def test_a_handle_in_the_event_init_is_refused_by_name_as_the_frame_s_is(page, element):
|
||||
other = ElementHandleDispatcher(page.server, page.frame, "el-2")
|
||||
init = {"value": {"o": [{"k": "relatedTarget", "v": {"h": 0}}]}, "handles": [{"guid": other.guid}]}
|
||||
with pytest.raises(ProtocolException, match="eventInit.*JSHandle|JSHandle.*eventInit"):
|
||||
element.call("dispatchEvent", {"type": "click", "eventInit": init})
|
||||
page.actions.dispatch_event.assert_not_called()
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# The caller's code on the element, returning a handle
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
FUNCTION = {"type": "function", "objectId": "the-function"}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def world(page):
|
||||
"""The caller's world: the expression is a function, the elements cross as copies, and what the function returns is `result`."""
|
||||
injected = page.injected
|
||||
injected.caller_context.return_value = "world-1"
|
||||
injected.evaluate_raw.return_value = dict(FUNCTION)
|
||||
injected.node_to_caller.side_effect = lambda frame_id, node: "copy-" + node
|
||||
injected.call_raw.return_value = {"objectId": "result-1", "type": "object"}
|
||||
return injected
|
||||
|
||||
|
||||
def calls_of_the_function(injected):
|
||||
return [c for c in injected.call_raw.call_args_list if c.args[1] == "(f, ...a) => f(...a)"]
|
||||
|
||||
|
||||
def test_evaluate_expression_handle_runs_the_function_on_this_element_and_hands_back_a_handle(page, element, world):
|
||||
answer = element.call("evaluateExpressionHandle", {"expression": "(e, n) => ({id: e.id, n})", "isFunction": True, "arg": arg({"n": 1})})
|
||||
(call,) = calls_of_the_function(world)
|
||||
assert call.args[2] == [{"objectId": "the-function"}, {"objectId": "copy-el-1"}, {"value": 1}], call.args[2]
|
||||
assert call.kwargs["by_value"] is False # a handle of the result, not its value
|
||||
world.release.assert_any_call("world-1", "copy-el-1") # the copy of the node is released, the caller's handle is not
|
||||
made = handle_of(page, answer["handle"])
|
||||
assert made.object_id == "result-1" and made.world == "caller" and made.frame is page.frame
|
||||
|
||||
|
||||
def test_evaluate_expression_handle_that_returns_a_node_hands_back_the_element(page, element, world):
|
||||
world.call_raw.return_value = {"objectId": "node-9", "type": "object", "subtype": "node"}
|
||||
world.adopt.return_value = "u-9"
|
||||
answer = element.call("evaluateExpressionHandle", {"expression": "e => e.firstChild", "isFunction": True, "arg": arg({"v": "null"})})
|
||||
world.adopt.assert_called_once_with("main", "node-9")
|
||||
made = handle_of(page, answer["handle"])
|
||||
assert made.object_id == "u-9" and made.world == "utility"
|
||||
|
||||
|
||||
def test_evaluate_expression_handle_on_a_handle_of_the_callers_world_takes_the_object_itself(page, world):
|
||||
"""A handle born in the caller's world (`evaluate_handle`'s result) is the receiver as it is: it is not carried anywhere."""
|
||||
thing = ElementHandleDispatcher(page.server, page.frame, "obj-5", world="caller", node=False, context="world-1")
|
||||
answer = thing.call("evaluateExpressionHandle", {"expression": "o => o.items", "isFunction": True, "arg": arg({"v": "null"})})
|
||||
(call,) = calls_of_the_function(world)
|
||||
assert call.args[2][:2] == [{"objectId": "the-function"}, {"objectId": "obj-5"}], call.args[2]
|
||||
assert call.kwargs["by_value"] is False
|
||||
world.node_to_caller.assert_not_called()
|
||||
assert handle_of(page, answer["handle"]).object_id == "result-1"
|
||||
|
||||
|
||||
def test_the_callers_code_of_evaluate_expression_handle_is_sent_once(page, element, world):
|
||||
element.call("evaluateExpressionHandle", {"expression": "e => e", "isFunction": True, "arg": arg({"v": "null"})})
|
||||
assert world.evaluate_raw.call_count == 1 and len(calls_of_the_function(world)) == 1
|
||||
@@ -0,0 +1,218 @@
|
||||
"""The handle of an element answers every method the client sends it, in a real browser, as Playwright 1.61 does.
|
||||
|
||||
The unit file next to it (`test_an_element_handle_serves_every_method_of_the_client.py`) pins what the server asks the engine and the actions; this one asks the
|
||||
page what happened. Until the server had a row for them, `handle.query_selector(...)`, `handle.is_visible()`, `handle.dblclick()`, `handle.wait_for_element_state(...)`
|
||||
and the rest of the 17 answered "ElementHandle has no method ... INSIDE the perimeter ... a gap", and the script died.
|
||||
|
||||
Each expectation is stock's, from the driver bundle (`coreBundle.js`, by function name): the queries run with the element as ROOT (`FrameSelectors.query`, `queryAll`),
|
||||
the states are the Frame's with `:scope` and the handle (`Frame._elementState`, `isVisibleInternal`), `waitForElementState` is `ElementHandle.waitForElementState`
|
||||
(`throwRetargetableDOMError`: `Element is not attached to the DOM`), the gestures are `_dblclick`, `_tap`, `selectText` and `Frame.dispatchEvent` on that node, and
|
||||
`evaluateExpressionHandle` is `JSHandleDispatcher`'s. `wait_for_selector` of a handle is not here: the server still answers it as a gap (the core's
|
||||
`Actions.wait_for_selector` has no root).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.e2e
|
||||
|
||||
PAGE = """<!doctype html>
|
||||
<div id="box"><span class="x" id="s1">a</span><span class="x" id="s2">b</span><p id="p">text</p>
|
||||
<iframe id="f" srcdoc="<!doctype html><div id='inner'>in</div>"></iframe></div>
|
||||
<span class="x" id="outside">out</span>
|
||||
<button id="go" type="button">go</button><button id="off" type="button" disabled>off</button>
|
||||
<input id="chk" type="checkbox" checked><input id="unchk" type="checkbox">
|
||||
<input id="ro" readonly value="v"><input id="txt" value="hello world">
|
||||
<div id="hid" style="display:none">h</div><div id="gone">g</div>
|
||||
<script>
|
||||
window.seen = {click: 0, dblclick: 0, touchstart: 0, trusted: [], pings: []};
|
||||
const go = document.getElementById('go');
|
||||
go.addEventListener('click', e => { window.seen.click++; window.seen.trusted.push(e.isTrusted); });
|
||||
go.addEventListener('dblclick', e => { window.seen.dblclick++; window.seen.trusted.push(e.isTrusted); });
|
||||
go.addEventListener('touchstart', () => { window.seen.touchstart++; });
|
||||
document.getElementById('box').addEventListener('ping', e => window.seen.pings.push([e.type, e.bubbles, e.isTrusted]));
|
||||
</script>"""
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def browser(firefox_binary):
|
||||
from invisible_playwright import InvisiblePlaywright
|
||||
|
||||
with InvisiblePlaywright(seed=42, binary_path=firefox_binary, humanize=False, headless=True) as browser:
|
||||
yield browser
|
||||
|
||||
|
||||
def _page(browser, **options):
|
||||
page = browser.new_context(**options).new_page()
|
||||
page.set_default_timeout(30000)
|
||||
page.set_content(PAGE)
|
||||
return page
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def page(browser):
|
||||
page = _page(browser)
|
||||
yield page
|
||||
page.context.close()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def touch_page(browser):
|
||||
page = _page(browser, has_touch=True)
|
||||
yield page
|
||||
page.context.close()
|
||||
|
||||
|
||||
def ids(elements):
|
||||
return [e.get_attribute("id") for e in elements]
|
||||
|
||||
|
||||
# --- the queries run inside the element -------------------------------------------------------------------------------------------------------------------
|
||||
def test_query_selector_finds_inside_the_element_and_not_outside_it(page):
|
||||
box = page.query_selector("#box")
|
||||
assert box.query_selector(".x").get_attribute("id") == "s1"
|
||||
assert box.query_selector("#outside") is None
|
||||
|
||||
|
||||
def test_query_selector_enters_a_frame_inside_the_element(page):
|
||||
box = page.query_selector("#box")
|
||||
inner = box.query_selector("iframe >> internal:control=enter-frame >> #inner")
|
||||
assert inner.text_content() == "in"
|
||||
|
||||
|
||||
def test_query_selector_all_finds_every_match_inside_the_element_and_not_outside_it(page):
|
||||
box = page.query_selector("#box")
|
||||
assert ids(box.query_selector_all(".x")) == ["s1", "s2"]
|
||||
assert box.query_selector_all("#outside") == []
|
||||
|
||||
|
||||
def test_eval_on_selector_runs_the_function_on_the_match_inside_the_element(page):
|
||||
box = page.query_selector("#box")
|
||||
assert box.eval_on_selector(".x", "(e, suffix) => e.id + suffix", "!") == "s1!"
|
||||
|
||||
|
||||
def test_eval_on_selector_that_finds_nothing_says_what_stock_says(page):
|
||||
from invisible_playwright.sync_api import Error
|
||||
|
||||
box = page.query_selector("#box")
|
||||
with pytest.raises(Error, match='Failed to find element matching selector "#outside"'):
|
||||
box.eval_on_selector("#outside", "e => e.id")
|
||||
|
||||
|
||||
def test_eval_on_selector_all_runs_the_function_on_every_match_inside_the_element(page):
|
||||
box = page.query_selector("#box")
|
||||
assert box.eval_on_selector_all(".x", "(els, n) => els.map(e => e.id).concat([els.length + n])", 10) == ["s1", "s2", 12]
|
||||
|
||||
|
||||
# --- the state of the element -----------------------------------------------------------------------------------------------------------------------------
|
||||
def test_is_visible_and_is_hidden_read_this_element(page):
|
||||
assert page.query_selector("#go").is_visible() is True
|
||||
assert page.query_selector("#go").is_hidden() is False
|
||||
assert page.query_selector("#hid").is_visible() is False
|
||||
assert page.query_selector("#hid").is_hidden() is True
|
||||
|
||||
|
||||
def test_is_enabled_and_is_disabled_read_this_element(page):
|
||||
assert page.query_selector("#go").is_enabled() is True
|
||||
assert page.query_selector("#go").is_disabled() is False
|
||||
assert page.query_selector("#off").is_enabled() is False
|
||||
assert page.query_selector("#off").is_disabled() is True
|
||||
|
||||
|
||||
def test_is_checked_reads_this_element(page):
|
||||
assert page.query_selector("#chk").is_checked() is True
|
||||
assert page.query_selector("#unchk").is_checked() is False
|
||||
|
||||
|
||||
def test_is_editable_reads_this_element(page):
|
||||
assert page.query_selector("#txt").is_editable() is True
|
||||
assert page.query_selector("#ro").is_editable() is False
|
||||
assert page.query_selector("#off").is_editable() is False
|
||||
|
||||
|
||||
def test_a_node_that_left_the_document_is_hidden_and_has_no_other_state(page):
|
||||
from invisible_playwright.sync_api import Error
|
||||
|
||||
gone = page.query_selector("#gone")
|
||||
page.evaluate("document.getElementById('gone').remove()")
|
||||
assert gone.is_visible() is False
|
||||
assert gone.is_hidden() is True
|
||||
with pytest.raises(Error, match="Element is not attached to the DOM"):
|
||||
gone.is_enabled()
|
||||
with pytest.raises(Error, match="Element is not attached to the DOM"):
|
||||
gone.wait_for_element_state("visible")
|
||||
|
||||
|
||||
def test_wait_for_element_state_returns_when_the_state_is_met(page):
|
||||
page.query_selector("#go").wait_for_element_state("visible")
|
||||
page.query_selector("#go").wait_for_element_state("stable")
|
||||
page.query_selector("#go").wait_for_element_state("enabled")
|
||||
page.query_selector("#off").wait_for_element_state("disabled")
|
||||
page.query_selector("#txt").wait_for_element_state("editable")
|
||||
page.query_selector("#hid").wait_for_element_state("hidden")
|
||||
|
||||
|
||||
def test_wait_for_element_state_waits_for_a_state_the_page_reaches(page):
|
||||
page.evaluate("requestAnimationFrame(() => { document.getElementById('hid').style.display = 'block'; })")
|
||||
page.query_selector("#hid").wait_for_element_state("visible")
|
||||
assert page.query_selector("#hid").is_visible() is True
|
||||
|
||||
|
||||
def test_wait_for_element_state_that_is_never_met_is_a_timeout(page):
|
||||
from invisible_playwright.sync_api import TimeoutError as PlaywrightTimeout
|
||||
|
||||
with pytest.raises(PlaywrightTimeout):
|
||||
page.query_selector("#hid").wait_for_element_state("visible", timeout=500)
|
||||
|
||||
|
||||
# --- the gestures: on this node, as a person does them ----------------------------------------------------------------------------------------------------
|
||||
def test_dblclick_double_clicks_this_element(page):
|
||||
page.query_selector("#go").dblclick()
|
||||
seen = page.evaluate("window.seen")
|
||||
assert (seen["click"], seen["dblclick"]) == (2, 1)
|
||||
assert all(seen["trusted"]), "a double click made by the server is a user's: %r" % seen["trusted"]
|
||||
|
||||
|
||||
def test_tap_taps_this_element(touch_page):
|
||||
touch_page.query_selector("#go").tap()
|
||||
assert touch_page.evaluate("window.seen.touchstart") == 1
|
||||
|
||||
|
||||
def test_select_text_selects_the_text_of_this_element(page):
|
||||
page.query_selector("#txt").select_text()
|
||||
assert page.evaluate("[document.getElementById('txt').selectionStart, document.getElementById('txt').selectionEnd]") == [0, 11]
|
||||
|
||||
|
||||
def test_dispatch_event_dispatches_on_this_element(page):
|
||||
box = page.query_selector("#box")
|
||||
box.dispatch_event("ping")
|
||||
box.dispatch_event("ping", {"bubbles": False})
|
||||
# stock `injectedScript.dispatchEvent`: an event of a type with no interface is `new Event(type, {bubbles, cancelable, composed, ...init})`, not a user's
|
||||
assert page.evaluate("window.seen.pings") == [["ping", True, False], ["ping", False, False]]
|
||||
|
||||
|
||||
def test_dispatch_event_of_a_click_reaches_the_listener(page):
|
||||
page.query_selector("#go").dispatch_event("click")
|
||||
assert page.evaluate("[window.seen.click, window.seen.trusted]") == [1, [False]]
|
||||
|
||||
|
||||
def test_a_handle_in_the_event_init_is_refused_by_name(page):
|
||||
from invisible_playwright.sync_api import Error
|
||||
|
||||
with pytest.raises(Error, match="eventInit.*JSHandle|JSHandle.*eventInit"):
|
||||
page.query_selector("#box").dispatch_event("ping", {"relatedTarget": page.query_selector("#go")})
|
||||
|
||||
|
||||
# --- the caller's code on the element, returning a handle -------------------------------------------------------------------------------------------------
|
||||
def test_evaluate_handle_hands_back_a_handle_of_what_the_function_returned(page):
|
||||
box = page.query_selector("#box")
|
||||
made = box.evaluate_handle("(e, n) => ({kids: e.children.length + n, id: e.id})", 1)
|
||||
assert made.json_value() == {"kids": 5, "id": "box"}
|
||||
assert made.get_property("id").json_value() == "box"
|
||||
|
||||
|
||||
def test_evaluate_handle_that_returns_a_node_hands_back_the_element(page):
|
||||
box = page.query_selector("#box")
|
||||
element = box.evaluate_handle("e => e.querySelector('#p')").as_element()
|
||||
assert element is not None and element.text_content() == "text"
|
||||
assert element.is_visible() is True
|
||||
Reference in new issue
Block a user