-
Notifications
You must be signed in to change notification settings - Fork 481
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
Added tests for Progress View V2 Invitation #58471
Conversation
@@ -34,11 +34,13 @@ function InviteToV2ProgressModal({ | |||
const [invitationOpen, setInvitationOpen] = React.useState(false); | |||
|
|||
React.useEffect(() => { | |||
const timeSinceInvitationLastDelayed = () => { | |||
const numDaysSinceInvitationLastDelayed = () => { | |||
const MILLISECONDS_IN_ONE_DAY = 1000 * 3600 * 24; |
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.
Nit: move this constant outside the InviteToV2ProgressModal
function (to the top of the file).
it('renders the dialog with required elements', () => { | ||
renderDefault(); | ||
|
||
expect(screen.getByText(i18n.progressTrackingAnnouncement())).to.exist; |
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.
expect(screen.getByText(i18n.progressTrackingAnnouncement())).to.exist; | |
screen.getByText(i18n.progressTrackingAnnouncement()); |
getByText will throw an error if it is not found. We don't need the expect
statement and in fact get a much much better error message if we omit it.
Same for a bunch below.
Test following the PR for the invitation modal to V2 Progress view.
Note: eyes tests will be in future PR
Links