Skip to content

Commit

Permalink
Re-enable Playwright test
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertbates committed Jan 20, 2025
1 parent 01f231b commit 2de412d
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions dotcom-rendering/playwright/tests/user.features.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Standard as standardArticle } from '../../fixtures/generated/fe-article
import { disableCMP } from '../lib/cmp';
import { addCookie } from '../lib/cookies';
import { loadPageNoOkta } from '../lib/load-page';
import { stubResponse } from '../lib/network';

// skipped for now because we need to handle sign in with okta, not just cookies
test.skip('User cookies tests', () => {
// skipped for now because we need to handle sign in with okta, not just cookies`
test.describe('User cookies tests', () => {
const userAttributesApiUrl =
'https://members-data-api.theguardian.com/user-attributes';
const userBenefitsApiUrl =
Expand All @@ -22,7 +23,12 @@ test.skip('User cookies tests', () => {

await disableCMP(context);

const userBenefitsApiPromise = page.waitForRequest(userBenefitsApiUrl);
const userBenefitsApiPromise = stubResponse(page, userBenefitsApiUrl, {
status: 200,
body: JSON.stringify({
benefits: ['adFree', 'hideSupportMessaging'],
}),
});

await loadPageNoOkta(page, standardArticle, {
// user-features expects this config to be present
Expand Down Expand Up @@ -67,7 +73,12 @@ test.skip('User cookies tests', () => {

await disableCMP(context);

const userBenefitsApiPromise = page.waitForRequest(userBenefitsApiUrl);
const userBenefitsApiPromise = stubResponse(page, userBenefitsApiUrl, {
status: 200,
body: JSON.stringify({
benefits: ['adFree', 'hideSupportMessaging'],
}),
});

await loadPageNoOkta(page, standardArticle, {
// user-features expects this config to be present
Expand Down

0 comments on commit 2de412d

Please sign in to comment.