Improvement to OLButton loading labels (#28659)

* Create eslint rule for requiring loadingLabel prop when isLoading is specified on OLButton

* Add `loadingLabel` props for OLButton components with `isLoading`

* Clarify loading label and button loading state

GitOrigin-RevId: 89279d5b4c346f9c3b67a59d0db822a2ff04314a
This commit is contained in:
Rebeka Dekany
2025-09-26 08:05:41 +00:00
committed by Copybot
parent ab84e48545
commit aebff54a6b
28 changed files with 59 additions and 6 deletions
@@ -884,7 +884,7 @@ describe('<UserNotifications />', function () {
screen.getByRole('button', { name: 'Send confirmation code' })
)
await waitForElementToBeRemoved(() => screen.getByText(/loading/i))
await waitForElementToBeRemoved(() => screen.getByText(/sending/i))
screen.getByText(/Enter the 6-digit code sent to foo@overleaf.com/i)
expect(sendReconfirmationMock.callHistory.called()).to.be.true
fireEvent.click(
@@ -220,7 +220,7 @@ describe('<EmailsSection />', function () {
await waitForElementToBeRemoved(() =>
screen.getByRole('button', {
name: 'Loading',
name: /adding/i,
})
)