Skip to content

Commit

Permalink
DS: updating specs and copy
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekSiemens committed Dec 7, 2022
1 parent a0e8ba6 commit a4b31d4
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 70 deletions.
120 changes: 60 additions & 60 deletions features/Personalization.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ Feature: Personalization
Scenario: Personalization menu default state
Given I load the SaaSquatch docs page at any location for the first time
And a personalization menu is shown at the top of the main content section
Then the default option of "Docs are being personalised for new programs" is selected
Then the default option of "Current" is selected

Scenario Outline: Personalization menu filter state can be changed
Given I am on the SaaSquatch docs page at any location
And a personalization menu is shown at the top of the main content section
When I select <filter option>
Then the personalization menu is updated with the selected <filter option>
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario: Personalization menu icon displayed
Given I am on the SaaSquatch docs page at any location
Expand All @@ -36,21 +36,21 @@ Feature: Personalization
When I select <filter option>
Then the icon displayed is updated and matches <filter option>
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario Outline: Personalization menu active icon is updated
Given I am on the SaaSquatch docs page at any location
And a personalization menu is shown at the top of the main content section
When I select <filter option>
Then the icon in the personalization menu that matches <filter option> displayed in colour and not grey
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario Outline: Personalization menu state is maintained when navigating
Given I am on the SaaSquatch docs page at any location
Expand All @@ -60,10 +60,10 @@ Feature: Personalization
When I navigate to different pages of the docs
Then the selected <filter option> remains
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario Outline: Personalization menu state is maintained when refreshing
Given I am on the SaaSquatch docs page at any location
Expand All @@ -73,10 +73,10 @@ Feature: Personalization
When I refresh the docs page
Then the selected <filter option> remains
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario Outline: Personalization menu only one filter can be selected
Given I am on the SaaSquatch docs page at any location
Expand All @@ -86,10 +86,10 @@ Feature: Personalization
When I attempt to select a second filter term
Then the personalization menu only allows a single filter term to be selected
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario Outline: Personalization menu selected filter is shown
Given I am on the SaaSquatch docs page at any location
Expand All @@ -99,10 +99,10 @@ Feature: Personalization
When I click the personalization menu again
Then the selected <filter option> is updated
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario: Personalization cookie is not dropped on first load
Given I load the SaaSquatch docs page at any location for the first time
Expand All @@ -119,10 +119,10 @@ Feature: Personalization
When I select <filter option>
Then the personalization cookie is updated with a corresponding <cookie value> that matches <filter option>
Examples:
| filter option | cookie value |
| Docs are being personalised for new programs | ga-only |
| Docs are being personalised for Classic programs | classic-only |
| Docs are being personalised for all programs | everything |
| filter option | cookie value |
| Current | ga-only |
| Classic Only | classic-only |
| Classic Enabled | everything |

Scenario Outline: Personalization menu state is lost when cookies are cleared
Given I am on the SaaSquatch docs page at any location
Expand All @@ -132,10 +132,10 @@ Feature: Personalization
When I clear my browser cookies
Then the personalization menu reverts to the default state
Examples:
| filter option |
| Docs are being personalised for new programs |
| Docs are being personalised for Classic programs |
| Docs are being personalised for all programs |
| filter option |
| Current |
| Classic Only |
| Classic Enabled |

