Wizard: refactor Satellite validation

The Satellite token navigation was a bit too overengineered, refactoring
for better readability.
This commit is contained in:
Anna Vítová 2025-05-14 10:34:28 +02:00 committed by Klara Simickova
parent d5969a2c9e
commit 2ee812efe0
2 changed files with 52 additions and 38 deletions

View file

@ -101,7 +101,9 @@ const addSatelliteRegistrationCommandViaKeyDown = async (command: string) => {
/registration command/i
);
await waitFor(() => user.clear(satelliteRegistrationCommand));
await waitFor(() => user.type(satelliteRegistrationCommand, command));
satelliteRegistrationCommand.blur();
};
const uploadFile = async (scriptName: string): Promise<void> => {
@ -435,7 +437,7 @@ describe('Registration request generated correctly', () => {
);
const expiredTokenHelper = await screen.findByText(
/The token is expired. Expiration date/i
/The token is expired./i
);
await waitFor(() => expect(expiredTokenHelper).toBeInTheDocument());