-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3745 from EifonUser/SHARE-539
SHARE-539 Improve feedback for download project button
- Loading branch information
Showing
7 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
templates/Program/program_download_disabled_button.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<button id="projectDownloadDisabledButton{{ suffix|default('') }}" class="btn btn-primary btn-block js-btn-project-download-disabled" | ||
data-redirect-url='{{ login_redirect }}' | ||
data-alert-text="{{ 'downloadDisabledAlert'|trans({}, 'catroweb')}}" | ||
|
||
> | ||
|
||
{# Loading spinner during download #} | ||
<i id="projectDownloadDisabledButton__loadingSpinner{{ suffix|default('') }}" class="material-icons text-start d-none"> | ||
{% include 'components/loading_spinner.html.twig' with {'spinner_id': 'download-disabled-progressbar' ~ suffix|default(), 'size': 'small'} only %} | ||
</i> | ||
|
||
{# Icon #} | ||
<i id="projectDownloadDisabledButton__icon{{ suffix|default('') }}" class="material-icons align-bottom">lock</i> | ||
|
||
{# Text #} | ||
<span>{{ "download"|trans({}, "catroweb") }}</span> | ||
|
||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/BehatFeatures/web/project-details/project_download_disabled.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@web @project_page | ||
Feature: As a visitor I need to login to be able to download projects | ||
|
||
Background: | ||
Given there are users: | ||
| id | name | | ||
| 1 | Catrobat | | ||
And there are projects: | ||
| id | name | downloads | owned by | apk_ready | | ||
| 1 | project 1 | 5 | Catrobat | true | | ||
| 2 | project 2 | 5 | Catrobat | true | | ||
|
||
Scenario: I want to download a project via the button | ||
When I am on "/app/project/1" | ||
And I wait for the page to be loaded | ||
Then the element "#projectDownloadDisabledButton-small" should be visible | ||
And I click "#projectDownloadDisabledButton-small" | ||
Then I am on "/app/login" | ||
And I wait for the page to be loaded | ||
And I fill in "_username" with "Catrobat" | ||
And I fill in "_password" with "123456" | ||
Then I press "Login" | ||
And I wait for the page to be loaded | ||
Then I should be logged in | ||
And I am on "/app/project/1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters