mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-22 19:05:56 -04:00
test: remove redundant and unreliable visibility checks
This commit is contained in:
parent
61d4ad8e70
commit
29b4362ea8
2 changed files with 4 additions and 4 deletions
test/integration
|
@ -127,9 +127,9 @@ describe('www-integration my_stuff', () => {
|
|||
// 6th studio should fail
|
||||
await navigate(myStuffURL);
|
||||
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
|
||||
// findByXpath checks for both presence and visibility
|
||||
const alertMessage = await findByXpath('//div[contains(@class, "alert-error")]');
|
||||
const errVisible = await alertMessage.isDisplayed();
|
||||
expect(errVisible).toBe(true);
|
||||
expect(alertMessage).toBeTruthy();
|
||||
|
||||
await navigate(rateLimitCheck);
|
||||
});
|
||||
|
|
|
@ -181,8 +181,8 @@ describe('studio management', () => {
|
|||
// click confirm
|
||||
// await clickXpath('//button[contains(@class, "confirm-transfer-button")]')
|
||||
await clickXpath('//span[contains(text(), "Confirm")]/..');
|
||||
// findByXpath checks for both presence and visibility
|
||||
const transferSuccess = await findByXpath('//div[contains(@class, "alert-success")]');
|
||||
const successVisible = await transferSuccess.isDisplayed();
|
||||
expect(successVisible).toBe(true);
|
||||
expect(transferSuccess).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue