-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vrack-services): redirect to hub if app is feature-flipped
ref: MANAGER-14601 Signed-off-by: Nicolas Pierre-charles <nicolas.pierre-charles.ext@corp.ovh.com>
- Loading branch information
Nicolas Pierre-charles
committed
Jul 5, 2024
1 parent
c314ff8
commit b849f58
Showing
9 changed files
with
99 additions
and
8 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
packages/manager/apps/vrack-services/e2e/features/availability.feature
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,13 @@ | ||
Feature: vRack Services feature availability | ||
|
||
Scenario Outline: User gets redirected if vRack Services feature is not available | ||
Given Feature availability service is <apiOk> | ||
Given vRack Services feature is <availability> | ||
When User navigates to vRack Services Listing page | ||
Then User "<isRedirected>" redirected to HUB | ||
|
||
Examples: | ||
| apiOk | availability | isRedirected | | ||
| ok | available | is not | | ||
| ko | available | is | | ||
| ok | unavailable | is | |
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
22 changes: 22 additions & 0 deletions
22
packages/manager/apps/vrack-services/mocks/availability/index.ts
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,22 @@ | ||
import { Handler } from '@playwright-helpers'; | ||
|
||
export type GetAvailabilityMocksParams = { | ||
isVrackServicesUnavailable?: boolean; | ||
isAvailabilityServiceKo?: boolean; | ||
}; | ||
|
||
export const getAvailabilityMocks = ({ | ||
isVrackServicesUnavailable = false, | ||
isAvailabilityServiceKo = false, | ||
}: GetAvailabilityMocksParams): Handler[] => [ | ||
{ | ||
url: '/feature/vrack-services/availability', | ||
response: isAvailabilityServiceKo | ||
? { message: 'availability service error' } | ||
: { | ||
'vrack-services': !isVrackServicesUnavailable, | ||
}, | ||
status: isAvailabilityServiceKo ? 500 : 200, | ||
api: 'aapi', | ||
}, | ||
]; |
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