mediawiki: tests: functional: Use click function from functional libary

Tests:
  - All mediawiki tests pass

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Update to reflect the new utility function name]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa 2024-12-25 19:11:14 +02:00 committed by Sunil Mohan Adapa
parent b9fa1499d3
commit 92c35e4640
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -179,8 +179,8 @@ def _login(browser, username, password):
functional.visit(browser, '/mediawiki/index.php?title=Special:Login')
browser.find_by_id('wpName1').fill(username)
browser.find_by_id('wpPassword1').fill(password)
with functional.wait_for_page_update(browser):
browser.find_by_id('wpLoginAttempt').click()
functional.click_and_wait(browser,
browser.find_by_id('wpLoginAttempt').first)
def _login_with_credentials(browser, username, password):
@ -249,8 +249,7 @@ def _delete_main_page(browser, username, password):
_login(browser, username, password)
functional.visit(browser,
'/mediawiki/index.php?title=Main_Page&action=delete')
with functional.wait_for_page_update(browser):
browser.find_by_id('wpConfirmB').first.click()
functional.click_and_wait(browser, browser.find_by_id('wpConfirmB').first)
def _has_main_page(browser):