-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
THREESCALE-7987: Update product metrics (#2857)
* fixes n+1 query in metrics index presenter * 🥒 updates cucumbers and ParamTypes
- Loading branch information
1 parent
09e8b6c
commit 98faf03
Showing
18 changed files
with
234 additions
and
187 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
@javascript | ||
Feature: Product > Integration > Metrics > New | ||
In order to track various metrics of my API | ||
As a provider | ||
I want to create them | ||
|
||
Background: | ||
Given a provider is logged in | ||
And I go to the metrics and methods page | ||
|
||
Rule: Tab methods | ||
Background: | ||
Given I change to tab "Methods" | ||
And I follow "Add a method" | ||
|
||
Scenario: Create a method with an existing system name | ||
Given a method "Cotoletta" of the provider | ||
When I fill in "Friendly name" with "Cotoletta 2" | ||
And I fill in "System name" with "cotoletta" | ||
And I press "Create Method" | ||
Then I should see "Has already been taken" | ||
And the provider should not have a method "Cotoletta 2" | ||
|
||
Scenario: Create a method with an existing friendly name | ||
Given a method "Cotoletta" of the provider | ||
When I fill in "Friendly name" with "Cotoletta" | ||
And I fill in "System name" with "cotoletta_2" | ||
And I press "Create Method" | ||
Then I should see "Has already been taken" | ||
And the provider should not have a method with system name "cotoletta_2" | ||
|
||
Scenario: Create a method from the index page | ||
When I fill in "Friendly name" with "Cotto e Funghi" | ||
And I fill in "System name" with "cotto_funghi" | ||
And I fill in "Description" with "The number of times this dish has been served" | ||
And I press "Create Method" | ||
Then I should see "Cotto e Funghi" | ||
And the provider should have a method "Cotto e Funghi" | ||
And method "Cotto e Funghi" should have the following attributes: | ||
| Friendly name | Cotto e Funghi | | ||
| System name | cotto_funghi | | ||
| Description | The number of times this dish has been served | | ||
|
||
Rule: Tab metrics | ||
Background: | ||
Given I change to tab "Metrics" | ||
And I follow "Add a metric" | ||
|
||
Scenario: Create a metrics with an existing system name | ||
Given a metric "Carni" of the provider | ||
When I fill in "Friendly name" with "Carni 2" | ||
And I fill in "System name" with "Carni" | ||
And I fill in "Unit" with "servings" | ||
And I press "Create Metric" | ||
Then I should see "Has already been taken" | ||
And the provider should not have a metric "Carni 2" | ||
|
||
Scenario: Create a metric with an existing friendly name | ||
Given a metric "Carni" of the provider | ||
When I fill in "Friendly name" with "Carni" | ||
When I fill in "System name" with "carni_2" | ||
And I fill in "Unit" with "servings" | ||
And I press "Create Metric" | ||
Then I should see "Has already been taken" | ||
Then the provider should not have a metric with system name "carni_2" | ||
|
||
Scenario: Create a metric from the index page | ||
When I fill in "Friendly name" with "Antipasti" | ||
And I fill in "System name" with "antipasti" | ||
And I fill in "Unit" with "order" | ||
And I fill in "Description" with "The number of antipasti dishes ordered" | ||
And I press "Create Metric" | ||
Then I should see "Antipasti" | ||
And the provider should have a metric "Antipasti" | ||
And metric "Antipasti" should have the following attributes: | ||
| Friendly name | Antipasti | | ||
| System name | antipasti | | ||
| Unit | order | | ||
| Description | The number of antipasti dishes ordered | |
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,32 @@ | ||
@javascript | ||
Feature: Product > Integration > Metrics > Edit | ||
In Order to change a plan | ||
As a provider | ||
I should be able to delete a metric | ||
|
||
Background: | ||
Given a provider is logged in | ||
And the following metrics: | ||
| Pasta | | ||
And the following methods: | ||
| Carbonara | | ||
And I go to the metrics and methods page | ||
|
||
Scenario: Delete a method from the index page | ||
Given I change to tab "Methods" | ||
When I follow "Carbonara" | ||
And I press "Delete" and I confirm dialog box | ||
Then I should not see metric "Carbonara" | ||
And the provider should not have metric "Carbonara" | ||
|
||
Scenario: Delete a metric from the index page | ||
Given I change to tab "Metrics" | ||
When I follow "Pasta" | ||
And I press "Delete" and I confirm dialog box | ||
Then I should not see metric "Pasta" | ||
And the provider should not have metric "Pasta" | ||
|
||
Scenario: Default metric can't be deleted | ||
Given I change to tab "Metrics" | ||
When I follow "Hits" | ||
Then I should not see "Delete" |
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,39 @@ | ||
@javascript | ||
Feature: Product > Integration > Metrics > Edit | ||
In order to change my metrics for whatever reason | ||
As a provider | ||
I want to be able to modify them | ||
|
||
Background: | ||
Given a provider is logged in | ||
And the following metrics: | ||
| Antipasti | | ||
And the following methods: | ||
| Burrata | | ||
And I go to the metrics and methods page | ||
|
||
Scenario: Edit a method from the index page | ||
Given I change to tab "Methods" | ||
When I follow "Burrata" | ||
And I fill in "Friendly name" with "Burrata Panzanella" | ||
And I press "Update Method" | ||
Then I should see "Burrata Panzanella" | ||
And method "Burrata Panzanella" should have the following attributes: | ||
| Friendly name | Burrata Panzanella | | ||
| Unit | hit | | ||
|
||
Scenario: Can't change system name of default metric | ||
Given I change to tab "Metrics" | ||
When I follow "Hits" | ||
Then I should see field "System name" disabled | ||
|
||
Scenario: Edit a metric from the index page | ||
Given I change to tab "Metrics" | ||
When I follow "Antipasti" | ||
And I fill in "Friendly name" with "Carni" | ||
And I fill in "Unit" with "Orders" | ||
And I press "Update Metric" | ||
Then I should see "Carni" | ||
And metric "Carni" should have the following attributes: | ||
| Friendly name | Carni | | ||
| Unit | Orders | |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.