Commit 6e0671e1 authored by Joseph Nuthalapati's avatar Joseph Nuthalapati Committed by James Valleroy

sharing: Add functional test for public shares

Signed-off-by: Joseph Nuthalapati's avatarJoseph Nuthalapati <>
Reviewed-by: James Valleroy's avatarJames Valleroy <>
parent 1eec1cf9
......@@ -51,6 +51,11 @@ Scenario: Share permissions
Then the share tmp should be listed from path /tmp for syncthing
And the share tmp should not be accessible
Scenario: Public share
When I edit share tmp to be public
And I log out
Then the share_tmp site should be available
Scenario: Backup and restore sharing
Given share tmp is not available
When I add a share tmp from path /tmp for admin
......@@ -167,6 +167,11 @@ def remove_share2(browser, name):
application.remove_share(browser, name)
@when(parsers.parse('I edit share {name:w} to be public'))
def edit_share_public_access(browser, name):
application.make_share_public(browser, name)
'the share {name:w} should be listed from path {path} for {group:w}'))
......@@ -232,6 +232,15 @@ def access_share(browser, name):
assert '/share/{}'.format(name) in browser.title
def make_share_public(browser, name):
"""Make share publicly accessible."""
row = get_share(browser, name)
with wait_for_page_update(browser):
def verify_nonexistant_share(browser, name):
"""Verify that given URL for a given share name is a 404."""
url = '{}/share/{}'.format(default_url, name)
......@@ -37,6 +37,8 @@ site_url = {
def get_site_url(site_name):
if site_name.startswith('share'):
site_name = site_name.replace('_', '/')
url = '/' + site_name
if site_name in site_url:
url = site_url[site_name]
......@@ -601,8 +603,8 @@ def ttrss_subscribe(browser):
browser.find_by_text('Subscribe to feed...').click()
if browser.is_text_present('You are already subscribed to this feed.'):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment