tests: More updates
- `npm run test:single` runs jest with `-w 1`, makes the output readable - adds testIds to the radio buttons, I think it's a bit bugged where if you click the label it'll automatically switch to the first radio button (even if you click the label of the 2nd button) - moved a misplaced wait
This commit is contained in:
parent
da5df65394
commit
33e9db6681
3 changed files with 11 additions and 6 deletions
|
|
@ -257,13 +257,14 @@ describe('Step Registration', () => {
|
|||
.getByLabelText('Embed an activation key and register systems on first boot')
|
||||
.click();
|
||||
|
||||
const p1 = waitForElementToBeRemoved(() => screen.queryByLabelText('Organization ID'));
|
||||
const p1 = waitForElementToBeRemoved(() => screen.queryByTestId('organization-id'));
|
||||
const p2 = waitForElementToBeRemoved(() => screen.queryByTestId('subscription-activation'));
|
||||
|
||||
// then click the first radio button which should remove any input fields
|
||||
screen
|
||||
.getByLabelText('Register the system later')
|
||||
.getByTestId('register-later-radio-button')
|
||||
.click();
|
||||
|
||||
await p1;
|
||||
await p2;
|
||||
});
|
||||
|
|
@ -325,10 +326,10 @@ describe('Click through all steps', () => {
|
|||
next.click();
|
||||
|
||||
// registration
|
||||
await screen.findByTestId('subscription-activation');
|
||||
screen
|
||||
.getByLabelText('Embed an activation key and register systems on first boot')
|
||||
.click();
|
||||
await screen.findByTestId('subscription-activation');
|
||||
userEvent.type(screen.getByTestId('subscription-activation'), '1234567890');
|
||||
next.click();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue