Skip to content

Commit

Permalink
Fix missing field in setup confirmation (#2005)
Browse files Browse the repository at this point in the history
* Fix missing field in setup confirmation

* Change setup buttons text
  • Loading branch information
gillespi314 authored Sep 10, 2021
1 parent ca9cb48 commit 6a3458f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/all/setup/setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ describe("Setup", () => {
cy.contains("button:enabled", /next/i).click();

// Page 3
cy.contains("button:enabled", /submit/i).click();
cy.contains("button:enabled", /next/i).click();

// Page 4
cy.contains("button:enabled", /finish/i).click();
cy.contains("button:enabled", /confirm/i).click();

cy.url().should("match", /\/hosts\/manage$/i);
cy.contains(/all hosts/i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("ConfirmationPage - form", () => {
name: "Rachel Perkins",
email: "rachel@fleet.com",
org_name: "Fleet",
fleet_web_address: "http://localhost:8080",
server_url: "http://localhost:8080",
};

it("renders the user information", () => {
Expand All @@ -20,7 +20,7 @@ describe("ConfirmationPage - form", () => {
expect(form.text()).toContain(formData.name);
expect(form.text()).toContain(formData.email);
expect(form.text()).toContain(formData.org_name);
expect(form.text()).toContain(formData.fleet_web_address);
expect(form.text()).toContain(formData.server_url);
});

it("submits the form", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ConfirmationPage = ({
currentPage,
formData,
handleSubmit,
}: IConfirmationPageProps) => {
}: IConfirmationPageProps): JSX.Element => {
useEffect(() => {
if (currentPage) {
// Component has a transition duration of 300ms set in
Expand Down Expand Up @@ -57,12 +57,7 @@ const ConfirmationPage = ({
);
};

const {
email,
fleet_web_address: fleetWebAddress,
org_name: orgName,
name,
} = formData;
const { email, server_url: serverUrl, org_name: orgName, name } = formData;
const tabIndex = currentPage ? 1 : -1;

const confirmRegClasses = classnames(className, baseClass);
Expand All @@ -88,11 +83,8 @@ const ConfirmationPage = ({
<tr>
<th>Fleet URL:</th>
<td>
<span
className={`${baseClass}__table-url`}
title={fleetWebAddress}
>
{fleetWebAddress}
<span className={`${baseClass}__table-url`} title={serverUrl}>
{serverUrl}
</span>
</td>
</tr>
Expand All @@ -112,7 +104,7 @@ const ConfirmationPage = ({
disabled={!currentPage}
className="button button--brand"
>
Finish
Confirm
</Button>
</form>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class FleetDetails extends Component {
disabled={!currentPage}
className="button button--brand"
>
Submit
Next
</Button>
</form>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class RegistrationForm extends Component {
<ConfirmationPage
formData={formData}
handleSubmit={onSubmitConfirmation}
classNmae={confirmationClass}
className={confirmationClass}
currentPage={isCurrentPage(4)}
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/interfaces/registration_form_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export interface IRegistrationFormData {
org_web_url: string;
org_logo_url: string;
fleet_web_address: string;
server_url: string;
}

0 comments on commit 6a3458f

Please sign in to comment.