mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +00:00
wordpress: tests: functional: Fix tests on Trixie
- In versions of WordPress in Debian Trixie and up the editing widget is inside of an iframe instead of as a direct child of the main document. Elements inside these iframes can't be queried directly and one must be the 'context' of the iframe before querying elements inside. - Fix the failures by using the splinter API to query inside iframe. Tests: - Run functional tests on WordPress in stable and testing containers twice. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
56791df57e
commit
fc86f3e507
@ -142,6 +142,10 @@ def _write_post(browser, title):
|
|||||||
|
|
||||||
if browser.find_by_id('post-title-0'):
|
if browser.find_by_id('post-title-0'):
|
||||||
browser.find_by_id('post-title-0').fill(title)
|
browser.find_by_id('post-title-0').fill(title)
|
||||||
|
else:
|
||||||
|
if browser.find_by_css('.editor-visual-editor.is-iframed'):
|
||||||
|
with browser.get_iframe('editor-canvas') as iframe:
|
||||||
|
iframe.find_by_css('.editor-post-title').first.type(title)
|
||||||
else:
|
else:
|
||||||
browser.find_by_css('.editor-post-title').first.type(title)
|
browser.find_by_css('.editor-post-title').first.type(title)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user