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

Change button label #426

Merged
merged 5 commits into from
Jul 31, 2024
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
4 changes: 2 additions & 2 deletions jhub_apps/static/js/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions jhub_apps/tests/tests_e2e/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def create_app(
share_with_groups=None,
):
logger.info("Creating App")
page.get_by_role("button", name="Create App").click()
page.get_by_role("button", name="Deploy App").click()
logger.info("Fill App display Name")
page.get_by_label("*Name").click()
page.get_by_label("*Name").fill(app_name)
Expand All @@ -106,10 +106,10 @@ def create_app(
logger.info("Expect Small Instance to be visible")
expect(small_instance_radio_button).to_be_visible()
small_instance_radio_button.check()
create_app_locator = page.get_by_role("button", name="Create App")
logger.info("Expect Create App button to be visible")
create_app_locator = page.get_by_role("button", name="Deploy App")
logger.info("Expect Deploy App button to be visible")
expect(create_app_locator).to_be_visible()
logger.info("Click Create App")
logger.info("Click Deploy App")
create_app_locator.click()


Expand Down
12 changes: 6 additions & 6 deletions ui/src/components/app-form/app-form.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('AppForm', () => {
// Attempt submitting without filling in required fields
const btn = baseElement.querySelector('#submit-btn') as HTMLButtonElement;
expect(btn).toBeInTheDocument();
expect(btn).toHaveTextContent('Create App');
expect(btn).toHaveTextContent('Deploy App');
expect(btn).not.toHaveAttribute('disabled', 'disabled');
await act(async () => {
btn.click();
Expand Down Expand Up @@ -283,7 +283,7 @@ describe('AppForm', () => {
// Attempt submitting without filling in required fields
const btn = baseElement.querySelector('#submit-btn') as HTMLButtonElement;
expect(btn).toBeInTheDocument();
expect(btn).toHaveTextContent('Create App');
expect(btn).toHaveTextContent('Deploy App');
expect(btn).not.toHaveAttribute('disabled', 'disabled');
await act(async () => {
btn.click();
Expand Down Expand Up @@ -353,7 +353,7 @@ describe('AppForm', () => {
// Attempt submitting without filling in required fields
const btn = baseElement.querySelector('#submit-btn') as HTMLButtonElement;
expect(btn).toBeInTheDocument();
expect(btn).toHaveTextContent('Create App');
expect(btn).toHaveTextContent('Deploy App');
expect(btn).not.toHaveAttribute('disabled', 'disabled');
await act(async () => {
btn.click();
Expand Down Expand Up @@ -410,7 +410,7 @@ describe('AppForm', () => {

const btn = baseElement.querySelector('#submit-btn') as HTMLButtonElement;
expect(btn).toBeInTheDocument();
expect(btn).toHaveTextContent('Create App');
expect(btn).toHaveTextContent('Deploy App');
expect(btn).not.toHaveAttribute('disabled', 'disabled');
await act(async () => {
btn.click();
Expand Down Expand Up @@ -556,7 +556,7 @@ describe('AppForm', () => {

const btn = baseElement.querySelector('#submit-btn') as HTMLButtonElement;
expect(btn).toBeInTheDocument();
expect(btn).toHaveTextContent('Create App');
expect(btn).toHaveTextContent('Deploy App');
expect(btn).not.toHaveAttribute('disabled', 'disabled');
await act(async () => {
btn.click();
Expand Down Expand Up @@ -726,7 +726,7 @@ describe('AppForm', () => {

const btn = baseElement.querySelector('#submit-btn') as HTMLButtonElement;
expect(btn).toBeInTheDocument();
expect(btn).toHaveTextContent('Create App');
expect(btn).toHaveTextContent('Deploy App');
expect(btn).not.toHaveAttribute('disabled', 'disabled');
await act(async () => {
btn.click();
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/app-form/app-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ export const AppForm = ({ id }: AppFormProps): React.ReactElement => {
) : id ? (
<>Save</>
) : (
<>Create App</>
<>Deploy App</>
)}
</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/home/apps-section/apps-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const AppsSection = (): React.ReactElement => {
window.location.href = `${API_BASE_URL}/create-app`;
}}
>
Create App
Deploy App
</Button>
</Item>
</Grid>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/home/home.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ describe('Home', () => {
});
});

test('should render create app button and respond to click events', async () => {
test('should render Deploy app button and respond to click events', async () => {
const { getByText } = render(componentWrapper);
await act(async () => {
const button = getByText('Create App');
const button = getByText('Deploy App');
expect(button).toBeTruthy();
fireEvent.click(button);
});
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/server-types/server-types.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ describe('ServerTypes', () => {
mockSearchParamsGet.mockRestore();
});

test('clicks back to create app', async () => {
test('clicks back to deploy app', async () => {
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useLocation: () => ({
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/server-types/server-types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export const ServerTypes = (): React.ReactElement => {
color="primary"
loading={submitting}
>
{id ? 'Save' : 'Create App'}
{id ? 'Save' : 'Deploy App'}
</LoadingButton>
</div>
</div>
Expand Down
Loading