-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix API endpoints * Update API route * Fix MediaRepository methods * Add tests for API endpoints * Fix tests * Fix for CR * Fix for CR * Fix for CR * Fix for CR
- Loading branch information
Showing
35 changed files
with
1,061 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@shop_blocks | ||
Feature: Getting data from cms blocks | ||
In order to present dynamic content in my store | ||
As an API user | ||
I want to be able to display blocks | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And there is a block in the store | ||
And there is a block with "block-1" code and "Hi there!" content | ||
|
||
@api | ||
Scenario: Browsing blocks | ||
Given I want to browse blocks | ||
Then I should see 2 blocks in the list | ||
And I should see block with code "block-1" | ||
|
||
@api | ||
Scenario: Displaying block | ||
Given I view block with code "block-1" | ||
Then I should see block name | ||
And I should see block content | ||
|
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,23 @@ | ||
@shop_frequently_asked_questions | ||
Feature: Getting data from cms faq | ||
In order to present dynamic content in my store | ||
As an API user | ||
I want to be able to display FAQ | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And there are 10 FAQs in the store | ||
And there is an existing frequently asked question with "faq-1" code | ||
|
||
@api | ||
Scenario: Browsing FAQs | ||
Given I want to browse FAQs | ||
Then I should see 11 questions in the list | ||
And I should see the "faq-1" question | ||
|
||
@api | ||
Scenario: Displaying question | ||
Given I view faq with code "faq-1" | ||
Then I should see question with random text | ||
And I should see answer with random text | ||
|
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,21 @@ | ||
@shop_media | ||
Feature: Getting data from cms media | ||
In order to present dynamic content in my store | ||
As an API user | ||
I want to be able to display media files | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And there is an existing media with "media-1" code | ||
And there is an existing "image" media with "image-1" code | ||
|
||
@api | ||
Scenario: Browsing media | ||
Given I want to browse media | ||
Then I should see 2 media in the list | ||
And I should see media with code "media-1" | ||
|
||
@api | ||
Scenario: Displaying media | ||
Given I view media with code "image-1" | ||
Then I should see media name |
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,30 @@ | ||
@shop_pages | ||
Feature: Getting data from cms pages | ||
In order to present dynamic content in my store | ||
As an API user | ||
I want to be able to display custom pages | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And there are 10 pages in the store | ||
And the store has "iPhone 8" and "iPhone X" products | ||
And there is a page in the store | ||
And this page has these products associated with it | ||
And there are existing sections named "Blog" and "General" | ||
And this page has these sections associated with it | ||
And this page has "About us" name | ||
And this page has "about" code | ||
And this page also has "about-us" slug | ||
And this page also has "We are the best!" content | ||
|
||
@api | ||
Scenario: Browsing defined pages | ||
Given I want to browse pages | ||
Then I should see 11 pages in the list | ||
And I should see the "About us" page | ||
|
||
@api | ||
Scenario: Viewing a detailed page | ||
Given I view page with code "about" | ||
Then I should see the page name "About us" | ||
And I should see the page content "We are the best!" |
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,21 @@ | ||
@shop_sections | ||
Feature: Getting data from cms sections | ||
In order to present dynamic content in my store | ||
As an API user | ||
I want to be able to display sections | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And there is a section in the store | ||
And there is an existing section with "section-1" code | ||
|
||
@api | ||
Scenario: Browsing sections | ||
Given I want to browse sections | ||
Then I should see 2 sections in the list | ||
And I should see section with code "section-1" | ||
|
||
@api | ||
Scenario: Displaying section | ||
Given I view section with code "section-1" | ||
Then I should see section name |
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
Oops, something went wrong.