mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
wordpress: tests: Fix writing title for new post in newer versions
Newer versions of wordpress after Bullseye seem to have a different HTML structure for the title element. Make the functional tests work for the new structure as well as the old one. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
90cef6e95c
commit
4e5835f92a
@ -137,7 +137,11 @@ def _write_post(browser, title):
|
||||
if browser.find_by_css('.edit-post-welcome-guide'):
|
||||
browser.find_by_css('.components-modal__header button')[0].click()
|
||||
|
||||
browser.find_by_id('post-title-0').fill(title)
|
||||
if browser.find_by_id('post-title-0'):
|
||||
browser.find_by_id('post-title-0').fill(title)
|
||||
else:
|
||||
browser.find_by_css('.editor-post-title').first.type(title)
|
||||
|
||||
browser.find_by_css('.editor-post-publish-button__button')[0].click()
|
||||
functional.eventually(browser.find_by_css, ['.editor-post-publish-button'])
|
||||
browser.find_by_css('.editor-post-publish-button')[0].click()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user