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 c34fc4b commit 549714f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 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,9 @@ 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', () => {
test.describe('User cookies tests', () => {
const userAttributesApiUrl =
'https://members-data-api.theguardian.com/user-attributes';
const userBenefitsApiUrl =
Expand All @@ -22,7 +22,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 +72,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 549714f

Please sign in to comment.