puppeteer: Wait for save button before checking the text.

Found a flake that this caused with runs for the previous fix.
The waitForSelector was in a wrong order.
This commit is contained in:
Dinesh 2020-09-05 16:00:00 +00:00 committed by Steve Howell
parent 6dc2547336
commit cc4f35bfa8
1 changed files with 1 additions and 1 deletions

View File

@ -89,12 +89,12 @@ async function test_permissions_change_save_worked(page) {
async function submit_stream_permissions_change(page) {
const save_button = "#org-submit-stream-permissions";
await page.waitForSelector(save_button, {visible: true});
assert.strictEqual(
await common.get_text_from_selector(page, save_button),
"Save changes",
"Save button didn't appear for permissions change.",
);
await page.waitForSelector(save_button, {visible: true});
await page.click(save_button);
await test_permissions_change_save_worked(page);