diff --git a/features/Personalization.feature b/features/Personalization.feature index 4f0cdf95..a53446fb 100644 --- a/features/Personalization.feature +++ b/features/Personalization.feature @@ -12,7 +12,7 @@ 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 @@ -20,10 +20,10 @@ Feature: Personalization When I select Then the personalization menu is updated with the 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: Personalization menu icon displayed Given I am on the SaaSquatch docs page at any location @@ -36,10 +36,10 @@ Feature: Personalization When I select Then the icon displayed is updated and matches 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 @@ -47,10 +47,10 @@ Feature: Personalization When I select Then the icon in the personalization menu that matches 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 @@ -60,10 +60,10 @@ Feature: Personalization When I navigate to different pages of the docs Then the selected 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 @@ -73,10 +73,10 @@ Feature: Personalization When I refresh the docs page Then the selected 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 @@ -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 @@ -99,10 +99,10 @@ Feature: Personalization When I click the personalization menu again Then the selected 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 @@ -119,10 +119,10 @@ Feature: Personalization When I select Then the personalization cookie is updated with a corresponding that matches 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 @@ -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 @@ -144,21 +144,21 @@ Feature: Personalization Then the personalization menu is updated with the new And 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 @@ -166,10 +166,10 @@ Feature: Personalization When I select with a corresponding Then the personalization menu is updated with the new and api methods not matching 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 @@ -178,7 +178,7 @@ Feature: Personalization Then the personalization menu is updated with the new And sidebar menu items that do not match 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 | diff --git a/src/navigation/PersonalisationSelect.tsx b/src/navigation/PersonalisationSelect.tsx index 4cc44e2e..87bf055d 100644 --- a/src/navigation/PersonalisationSelect.tsx +++ b/src/navigation/PersonalisationSelect.tsx @@ -127,10 +127,10 @@ export const PersonalisationSelect = () => { const headerText = version === "classic-only" - ? "Classic programs" + ? "Classic Only" : version === "ga-only" - ? "new programs" - : "all programs"; + ? "Current" + : "Classic Enabled"; return (
@@ -138,9 +138,7 @@ export const PersonalisationSelect = () => { setOpen((o) => !o)}> - {open - ? "Select a personalisation option" - : `Docs are being personalised for ${headerText}`} + {open ? "Select a personalisation option" : `${headerText}`} {!open ? ( @@ -157,37 +155,38 @@ export const PersonalisationSelect = () => {
- New Programs + Current - Useful for customers that have started using SaaSquatch since - 2019. Hides our classic program documentation. + Shows documentation for our current platform. Hides + documentation for classic referral programs.
-