Skip to content

Commit

Permalink
e2e: Disable new landing page for test users (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cass C authored Aug 5, 2022
1 parent 5514495 commit beb4612
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions e2e/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,27 @@ async function globalSetup(config: FullConfig) {

const adminContext = await request.newContext({
baseURL,
storageState: {
cookies: [{
name: '',
value: '',
domain: '',
path: '',
expires: 0,
httpOnly: false,
secure: false,
sameSite: 'None',
}],
origins: [{
origin: baseURL,
localStorage: [{
name: '__landingPageSeen__',
value: 'true',
}],
}],
},
});

await adminContext.post('/api/v4/users/login', {
data: {
login_id: userState.admin.username,
Expand All @@ -33,6 +53,25 @@ async function globalSetup(config: FullConfig) {
});
const requestContext = await request.newContext({
baseURL,
storageState: {
cookies: [{
name: '',
value: '',
domain: '',
path: '',
expires: 0,
httpOnly: false,
secure: false,
sameSite: 'None',
}],
origins: [{
origin: baseURL,
localStorage: [{
name: '__landingPageSeen__',
value: 'true',
}],
}],
},
});
await requestContext.post('/api/v4/users/login', {
data: {
Expand Down

0 comments on commit beb4612

Please sign in to comment.