Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] EVEREST-1863 Remove confirmation screen form db wizard #1076

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ let token: string;

await test.step('Submit form', async () => {
await submitWizard(page);
await expect(
page.getByText('Awesome! Your database is being created!')
).toBeVisible();
});

await test.step('Check db list and status', async () => {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ const openResourcesModal = async (page: Page) => {

await test.step('Submit form', async () => {
await submitWizard(page);
await expect(
page.getByText('Awesome! Your database is being created!')
).toBeVisible();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ test.describe('DB Cluster creation', () => {

// await monitoringStepCheck(page, monitoringInstancesList);
await submitWizard(page);
await expect(
page.getByText('Awesome! Your database is being created!')
).toBeVisible();

const response = await request.get(
`/v1/namespaces/${namespace}/database-clusters`,
Expand Down Expand Up @@ -347,7 +344,6 @@ test.describe('DB Cluster creation', () => {
await advancedConfigurationStepCheck(page);
await moveForward(page);
await submitWizard(page);
await expect(page.getByTestId('db-wizard-goto-db-clusters')).toBeVisible();

await page.goto('/databases');
await waitForInitializingState(page, clusterName);
Expand Down
4 changes: 0 additions & 4 deletions ui/apps/everest/.e2e/release/demand-backup.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ test.describe.configure({ retries: 0 });

await test.step('Submit wizard', async () => {
await submitWizard(page);

await expect(
page.getByText('Awesome! Your database is being created!')
).toBeVisible();
});

// go to db list and check status
Expand Down
4 changes: 0 additions & 4 deletions ui/apps/everest/.e2e/release/init-deploy.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ test.describe.configure({ retries: 0 });

await test.step('Submit wizard', async () => {
await submitWizard(page);

await expect(
page.getByText('Awesome! Your database is being created!')
).toBeVisible();
});

await test.step('Check db list and status', async () => {
Expand Down
4 changes: 0 additions & 4 deletions ui/apps/everest/.e2e/release/pitr.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ test.describe.configure({ retries: 0 });

await test.step('Submit wizard', async () => {
await submitWizard(page);

await expect(
page.getByText('Awesome! Your database is being created!')
).toBeVisible();
});

await test.step('Check db list and status', async () => {
Expand Down
4 changes: 0 additions & 4 deletions ui/apps/everest/.e2e/release/scheduled-backup.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ function getNextScheduleMinute(incrementMinutes: number): string {

await test.step('Submit wizard', async () => {
await submitWizard(page);

await expect(
page.getByText('Awesome! Your database is being created!')
).toBeVisible();
});

await test.step('Check db list and status', async () => {
Expand Down
1 change: 0 additions & 1 deletion ui/apps/everest/.e2e/utils/db-wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const setPitrEnabledStatus = async (page: Page, checked: boolean) => {

export const submitWizard = async (page: Page) => {
await page.getByTestId('db-wizard-submit-button').click();
await expect(page.getByTestId('db-wizard-goto-db-clusters')).toBeVisible();
};

export const cancelWizard = async (page: Page) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export type BaseStatus =
| 'pending'
| 'success'
| 'deleting'
| 'unknown';
| 'unknown'
| 'creating';

export type StatusFieldProps<T extends string | number | symbol> = {
status: T;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export const STATUS_TO_ICON: Record<
paused: PausedIcon,
unknown: UknownIcon,
deleting: PendingIcon,
creating: PendingIcon,
};

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 5 additions & 4 deletions ui/apps/everest/src/pages/database-form/database-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { useCreateDbCluster } from 'hooks/api/db-cluster/useCreateDbCluster';
import { useActiveBreakpoint } from 'hooks/utils/useActiveBreakpoint';
import { steps } from './database-form-body/steps';
import { DbWizardType } from './database-form-schema';
import ConfirmationScreen from './database-form-body/steps/confirmation-screen';
import { useDatabasePageDefaultValues } from './useDatabaseFormDefaultValues';
import { useDatabasePageMode } from './useDatabasePageMode';
import { useDbValidationSchema } from './useDbValidationSchema';
Expand Down Expand Up @@ -167,9 +166,11 @@ export const DatabasePage = () => {
}
}, []);

return formSubmitted ? (
<ConfirmationScreen />
) : (
if (formSubmitted) {
navigate('/databases');
}

return (
<>
<Stepper noConnector activeStep={activeStep} sx={{ marginBottom: 4 }}>
{steps.map((_, idx) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export const DB_CLUSTER_STATUS_TO_BASE_STATUS: Record<
[DbClusterStatus.unknown]: 'unknown',
[DbClusterStatus.restoring]: 'pending',
[DbClusterStatus.deleting]: 'deleting',
[DbClusterStatus.creating]: 'creating',
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const DB_CLUSTER_STATUS_HUMANIFIED: Record<DbClusterStatus, string> = {
[DbClusterStatus.unknown]: Messages.statusProvider.unknown,
[DbClusterStatus.restoring]: Messages.statusProvider.restoring,
[DbClusterStatus.deleting]: Messages.statusProvider.deleting,
[DbClusterStatus.creating]: Messages.statusProvider.creating,
};

export const beautifyDbClusterStatus = (status: DbClusterStatus): string =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const Messages = {
unknown: 'Unknown',
restoring: 'Restoring',
deleting: 'Deleting',
creating: 'Creating',
},
lastBackup: {
warningTooltip: 'Check your backups page for more info',
Expand Down
1 change: 1 addition & 0 deletions ui/apps/everest/src/shared-types/dbCluster.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export enum DbClusterStatus {
error = 'error',
restoring = 'restoring',
deleting = 'deleting',
creating = 'creating',
}

export interface Schedule {
Expand Down
Loading