-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
References #144 - Added sample upload file, a migration to add the `i…
…mage_value` column type, and other supporting things to allow users to create `image` column types.
- Loading branch information
Showing
8 changed files
with
46 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
5 changes: 5 additions & 0 deletions
5
db/migrate/20121013165520_add_image_value_column_to_world_object_properties.rb
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,5 @@ | ||
class AddImageValueColumnToWorldObjectProperties < ActiveRecord::Migration | ||
def change | ||
add_column :world_object_properties, :image_value, :string | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Feature: Uploading images and images as a LogBook column type | ||
|
||
Background: | ||
Given I am signed in with provider "facebook" | ||
And a LogBook exists called "Logbook with images" for game "City image game" and owned by "facebook_user" | ||
And a Section exists called "All city images" in "Logbook with images" | ||
|
||
Scenario: When editing a Section, the image column type should be an option, and you can create a new column of type image | ||
When I go to the edit Section page for Section "All city images" | ||
And I fill in "section_properties[new_section_property_names]" with "Image" | ||
And I select "image" from "[data_type]" | ||
And I press "Update attributes" | ||
Then I should see all of the texts: | ||
| Section updated | | ||
| Section Attributes | | ||
And I should see an "input" with "value" of "Image" | ||
|
||
Scenario: A user can upload an image to a WorldObject that they own which contains an image property | ||
When I go to the new WorldObjects page of Section "All city images" | ||
Then I should see the text "Image" | ||
|
||
Given I add the file "features/sample_uploads/city-cinemascope.jpg" | ||
When I fill in the name field with "Picture of my dog" | ||
And I fill in the file field "some file field" | ||
And I press "Save" | ||
Then I should see the text "Updated" | ||
And there should be an image uploaded to WorldObject "Picture of my dog" | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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