161 Commits

Author SHA1 Message Date
Joseph Nuthalapati
26100b50c1
functional-tests: Avoid unnecessary trips to Home
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Check fo '/plinth/' instead of 'plinth' in URL checking for UI]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:25:32 -08:00
Joseph Nuthalapati
8b4ccceb6b
functional-tests: Make nav_to_module efficient
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:25:22 -08:00
Joseph Nuthalapati
98e0ccdda0
functional-tests: Add tag @service-discovery
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:25:15 -08:00
Joseph Nuthalapati
3df23a4aa0
functional-tests: Africa/Addis_Abada is gone?
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:25:07 -08:00
Joseph Nuthalapati
ce906b1fef
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>
2020-01-25 19:24:01 -08:00
James Valleroy
21ba450484
repro: Remove app
The repro app has been disabled for a long time. Its package has been
removed from Debian, and there is no sign of it returning soon.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 20:00:43 -05:00
Veiko Aasa
3a202af843
samba: Add unit and functional tests
- Add functional tests
- Add unit tests for samba views
- New dependency for running functional tests: smbclient
- Make port configurable for the smbclient

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 02:47:06 +05:30
Veiko Aasa
721e09fee9
deluge: Fix set default daemon
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-12 15:55:52 -05:00
Veiko Aasa
ff27f1d21b
deluge: Manage starting/stoping deluged
- run deluged daemon with default configuration location
- deluge-web: autoconnect to the deluged daemon
- functional tests: assert deluge-web is connected to the deluged daemon

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-12 15:55:49 -05:00
Joseph Nuthalapati
7d2c57bbf5
mediawiki: Fix functional tests depending on skin
- Login to MediaWiki should not depend on the skin used.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-10 18:02:41 +05:30
Veiko Aasa
390e041a14
app: Fix app checkbox status change functional tests
Fixes #1733

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-15 08:04:47 -05:00
Veiko Aasa
078abb5fa3
users: Fix functional tests changing the language feature
Closes #1674

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-11 18:39:52 -05:00
Alice Kile
eb83e00011
fix formatting issues
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:35 -05:00
James Valleroy
5de8350e0b
functional_tests: Add basic samba tests
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 11:30:55 -05:00
Joseph Nuthalapati
5b2df956e8
pagekite: Use the new app toggle button
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 06:26:54 +05:30
Joseph Nuthalapati
6f975a159c
pagekite: Fix functional tests
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 04:59:25 +05:30
Joseph Nuthalapati
00725b3526
app: Fix broken functional tests
Fix functional tests broken by the new toggle button to enable/disable
applications.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-19 00:02:16 +05:30
Joseph Nuthalapati
cd1e7b649d
tahoe: Mark Tahoe-LAFS as an advanced app
Tahoe LAFS is an app requiring some technical knowledge to use and its support
in FreedomBox is experimental. The use case of a cluster of FreedomBoxes running
Tahoe-LAFS nodes isn't tested yet. It's intended use case as a backend for the
backups app isn't implemented yet.

- Fixed functional test implementation for advanced mode
- Did not fix failing Tahoe-LAFS tests, keeping them skipped for now.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-08 13:58:55 -08:00
James Valleroy
88bf07adee
functional_tests: Update config form ids
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-04 11:30:41 -08:00
Veiko Aasa
8694849701
gitweb: Add functional tests
- add eleven functional tests
- gitweb_configure.html template: add id to the repository list element
  to distinct it better.

Closes #1668

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 23:48:56 -07:00
Sunil Mohan Adapa
b72021782e
deluge: Support deluge 2 by starting it properly
deluge-web 1.x runs in the foreground by default and provides an option -f to
fork in the background where as deluge-web 2.x by default forks into the
background and provides option --do-no-daemonize for running in foreground.
Update systemd service to ensure that option is passed appropriately based on
the version of daemon running.

Update functional tests to accommodate UI changes in deluge-web 2.x.

Closes: #1652.

Tests:

- Install deluge 1.x by having testing in apt sources.list. Ensure that the
  daemon is working. Run functional tests.

- Upgrade deluge to 2.x by changing the sources.list and upgrading. Ensure that
  daemon is working after disable/enable. Run functional tests.

- Install deluge 2.x by having unstable in apt sources.list. Ensure that daemon
  is working. Run functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:36:06 -04:00
Sunil Mohan Adapa
77737afadd
ikiwiki: Remove subsubmenu in favor of toolbar
- Merge managing table into the index page.

- Remove separate URL/view/template for manage.

- Convert create tab into a toolbar button.

- Remove cancel button from delete confirmation page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:25:54 -04:00
Sunil Mohan Adapa
e0b0b0f532
functional_tests: Fix create snapshot test failure
When there are no snapshots present in the list of snapshots, operation to
delete all snapshots first checks that select all button and then submits the
delete snapshots button. After that it looks for delete confirmation and then
submits again. When the confirmation page is not shown, as is the case when
there are no snapshots, the button being submitted happens to be 'Create
Snapshot' button. This creates a new snapshot and the total number of snapshots
at the end of create snapshot test is 2 instead of 1.

Tests:

- Run `py.test-3 --include-functional -k snapshot`.

