mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
- 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>
108 lines
3.7 KiB
Gherkin
108 lines
3.7 KiB
Gherkin
#
|
|
# 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/>.
|
|
#
|
|
|
|
@apps @gitweb @backups @sso
|
|
Feature: gitweb Simple Git Hosting
|
|
Git web interface.
|
|
|
|
Background:
|
|
Given I'm a logged in user
|
|
And the gitweb application is installed
|
|
|
|
Scenario: Enable gitweb application
|
|
Given the gitweb application is disabled
|
|
When I enable the gitweb application
|
|
Then the gitweb site should be available
|
|
|
|
Scenario: Create public repository
|
|
Given the gitweb application is enabled
|
|
And a public repository that doesn't exist
|
|
When I create the repository
|
|
Then the repository should be listed as a public
|
|
And the repository should be listed on gitweb
|
|
|
|
Scenario: Create private repository
|
|
Given the gitweb application is enabled
|
|
And a private repository that doesn't exist
|
|
When I create the repository
|
|
Then the repository should be listed as a private
|
|
And the repository should be listed on gitweb
|
|
|
|
Scenario: Delete repository
|
|
Given the gitweb application is enabled
|
|
And a repository
|
|
When I delete the repository
|
|
Then the repository should not be listed
|
|
|
|
Scenario: Backup and restore gitweb
|
|
Given the gitweb application is enabled
|
|
And a repository
|
|
When I create a backup of the gitweb app data
|
|
And I delete the repository
|
|
And I restore the gitweb app data backup
|
|
Then the repository should be restored
|
|
And the gitweb site should be available
|
|
|
|
Scenario: Disable gitweb application
|
|
Given the gitweb application is enabled
|
|
When I disable the gitweb application
|
|
Then the gitweb site should not be available
|
|
|
|
Scenario: Public gitweb site shows only public repositories
|
|
Given the gitweb application is enabled
|
|
And both public and private repositories exist
|
|
When I log out
|
|
Then the public repository should be listed on gitweb
|
|
And the private repository should not be listed on gitweb
|
|
|
|
Scenario: Gitweb is not public if there are only private repositories
|
|
Given the gitweb application is enabled
|
|
And at least one repository exists
|
|
And all repositories are private
|
|
When I log out
|
|
And I access gitweb application
|
|
Then I should be prompted for login
|
|
And gitweb app should not be visible on the front page
|
|
|
|
Scenario: Edit repository metadata
|
|
Given the gitweb application is enabled
|
|
And a public repository that doesn't exist
|
|
And a repository metadata:
|
|
description: Test Description
|
|
owner: Test Owner
|
|
access: private
|
|
When I create the repository
|
|
And I set the metadata of the repository
|
|
Then the metadata of the repository should be as set
|
|
|
|
Scenario: Access public repository with git client
|
|
Given the gitweb application is enabled
|
|
And a public repository
|
|
When using a git client
|
|
Then the repository should be publicly readable
|
|
And the repository should not be publicly writable
|
|
And the repository should be privately writable
|
|
|
|
Scenario: Access private repository with git client
|
|
Given the gitweb application is enabled
|
|
And a private repository
|
|
When using a git client
|
|
Then the repository should not be publicly readable
|
|
And the repository should not be publicly writable
|
|
And the repository should be privately readable
|
|
And the repository should be privately writable
|