Rename iframe

This commit is contained in:
Adrian Vollmer 2024-04-09 17:56:04 +02:00
parent b9e88c0fa9
commit 58da889112
3 changed files with 7 additions and 8 deletions

View File

@ -16,7 +16,7 @@ def test_copy_button(selenium):
assert "copy-button documentation" in selenium.title
selenium.switch_to.frame("main")
selenium.switch_to.frame("zundler-iframe")
button = selenium.find_element(By.CSS_SELECTOR, "button.copybtn")
@ -41,7 +41,7 @@ def test_mermaid(selenium):
assert "mermaid documentation" in selenium.title
selenium.switch_to.frame("main")
selenium.switch_to.frame("zundler-iframe")
section = selenium.find_element(By.CSS_SELECTOR, "#section")
svg = selenium.find_element(By.CSS_SELECTOR, "div.mermaid")
@ -59,7 +59,7 @@ def test_multi_page(selenium):
assert "multi-page documentation" in selenium.title
selenium.switch_to.frame("main")
selenium.switch_to.frame("zundler-iframe")
second_link = selenium.find_element(
By.XPATH, "//a[text() = 'Second' and @class = 'reference internal']"
@ -80,14 +80,14 @@ def test_multi_page_search(selenium):
assert "multi-page documentation" in selenium.title
selenium.switch_to.frame("main")
selenium.switch_to.frame("zundler-iframe")
searchbox = selenium.find_element(By.CSS_SELECTOR, "#searchbox input[type='text']")
searchbox.send_keys("Lorem" + Keys.ENTER)
selenium.switch_to.parent_frame()
time.sleep(2)
selenium.switch_to.frame("main")
selenium.switch_to.frame("zundler-iframe")
assert selenium.title.startswith("Search")

View File

@ -1,5 +1,4 @@
#main {
/* TODO rename main to avoid collisions*/
#zundler-iframe {
position:fixed;
top:0; left:0; bottom:0; right:0;
width:100%;

View File

@ -1,4 +1,4 @@
const iFrameId = 'main';
const iFrameId = 'zundler-iframe';
var set_favicon = function(href) {
if (!href) {return;}