Skip to content

Commit

Permalink
update VeeamTable test, add test for V8
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Sep 9, 2024
1 parent 7a0512b commit 5f7ab4a
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/react/ui-elements/Veeam/VeeamTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ describe('VeeamTable', () => {
veeamApplicationSelect: () => screen.getByLabelText(/Veeam application/i),
veeamVBO: () =>
screen.getByRole('option', {
name: /Veeam Backup for Microsoft 365/i,
name: /Veeam Backup for Microsoft 365 \(pre-v8\)/i,
}),
veeamVBOV8: () =>
screen.getByRole('option', {
name: /Veeam Backup for Microsoft 365 \(v8\)/i,
}),
immutableBackupToggle: () => screen.getByLabelText('enableImmutableBackup'),
};
Expand Down Expand Up @@ -206,7 +210,7 @@ describe('VeeamTable', () => {
await verifySuccessActions(mutationActions);
});

it('should skip the SOSAPI setup step when choosing Veeam Backup for Microsoft 365', async () => {
it('should skip the SOSAPI setup step when choosing Veeam Backup for Microsoft 365 (pre-v8)', async () => {
//Setup
server.resetHandlers(...goodHandlers);
setupTest();
Expand All @@ -225,6 +229,25 @@ describe('VeeamTable', () => {
await verifySuccessActions(VeeamVBOActions);
});

it('should skip the SOSAPI setup when choosing VeeamBackup for Microsoft 365 (v8)', async () => {
//Setup
server.resetHandlers(...goodHandlers);
setupTest();
//Exercise
//Select Veeam Backup for Microsoft 365 (v8)
await selectClick(selectors.veeamApplicationSelect());
await userEvent.click(selectors.veeamVBOV8());
await userEvent.type(selectors.accountName(), VEEAM_DEFAULT_ACCOUNT_NAME);
await userEvent.type(selectors.setBucketName(), bucketName);

await waitFor(() => {
expect(selectors.continueButton()).toBeEnabled();
});
await userEvent.click(selectors.continueButton());
//V
await verifySuccessActions(VeeamVBOActions);
});

it('should get non immutable policy when immutable backup is not selected', async () => {
//Setup
server.resetHandlers(...goodHandlers);
Expand Down

0 comments on commit 5f7ab4a

Please sign in to comment.