forked from AgileVentures/shf-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'AgileVentures/develop' into sprint68-ca…
…p-deploy-1time-tasks-#166136006
- Loading branch information
Showing
37 changed files
with
592 additions
and
197 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
Feature: Admin edits application configuration | ||
As an admin | ||
I want to be able to edit application configuration | ||
Including chair signature and SHG logo images | ||
And images for company h-brand | ||
including images for the site meta image, chair signature, SHF logo images, and company h-brand; | ||
site name, and meta information: title, keywords, and description. | ||
|
||
|
||
Background: | ||
Given the following users exists | ||
| email | password | admin | member | first_name | last_name | | ||
| admin@random.com | password | true | false | emma | admin | | ||
|
||
Scenario: Admin uploads SHF logo and chairperson signature | ||
Given I am logged in as "admin@random.com" | ||
And the App Configuration is not mocked and is seeded | ||
|
||
And I am logged in as "admin@random.com" | ||
And I am on the "admin edit app configuration" page | ||
And I should see t("admin_only.app_configuration.edit.title") | ||
And I choose an SHF "admin_only_app_configuration[chair_signature]" file named "chair_signature.png" to upload | ||
And I choose an SHF "admin_only_app_configuration[shf_logo]" file named "shf_logo.png" to upload | ||
|
||
|
||
Scenario: Admin uploads SHF logo and chairperson signature | ||
Then I should see t("admin_only.app_configuration.edit.title") | ||
And I choose an application configuration "admin_only_app_configuration[chair_signature]" file named "chair_signature.png" to upload | ||
And I choose an application configuration "admin_only_app_configuration[shf_logo]" file named "shf_logo.png" to upload | ||
And I click on t("submit") button | ||
Then I should see t("admin_only.app_configuration.update.success") | ||
|
||
Scenario: Admin uploads images for company h-brand | ||
Given I am logged in as "admin@random.com" | ||
And I am on the "admin edit app configuration" page | ||
And I should see t("admin_only.app_configuration.edit.title") | ||
And I choose an SHF "admin_only_app_configuration[h_brand_logo]" file named "h_brand_logo.png" to upload | ||
And I choose an SHF "admin_only_app_configuration[sweden_dog_trainers]" file named "sweden_dog_trainers.png" to upload | ||
Then I should see t("admin_only.app_configuration.edit.title") | ||
And I choose an application configuration "admin_only_app_configuration[h_brand_logo]" file named "h_brand_logo.png" to upload | ||
And I choose an application configuration "admin_only_app_configuration[sweden_dog_trainers]" file named "sweden_dog_trainers.png" to upload | ||
And I click on t("submit") button | ||
Then I should see t("admin_only.app_configuration.update.success") | ||
|
||
Scenario: Admin edits app configuration and tries to upload non-image file | ||
Given I am logged in as "admin@random.com" | ||
And I am on the "admin edit app configuration" page | ||
And I should see t("admin_only.app_configuration.edit.title") | ||
And I choose an SHF "admin_only_app_configuration[shf_logo]" file named "text_file.jpg" to upload | ||
Then I should see t("admin_only.app_configuration.edit.title") | ||
And I choose an application configuration "admin_only_app_configuration[shf_logo]" file named "specifications.txt" to upload | ||
And I click on t("submit") button | ||
Then I should see t("admin_only.app_configuration.update.error") |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Steps dealing with AdminOnly::AppConfiguration | ||
|
||
|
||
# This step can be used to make sure that an actual valid | ||
# Application Configuration (AdminOnly::AppConfiguration) | ||
# is used. A valid AppConfiguration is created (all required data is there) | ||
# and all of the methods are called. None of the methods are stubbed. | ||
# This means that Paperclip is likely to be called because the attachments | ||
# are referenced (e.g. the "proof of membership" or some other attached image). | ||
# Because this is a new AppConfiguration, Paperclip will need to create the | ||
# file information for each attachment: the content type, any other image sizes, etc. | ||
# This involves both file I/O, which is slow, and system calls to external | ||
# programs that Paperclip needs to use. | ||
# Thus most of the time tests can and should work with a _mocked_ | ||
# AppConfiguration which stubs methods and so none of the Paperclip stuff is | ||
# ever called. (This is set up in the *Before* block in features/support/env.rb ) | ||
# But when the feature needs to work with any of the actual AppConfiguration, | ||
# this step should be used. | ||
# | ||
# @example | ||
# Feature: A member pays their membership fee and is approved | ||
# | ||
# Background: | ||
# Given the App Configuration is not mocked and is seeded | ||
# | ||
# Given the following users exist: | ||
# ... | ||
# | ||
# Scenario: ..... | ||
# | ||
And(/^the App Configuration is not mocked and is seeded$/) do | ||
|
||
# If this has been stubbed (e.g. to use MockAppConfig), unstub it | ||
allow(AdminOnly::AppConfiguration).to receive(:config_to_use).and_call_original | ||
|
||
AdminOnly::AppConfiguration.create(email_admin_new_app_received_enabled: false) | ||
end |
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
Oops, something went wrong.