Skip to content

Commit 7a157ea

Browse files
committed
cookies-redirect: add page output check
1 parent 421eb4d commit 7a157ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

puppeteer/cookies-redirect.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ assert.strictEqual(1, cookies.length, 'Exactly one cookie is set');
3434
assert.strictEqual('manual', cookies[0].name, 'Cookie name is manual');
3535
assert.strictEqual('B', cookies[0].value, 'Cookie value is B');
3636

37+
// check the httpbin output from the srv POV.
38+
const element = await page.$('pre');
39+
const pre = await page.evaluate(el => el.textContent, element);
40+
const obj = JSON.parse(pre);
41+
assert.equal(obj.manual, "B");
42+
3743
await page.close();
3844
await context.close();
3945
await browser.disconnect();

0 commit comments

Comments
 (0)