Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' into t3chguy/fix/18014
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Apr 25, 2022
2 parents de69470 + e373531 commit 0187b94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/end-to-end-tests/src/scenarios/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { strict as assert } from 'assert';

import { ElementSession } from "../session";

const NEW_VERSION = "some-new-version";

async function mockVersionHTTPResponse(session: ElementSession) {
// Mock the HTTP response to return a new version to trigger auto-update behaviour
await session.page.setRequestInterception(true);
Expand All @@ -29,7 +31,7 @@ async function mockVersionHTTPResponse(session: ElementSession) {
request.respond({
contentType: "text/html",
status: 200,
body: "some-new-version",
body: NEW_VERSION,
});
} else {
request.continue();
Expand All @@ -43,5 +45,5 @@ export async function updateScenarios(session: ElementSession) {
await session.goto(session.url('/'));
await session.waitForReload();
const newUrl = new URL(session.page.url());
assert.equal(newUrl.searchParams.get("updated"), "1");
assert.equal(newUrl.searchParams.get("updated"), NEW_VERSION);
}

0 comments on commit 0187b94

Please sign in to comment.