mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
5a8873508d
commit
b8737ad663
27
functional_tests/features/help.feature
Normal file
27
functional_tests/features/help.feature
Normal 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
|
||||
@ -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)
|
||||
|
||||
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user