-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix/infinite loop #1234
Fix/infinite loop #1234
Changes from 3 commits
8987ddd
d5b0b07
cf68ede
d1a729a
a33fade
5697ea7
063bf15
dcb8998
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
describe("New applications page", function () { | ||
it("renders the new application form", function () { | ||
cy.visit("/applications/start/choose-language") | ||
cy.get("form").should("have.length.of.at.least", 1) | ||
cy.get("h3.field-label--caps").contains("Choose Your Language") | ||
}) | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ import { | |
FormCard, | ||
ProgressNav, | ||
UserContext, | ||
blankApplication, | ||
t, | ||
} from "@bloom-housing/ui-components" | ||
import { useForm } from "react-hook-form" | ||
|
@@ -37,9 +36,8 @@ export default () => { | |
setSubmitted(true) | ||
if (previousApplication && useDetails) { | ||
conductor.application = previousApplication | ||
} else { | ||
conductor.application = blankApplication() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had this here so if somebody went back in their browser history and changed to not autofilling the application, it'd be rewritten as a blank application. Otherwise they could never undo their choice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jaredcwhite , how close do you think we are to being able to merge the Next branch? If you're thinking next week, then can we get this in first? We're in a tough spot of not wanting to delay the Next updates any longer, but we also don't want to stack up a lot of dependencies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @seanmalbert Oh I want to get Next v10 ready to merge today, so I think this could follow suit. |
||
} | ||
|
||
context.syncApplication(conductor.application) | ||
conductor.sync() | ||
conductor.routeToNextOrReturnUrl() | ||
|
@@ -61,7 +59,7 @@ export default () => { | |
) | ||
if (data) { | ||
if (data.items.length > 0) { | ||
setPreviousApplication(new AutofillCleaner(data.items[0]).clean()) | ||
setPreviousApplication(new AutofillCleaner(data.items[0], application).clean()) | ||
} else { | ||
onSubmit() | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything untyped here…do we still need the disable comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch! Removing it...