tests: Redo waiting for elements to be removed to resolve warning

gets rid of:

Warning: You seem to have overlapping act() calls, this is not
supported. Be sure to await previous act() calls before making a
new one.
This commit is contained in:
Aleksandar Todorov 2020-11-24 13:39:56 +02:00 committed by Sanne Raymaekers
parent e106a32431
commit 49044c5746

View file

@ -258,8 +258,10 @@ describe('Step Registration', () => {
.getByLabelText('Embed an activation key and register systems on first boot')
.click();
const p1 = waitForElementToBeRemoved(() => screen.queryByTestId('organization-id'));
const p2 = waitForElementToBeRemoved(() => screen.queryByTestId('subscription-activation'));
const p1 = waitForElementToBeRemoved(() => [
screen.getByTestId('organization-id'),
screen.getByTestId('subscription-activation'),
]);
// then click the first radio button which should remove any input fields
screen
@ -267,7 +269,6 @@ describe('Step Registration', () => {
.click();
await p1;
await p2;
});
});