mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 22:16:26 +00:00
test(admin): wait for the addon list's empty state after a failed load
The empty state shows once loading has ended, which can come a render after the toast; the test read it in the same tick and failed now and then.
This commit is contained in:
@@ -106,7 +106,8 @@ describe('MAdminAddonManager', () => {
|
||||
render(<><ToastContainer /><MAdminAddonManager /></>);
|
||||
|
||||
await screen.findByText('Failed to update addon');
|
||||
expect(screen.getByText('No addons available')).toBeInTheDocument();
|
||||
// The empty state follows the toast once loading has ended, not in the same render.
|
||||
expect(await screen.findByText('No addons available')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-AADD-005: trip addons render with the section band, catalog label and type badge', async () => {
|
||||
|
||||
Reference in New Issue
Block a user