mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 18:20:09 +02:00
[web] Fix flaky frontend test in UserNotifications -> Affiliation (#29315)
* Temporary: forcibly reproduce the loading state and test failure with a `setTimeout` * Wait for the loading to be finished in the test * Revert "Temporary: forcibly reproduce the loading state and test failure with a `setTimeout`" This reverts commit fb0270cc0cacd49fcff74e186b50b55f822f7729. * Let the test pass if the loading text is not found * Replace `getByTest` to `findByText` so it awaits GitOrigin-RevId: 6cee6e3a86b6a5f24d95c7e3e1fcef4c4efcc094
This commit is contained in:
@@ -885,7 +885,10 @@ describe('<UserNotifications />', function () {
|
||||
)
|
||||
|
||||
await waitForElementToBeRemoved(() => screen.getByText(/sending/i))
|
||||
screen.getByText(/Enter the 6-digit code sent to foo@overleaf.com/i)
|
||||
// Sometimes we need to wait for useWaitForI18n to be ready
|
||||
await screen.findByText(
|
||||
/Enter the 6-digit code sent to foo@overleaf.com/i
|
||||
)
|
||||
expect(sendReconfirmationMock.callHistory.called()).to.be.true
|
||||
fireEvent.click(
|
||||
screen.getByRole('button', { name: /resend confirmation code/i })
|
||||
|
||||
Reference in New Issue
Block a user