functional-tests: Login only once per session

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Fix fixture name for searx]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati authored and Sunil Mohan Adapa committed 2020-01-25 19:24:01 -08:00
1 parent 420e3846a0
commit ce906b1fef
7 files changed
+467 -430

No files matched your search

+4 -3
View File
@@ -36,10 +36,11 @@ default_url = config['DEFAULT']['url']
def login(browser, url, username, password):
browser.visit(url)
# XXX browser.visit goes to the web page with no cookies,
# hence there should be some kind of session storage for this to work
browser.visit(url)
apps_link = browser.find_link_by_href('/plinth/apps/')
if len(apps_link):
return
login_button = browser.find_link_by_href('/plinth/accounts/login/')
if login_button:
+6 -4
View File
@@ -85,15 +85,17 @@ def upload_file_to_coquelicot(browser, file_path, password):
def verify_mediawiki_create_account_link(browser):
browser.visit(config['DEFAULT']['url'] + '/mediawiki')
browser.visit(config['DEFAULT']['url'] +
'/mediawiki/index.php/Special:CreateAccount')
assert eventually(browser.is_element_present_by_id,
args=['pt-createaccount'])
args=['wpCreateaccount'])
def verify_mediawiki_no_create_account_link(browser):
browser.visit(config['DEFAULT']['url'] + '/mediawiki')
browser.visit(config['DEFAULT']['url'] +
'/mediawiki/index.php/Special:CreateAccount')
assert eventually(browser.is_element_not_present_by_id,
args=['pt-createaccount'])
args=['wpCreateaccount'])
def verify_mediawiki_anonymous_reads_edits_link(browser):