Scenario Outline: Rest API Reference methods are shown/hidden based on selected personalization menu state
Given I am on the SaaSquatch docs page at the "../api/methods" location
Expand All @@ -144,32 +144,32 @@ Feature: Personalization
Then the personalization menu is updated with the new <filterOption>
And <apiMethod> is visible in the REST API Reference
Examples:
| filterOption | filterValue | apiMethod |
| Docs are being personalised for new programs | ga-only | /api/v1/{tenant_alias}/account/{accountId} |
| Docs are being personalised for new programs | ga-only | /api/v1/{tenant_alias}/open/account/{accountId} |
| Docs are being personalised for new programs | ga-only | /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} |
| Docs are being personalised for new programs | ga-only | /api/v1/{tenant_alias}/code/{code} |
| Docs are being personalised for new programs | ga-only | /api/v1/{tenant_alias}/referrals |
| Docs are being personalised for new programs | ga-only | /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}/shareurls |
| Docs are being personalised for new programs | ga-only | /api/v1/{tenant_alias}/theme/{locale}/variables/instance |
| Docs are being personalised for Classic programs | classic-only | /api/v1/{tenant_alias}/accountsync |
| Docs are being personalised for Classic programs | classic-only | /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/sharelinks |
| Docs are being personalised for Classic programs | classic-only | /api/v1/{tenant_alias}/open/user/cookie_user |
| Docs are being personalised for Classic programs | classic-only | /api/v1/{tenant_alias}/discount/{code} |
| Docs are being personalised for Classic programs | classic-only | /api/v1/{tenant_alias}/discount |
| Docs are being personalised for Classic programs | classic-only | /api/v1/{tenant_alias}/account/{accountId}/discount |
| Docs are being personalised for all programs | everything | all api methods |
| filterOption | filterValue | apiMethod |
| Current | ga-only | /api/v1/{tenant_alias}/account/{accountId} |
| Current | ga-only | /api/v1/{tenant_alias}/open/account/{accountId} |
| Current | ga-only | /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} |
| Current | ga-only | /api/v1/{tenant_alias}/code/{code} |
| Current | ga-only | /api/v1/{tenant_alias}/referrals |
| Current | ga-only | /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}/shareurls |
| Current | ga-only | /api/v1/{tenant_alias}/theme/{locale}/variables/instance |
| Classic Only | classic-only | /api/v1/{tenant_alias}/accountsync |
| Classic Only | classic-only | /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/sharelinks |
| Classic Only | classic-only | /api/v1/{tenant_alias}/open/user/cookie_user |
| Classic Only | classic-only | /api/v1/{tenant_alias}/discount/{code} |
| Classic Only | classic-only | /api/v1/{tenant_alias}/discount |
| Classic Only | classic-only | /api/v1/{tenant_alias}/account/{accountId}/discount |
| Classic Enabled | everything | all api methods |

Scenario Outline: Hidden Rest API Reference methods are shown at bottom of page
Given I am on the SaaSquatch docs page at the ../api/methods location
And a personalization menu is shown at the top of the main content section
When I select <filter option> with a corresponding <filter value>
Then the personalization menu is updated with the new <filter option> and api methods not matching <filter value> are shown in the "Hidden Methods" section at the bottom of the "Rest API Reference" page
Examples:
| filter option | filter value |
| Docs are being personalised for new programs | ga-only |
| Docs are being personalised for Classic programs | classic-only |
| Docs are being personalised for all programs | everything |
| filter option | filter value |
| Current | ga-only |
| Classic Only | classic-only |
| Classic Enabled | everything |

Scenario Outline: Sidebar menu items are shown/hidden based on selected personalization menu state
Given I am on the SaaSquatch docs page at the ../api/methods location
Expand All @@ -178,7 +178,7 @@ Feature: Personalization
Then the personalization menu is updated with the new <filter option>
And sidebar menu items that do not match <filter value> are hidden
Examples:
| filter option | filter value |
| Docs are being personalised for new programs | ga-only |
| Docs are being personalised for Classic programs | classic-only |
| Docs are being personalised for all programs | everything |
| filter option | filter value |
| Current | ga-only |
| Classic Only | classic-only |
| Classic Enabled | everything |
20 changes: 10 additions & 10 deletions src/navigation/PersonalisationSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ export const PersonalisationSelect = () => {
<Preview onClick={() => setOpen((o) => !o)}>
<OptionIcon fill="#a3a3a3" />
<Info>
{open
? "Select a personalisation option"
: `${headerText}`}
{open ? "Select a personalisation option" : `${headerText}`}
</Info>
{!open ? (
<ExpandIcon>
Expand All @@ -159,7 +157,8 @@ export const PersonalisationSelect = () => {
<div>
<Name>Current</Name>
<Description>
Our current platform.
Shows documentation for our current platform. Hides
documentation for classic referral programs.
</Description>
</div>
</Option>
Expand All @@ -170,9 +169,10 @@ export const PersonalisationSelect = () => {
<div>
<Name>Classic Enabled</Name>
<Description>
Shows all documentation, including both current and classic-only program documentation.
Useful for customers that have a program created before 2019, but are also running current loyalty,
referral or partner programs.
Shows all documentation, including both current and
classic-only program documentation. Useful for customers that
have a program created before 2019, but are also running
current loyalty, referral or partner programs.
</Description>
</div>
</Option>
Expand All @@ -183,13 +183,13 @@ export const PersonalisationSelect = () => {
<div>
<Name>Classic Only</Name>
<Description>
Useful for customers that started using SaaSquatch before
2019 and are only running a classic referral program. Hides
Useful for customers that started using SaaSquatch before 2019
and are only running a classic referral program. Hides
documentation that works with current referral and loyalty
programs.
</Description>
</div>
</Option>
</Option>
</OptionWrapper>
)}
</Personalisation>
Expand Down

0 comments on commit a4b31d4

Please sign in to comment.