Closes: #1630.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-26 18:14:13 -04:00
James Valleroy
88cab90917
functional_tests: Use longer password when creating user
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-25 16:27:03 -04:00
Joseph Nuthalpati
cd54cd48b8
functional_tests: Fix step definition "When I log out"
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-18 13:33:30 -07:00
Joseph Nuthalpati
fe02b9f1e3
functional_tests: Fix site.is_available not handling default paths
Sites might have default paths like /mediawiki/Main_Page or /transmission/web.
The tests are doing an exact match on the path which is causing test failures.
Modified the support function site.is_available to handle default paths.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-18 13:33:08 -07:00
James Valleroy
a89190b700
functional_tests: Fix delete backup path
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-30 16:45:30 -07:00
Joseph Nuthalapati
6e0671e142
sharing: Add functional test for public shares
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-07-22 17:56:45 -04:00
Joseph Nuthalapati
7684814a5c
backups: Fix functional tests broken due to URL changes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:37 +05:30
James Valleroy
6064067a3a
functional_tests: Add shortcut- prefix to test home page config
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-13 18:38:14 -07:00
James Valleroy
1600c25ae8
monkeysphere: Hide by default
Update functional test to show advanced apps.

Closes #1453.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-10 11:16:01 -07:00
Joseph Nuthalapati
23e4aac400
searx: Improve functional tests
- Make tests more semantically correct
- Add implementation for missing fixture - When I log out
- Check whether file exists when disabling public access

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-09 10:40:54 -04:00
Joseph Nuthalapati
7e1e5182cc
searx: Preserve public_access setting
- Preserve the setting during enable/disable as well as during backup/restore.
- Show setting as disabled when application is disabled but restore user's
  original preference value on enable.
- Add functional test for this.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-09 10:40:49 -04:00
Joseph Nuthalapati
2d85b61199
searx: Add option to allow public access to the application
[jvalleroy] Resolved merge conflict to use shortcut component.

Fixes #1590

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-09 10:37:16 -04:00
James Valleroy
44b25ea617
functional_tests: Install python3-pytest-django
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-04-03 22:03:52 -04:00
LoveIsGrief
35c9e591c9
functional tests: Fix wheel errors when provisioning VM
> error: invalid command 'bdist_wheel'

Kept popping up in the logs. It seems like `wheel` isn't in the deps of
the installed python packages. Therefore we now install it ourselves.

freedombox/plinth#1521 - Provision VM to run function functional tests

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-04-03 22:03:49 -04:00
LoveIsGrief
d31b0ee3c7
functional_tests: Allow provisioning VM for functional tests
It's now possible to run the tests in the VM more easily
without copy-pasting too much from HACKING.md.
`vagrant provision --provisiion-with tests` will take care of the dependencies.

freedombox/plinth#1521 - Provision VM to run function functional tests

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-04-03 22:03:44 -04:00
LoveIsGrief
d551d52537
i2p: Add functional tests
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-04-01 17:33:26 -07:00
Sunil Mohan Adapa
fd9b6770be
tests: Use pytest for running all tests
- Create option --include-functional to run functional tests. Otherwise, they
  are disabled by default. If pytest-bdd is not installed, functional tests are
  not discovered at all.

- Make pytest-django discover the setting files by creating dummy manage.py in
  top level directory.

- Make pytest run as './setup.py pytest'. Add alias from './setup.py test'. This
  requires pytest-runner package.

- Merge .gitignore files from functional_tests/

- Update gitlab-ci.yml to run tests with coverage using pytest.

- Update HACKING.md to suggest using py.test-3 instead of old way of running.
  Merge functional tests README.md into HACKING.md.

- Remove execution wrapper runtests.py as pytest-django is able to configure
  Django settings before execution of tests. Update tests to explicitly ask for
  Django database as database access is denied by default.

- Replace usage of python3-coverage with python3-pytest-coverage. Execution
  wrappers are not required.

- Add build dependencies on pytest modules.

- Let all warnings be shown after running tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:23 -04:00
Sunil Mohan Adapa
e7181bb18a
mediawiki: Fix tests to allow running from any directory
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:21 -04:00
Sunil Mohan Adapa
cb15d34482
functional_tests: Update todo list by removing implemented tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:18 -04:00
Sunil Mohan Adapa
0e2315486d
tests: Read functional tests conf file without assuming CWD
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:07 -04:00
Sunil Mohan Adapa
b66b15591e
tests: Mark functional tests with functional mark
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:04 -04:00
Sunil Mohan Adapa
895b5f1fa8
functional_tests: Reorder tests to disable apps after tests
To reduce memory/CPU requirement on the VM running the services for functional
tests. The following items are kept enabled as these are enabled by default in
FreedomBox.:

- NTP daemon

- Restricted console login

- Unattended upgrades

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-09 21:20:42 -05:00
Joseph Nuthalapati
a4e01eb629
pagekite: Bring subsubmenu below description. Remove About section.
- Fixed broken functional tests
- Pagekite index page directly takes to configuration

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-08 14:25:26 -08:00
Joseph Nuthalapati
b18ac14377
snapshot: Fix failing functional test
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-02 10:11:33 -08:00
Joseph Nuthalapati
241d3a98d5
Disable Coquelicot for Buster release
As confirmed by multiple users, Coquelicot is no longer useful for uploading
files, which makes it useless as a file sharing application.

We might enable it in the future if it's actively maintained once again, or find
an alternative.

- Skip functional tests

- Disable modules-enabled file

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 18:34:14 -05:00
Sunil Mohan Adapa
ee87c00578
ttrss: Make functional test definitions specific to ttrss
- So as not to clash with future apps that may have feed add/remove capability.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-26 15:24:09 -08:00
James Valleroy
1eed7d581d
ttrss: Add backup support
- Use backup hooks to dump and restore database.
- Add functional test for backup and restore.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-26 15:23:47 -08:00
Joseph Nuthalapati
8bc34f84c3
config: Rename Default App to Webserver Home Page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:59 -05:00