help: Add functional test to check status logs page

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2019-01-27 09:17:22 -05:00 committed by Sunil Mohan Adapa
parent 5a8873508d
commit b8737ad663
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#
# This file is part of FreedomBox.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
@help @system @essential
Feature: Help module
Show various information about the system.
Background:
Given I'm a logged in user
Scenario: Status logs
When I go to the status logs page
Then status logs should be shown

View File

@ -83,3 +83,13 @@ def new_user_is_not_listed(browser, name):
def sample_local_file():
file_path, contents = interface.create_sample_local_file()
return dict(file_path=file_path, contents=contents)
@when('I go to the status logs page')
def help_go_to_status_logs(browser):
interface.go_to_status_logs(browser)
@then('status logs should be shown')
def help_status_logs_are_shown(browser):
assert interface.are_status_logs_shown(browser)

View File

@ -150,3 +150,11 @@ def compare_files(file1, file2):
file2_contents = open(file2, 'rb').read()
assert file1_contents == file2_contents
def go_to_status_logs(browser):
browser.visit(default_url + '/plinth/help/status-log/')
def are_status_logs_shown(browser):
return browser.is_text_present('Logs begin')