forked from Ruvail/NXTFolio
-
Notifications
You must be signed in to change notification settings - Fork 5
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 #5 from Caroline-tamu/improve_code_quality
Edit feature added
- Loading branch information
Showing
8 changed files
with
125 additions
and
113 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
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,41 @@ | ||
Feature: Edit project information | ||
|
||
As a creator | ||
So that I can update my project information | ||
Want to edit and save changes to published projects | ||
|
||
Background: project in database | ||
|
||
Given the following project exist: | ||
| gallery_title | gallery_description | gallery_picture | | ||
| BigProject | Here is a project | "http://example.com/img1.png" | | ||
|
||
Scenario: Enter the page to edit a project | ||
Given I am on the details page for "BigProject" | ||
When I follow "Edit This Project" | ||
And I should see "Edit Gallery Details" | ||
|
||
Scenario: Edit title of a project | ||
Given I am on the edit page for "BigProject" | ||
When I fill in "Gallery title" with "ArtConnect" | ||
When I click on "Updated Project" | ||
And I should see "ArtConnect" | ||
And I should not see "BigProject" | ||
|
||
Scenario: Edit description of a project | ||
Given I am on the edit page for "BigProject" | ||
When I fill in "Gallery description" with "an online art platform designed to create an interactive space for artists" | ||
When I click on "Updated Project" | ||
And I should see "an online art platform designed to create an interactive space for artists" | ||
And I should not see "Here is a project" | ||
|
||
Scenario: Edit image of a project | ||
Given I am on the edit page for "BigProject" | ||
When I upload a file "sample.png" | ||
And I click on "Updated Project" | ||
And I should see exactly 2 images | ||
When I follow "Edit This Project" | ||
And I click on "Delete" | ||
And I click on "Updated Project" | ||
And I should see exactly 1 images | ||
|
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,10 @@ | ||
Given(/^the following project exist:$/) do |table| | ||
table.hashes.each do |gallery| | ||
gallery['gallery_picture'] = gallery['gallery_picture'].gsub('"', '') if gallery['gallery_picture'] | ||
|
||
Gallery.create!(gallery_title: gallery['gallery_title'], | ||
gallery_description: gallery['gallery_description'], | ||
gallery_picture: gallery['gallery_picture']) | ||
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