mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
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:
1 parent
420e3846a0
commit
ce906b1fef
7 files changed
+467
-430
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user