mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +00:00
Fix double execution
This commit is contained in:
parent
f7530f8ff9
commit
648a962ca4
@ -17,10 +17,8 @@ def test_copy_button(selenium):
|
||||
assert "copy-button documentation" in selenium.title
|
||||
|
||||
selenium.switch_to.frame("main")
|
||||
# Not sure why there are two buttons, but we need the second one.
|
||||
# The first cannot be clicked by selenium because it's obscured.
|
||||
|
||||
button = selenium.find_element(By.CSS_SELECTOR, "button.copybtn + button.copybtn")
|
||||
button = selenium.find_element(By.CSS_SELECTOR, "button.copybtn")
|
||||
|
||||
assert button.get_attribute("data-tooltip") == "Copy"
|
||||
assert "success" not in button.get_attribute("class")
|
||||
|
@ -101,15 +101,9 @@ var normalize_path = function(path) {
|
||||
|
||||
var on_set_data = function(argument) {
|
||||
window.global_context = argument;
|
||||
console.log("Received data from parent", window.global_context);
|
||||
console.debug("Received data from parent", window.global_context);
|
||||
try {
|
||||
monkey_patch();
|
||||
// Trigger DOMContentLoaded again, some scripts that have just
|
||||
// been executed expect it.
|
||||
window.document.dispatchEvent(new Event("DOMContentLoaded", {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}));
|
||||
} finally {
|
||||
observer.observe(window.document.body, {subtree: true, childList: true});
|
||||
window.parent.postMessage({
|
||||
|
Loading…
x
Reference in New Issue
Block a user