Skip to content

Commit

Permalink
Consistently use "Save" on all forms submit button (#5181)
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalabbad authored Dec 10, 2024
1 parent 846a428 commit e77be99
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions changelog/4850.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Consistently use "Save" on all object forms submit buttons
2 changes: 1 addition & 1 deletion frontend/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function App() {
/>
<RouterProvider router={router} />
</ApolloProvider>
<TanStackQueryDevtools />
<TanStackQueryDevtools buttonPosition="bottom-left" />
</QueryClientProvider>
</AuthProvider>
</Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const NumberPoolForm = ({
</Button>
)}

<FormSubmit>{currentObject ? "Update" : "Create"}</FormSubmit>
<FormSubmit>Save</FormSubmit>
</div>
</Form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/screens/role-management/account-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const AccountForm = ({
</Button>
)}

<FormSubmit>{currentObject ? "Update" : "Create"}</FormSubmit>
<FormSubmit>Save</FormSubmit>
</div>
</Form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const AccountGroupForm = ({
</Button>
)}

<FormSubmit>{currentObject ? "Update" : "Create"}</FormSubmit>
<FormSubmit>Save</FormSubmit>
</div>
</Form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const AccountRoleForm = ({
</Button>
)}

<FormSubmit>{currentObject ? "Update" : "Create"}</FormSubmit>
<FormSubmit>Save</FormSubmit>
</div>
</Form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const GlobalPermissionForm = ({
</Button>
)}

<FormSubmit>{currentObject ? "Update" : "Create"}</FormSubmit>
<FormSubmit>Save</FormSubmit>
</div>
</Form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const ObjectPermissionForm = ({
</Button>
)}

<FormSubmit>{currentObject ? "Update" : "Create"}</FormSubmit>
<FormSubmit>Save</FormSubmit>
</div>
</Form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/tests/e2e/form/select-2-steps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test.describe("Verifies the object creation", () => {

await page.getByTestId("select2step-2").getByTestId("select-open-option-button").click();
await page.getByRole("option", { name: ENDPOINT_NAME }).last().click();
await page.getByRole("button", { name: "Create" }).click();
await page.getByRole("button", { name: "Save" }).click();
await expect(page.getByText(`${KIND} created`)).toBeVisible();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test.describe("/resource-manager - Resource Manager", () => {
await page.getByRole("option", { name: "Speed" }).click();
await page.getByLabel("Start range *").fill("1");
await page.getByLabel("End range *").fill("10");
await page.getByRole("button", { name: "Create" }).click();
await page.getByRole("button", { name: "Save" }).click();
await expect(page.getByText("Number pool created")).toBeVisible();
});

Expand Down
4 changes: 2 additions & 2 deletions frontend/app/tests/e2e/role-management/roles-crud.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test.describe("Role management - Roles CRUD", () => {
.getByText("global:manage_repositories:")
.click();
await page.getByTestId("side-panel-container").getByLabel("Permissions").click();
await page.getByRole("button", { name: "Create" }).click();
await page.getByRole("button", { name: "Save" }).click();
await expect(page.getByText("Role created!")).toBeVisible();
});

Expand Down Expand Up @@ -69,7 +69,7 @@ test.describe("Role management - Roles CRUD", () => {
.getByText("global:manage_schema:allow_all")
.click();
await page.getByTestId("side-panel-container").getByLabel("Permissions").click();
await page.getByRole("button", { name: "Update" }).click();
await page.getByRole("button", { name: "Save" }).click();
await expect(page.getByText("Role updated!")).toBeVisible();
});

Expand Down

0 comments on commit e77be99

Please sign in to comment.