-
Notifications
You must be signed in to change notification settings - Fork 5
Core 1079 port adoption and interest pages to ts #2763
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
Core 1079 port adoption and interest pages to ts #2763
Conversation
| const {adoptionUrl} = useSalesforceContext(); | ||
| const validatePage = React.useCallback( | ||
| (page) => { | ||
| if (page === 1 && position === 'Student') { |
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.
Student processing can't get here
| }, []); | ||
| const doSubmit = React.useCallback( | ||
| (form) => { | ||
| if (selectedBooksRef.current?.length > 0) { |
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.
Can't get here with no selected books.
| return ( | ||
| <React.Fragment> | ||
| <FormTarget submitting={submitting} /> | ||
| <FormTarget /> |
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.
submitting isn't handled with a parameter anymore.
| value: 'Conference', | ||
| label: formatMessage({id: 'interest.option.Conference'}) | ||
| }, | ||
| {value: 'Email', label: formatMessage({id: 'interest.option.Email'})}, |
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.
Interesting choice by prettier
| // fireEvent(options[0], new MouseEvent('mouseenter', { | ||
| // bubbles: true | ||
| // })); | ||
| const i = options.findIndex((o) => o.getAttribute('aria-selected') === 'true'); |
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.
This test was intermittently failing, so I rewrote it. Seems to be happier.
| <body> | ||
| <section class="block-heading"> |
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.
Test coverage in the general page
| ); | ||
|
|
||
| const buttons = screen.getAllByRole('checkbox'); | ||
| const label = buttons[0].getAttribute('aria-label'); |
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.
A little Partner page functionality that didn't have test coverage: filter remover
CORE-1079