test: stabilize browser session setup and OpenAPI assertions
This commit is contained in:
1 parent
ca32d3767f
commit
eacfab0dd8
12 files changed
+459
-2
No files matched your search
@@ -15,6 +15,10 @@ async function login(page) {
|
||||
await page.locator('.btn-signin').click();
|
||||
await expect(page).toHaveURL(/\/$/);
|
||||
await expect(page.locator('.page-title, .page-heading').first()).toBeVisible();
|
||||
await page.waitForFunction(() => Boolean(window.CrankAuth && typeof window.CrankAuth.fetchSession === 'function'));
|
||||
await page.evaluate(async () => {
|
||||
await window.CrankAuth.fetchSession(false);
|
||||
});
|
||||
}
|
||||
|
||||
async function browserJson(page, method, urlPath, body, okStatuses = [200]) {
|
||||
|
||||
Reference in new issue
Block a user