-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(veeam-backup): add new product veeam-backup (#12611)
ref: MANAGER-14740 Signed-off-by: Nicolas Pierre-charles <[email protected]> Co-authored-by: David Arsène <[email protected]>
- Loading branch information
Showing
145 changed files
with
4,159 additions
and
41 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
Binary file added
BIN
+381 Bytes
packages/manager/apps/container/src/assets/images/sidebar/veeam-backup-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,2 @@ | ||
e2e/reports | ||
coverage |
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,3 @@ | ||
# @ovh-ux/manager-veeam-backup-app | ||
|
||
> veeam backup app |
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,20 @@ | ||
const isCI = process.env.CI; | ||
|
||
module.exports = { | ||
default: { | ||
paths: ['e2e/features/**/*.feature'], | ||
require: [ | ||
'../../../../playwright-helpers/bdd-setup.ts', | ||
'e2e/**/*.step.ts', | ||
], | ||
requireModule: ['ts-node/register'], | ||
format: [ | ||
'summary', | ||
isCI ? 'progress' : 'progress-bar', | ||
!isCI && ['html', 'e2e/reports/cucumber-results-report.html'], | ||
!isCI && ['usage-json', 'e2e/reports/cucumber-usage-report.json'], | ||
].filter(Boolean), | ||
formatOptions: { snippetInterface: 'async-await' }, | ||
retry: 1, | ||
}, | ||
}; |
7 changes: 7 additions & 0 deletions
7
packages/manager/apps/veeam-backup/e2e/features/onboarding.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,7 @@ | ||
Feature: Onboarding page | ||
|
||
Scenario: User wants to find informations related to veeam-backup | ||
Given User has 0 elements in the Listing page | ||
When User navigates to Listing page | ||
Then User gets redirected to Onboarding page | ||
Then User sees 3 guides |
32 changes: 32 additions & 0 deletions
32
packages/manager/apps/veeam-backup/e2e/step-definitions/onboarding.step.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,32 @@ | ||
import { Given, When, Then } from '@cucumber/cucumber'; | ||
import { expect } from '@playwright/test'; | ||
import { ICustomWorld } from '../../../../../../playwright-helpers'; | ||
import { ConfigParams, getUrl, setupNetwork } from '../utils'; | ||
|
||
Given('User has {int} elements in the Listing page', function( | ||
this: ICustomWorld<ConfigParams>, | ||
nb: number, | ||
) { | ||
this.handlersConfig.nbBackup = nb; | ||
}); | ||
|
||
When('User navigates to Listing page', async function( | ||
this: ICustomWorld<ConfigParams>, | ||
) { | ||
await setupNetwork(this); | ||
await this.page.goto(getUrl('listing'), { waitUntil: 'load' }); | ||
}); | ||
|
||
Then('User gets redirected to Onboarding page', async function( | ||
this: ICustomWorld<ConfigParams>, | ||
) { | ||
await expect(this.page).toHaveURL(getUrl('onboarding')); | ||
}); | ||
|
||
Then('User sees {int} guides', async function( | ||
this: ICustomWorld<ConfigParams>, | ||
nbGuides: number, | ||
) { | ||
const guides = await this.page.locator('osds-tile'); | ||
await expect(guides).toHaveCount(nbGuides); | ||
}); |
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,7 @@ | ||
import { urls } from '../../src/routes/routes.constant'; | ||
|
||
export const appUrl = 'http://localhost:9001/app'; | ||
|
||
export type AppRoute = keyof typeof urls; | ||
|
||
export const getUrl = (route: AppRoute) => `${appUrl}/#${urls[route]}`; |
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,2 @@ | ||
export * from './network'; | ||
export * from './constants'; |
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,45 @@ | ||
import { BrowserContext } from '@playwright/test'; | ||
import { | ||
getServicesMocks, | ||
GetServicesMocksParams, | ||
} from '@ovh-ux/manager-react-components/src/hooks/services/mocks/services.mock'; | ||
import { | ||
ICustomWorld, | ||
toPlaywrightMockHandler, | ||
Handler, | ||
} from '../../../../../../playwright-helpers'; | ||
import { | ||
GetAuthenticationMocks, | ||
getAuthenticationMocks, | ||
} from '../../../../../../playwright-helpers/mocks/auth'; | ||
import { | ||
getIamMocks, | ||
getOrganizationMocks, | ||
GetOrganizationMocksParams, | ||
getVeeamBackupMocks, | ||
GetVeeamBackupMocksParams, | ||
} from '../../mocks'; | ||
|
||
export type ConfigParams = GetAuthenticationMocks & | ||
GetVeeamBackupMocksParams & | ||
GetOrganizationMocksParams & | ||
GetServicesMocksParams; | ||
|
||
export const getConfig = (params: ConfigParams): Handler[] => | ||
[ | ||
getAuthenticationMocks, | ||
getIamMocks, | ||
getOrganizationMocks, | ||
getVeeamBackupMocks, | ||
getServicesMocks, | ||
].flatMap((getMocks) => getMocks(params)); | ||
|
||
export const setupNetwork = async (world: ICustomWorld) => | ||
Promise.all( | ||
getConfig({ | ||
...((world?.handlersConfig as ConfigParams) || ({} as ConfigParams)), | ||
isAuthMocked: true, | ||
}) | ||
.reverse() | ||
.map(toPlaywrightMockHandler(world.context as BrowserContext)), | ||
); |
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta name="mobile-web-app-capable" content="yes" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<title>OVHcloud</title> | ||
<link rel="shortcut icon" href="images/favicon.png" /> | ||
<link rel="apple-touch-icon" href="images/touchicon-180.png" /> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong> | ||
We're sorry but this application doesn't work properly without | ||
JavaScript enabled. Please enable it to continue. | ||
</strong> | ||
</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="./src/index.tsx"></script> | ||
</body> | ||
</html> |
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 @@ | ||
[ | ||
{ | ||
"resourceURN": "urn:v1:resource:vmwareCloudDirectorBackup:BackupA", | ||
"authorizedActions": [ | ||
"vmwareCloudDirectorBackup:apiovh:get", | ||
"vmwareCloudDirector:apiovh:organization/get", | ||
"account:apiovh:iam/resource/edit", | ||
"account:apiovh:service/terminate" | ||
], | ||
"unauthorizedActions": [] | ||
}, | ||
{ | ||
"resourceURN": "urn:v1:resource:vmwareCloudDirectorBackup:BackupB", | ||
"authorizedActions": [], | ||
"unauthorizedActions": [ | ||
"vmwareCloudDirectorBackup:apiovh:get", | ||
"vmwareCloudDirector:apiovh:organization/get", | ||
"account:apiovh:iam/resource/edit", | ||
"account:apiovh:service/terminate" | ||
] | ||
} | ||
] |
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,15 @@ | ||
import { PathParams } from 'msw'; | ||
import { Handler } from '../../../../../playwright-helpers'; | ||
import resourceList from './iam.json'; | ||
|
||
const findResourceByUrn = (params: PathParams) => | ||
resourceList.find(({ resourceURN }) => resourceURN === params.urn); | ||
|
||
export const getIamMocks = (): Handler[] => [ | ||
{ | ||
url: '/iam/resource/:urn/authorization/check', | ||
response: (_: unknown, params: PathParams) => findResourceByUrn(params), | ||
api: 'v2', | ||
method: 'post', | ||
}, | ||
]; |
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,3 @@ | ||
export * from './vcd-organization.mock'; | ||
export * from './veeam-backup.mock'; | ||
export * from './iam.mock'; |
Oops, something went wrong.