# Storagestateis OK but not in all test()

**URL:** <https://club.ministryoftesting.com/t/storagestateis-ok-but-not-in-all-test/65596>\
**Category:** Discussions\
**Tags:** api-testing\
**Created:** [7 March 2023 12:48 UTC](https://club.ministryoftesting.com/t/storagestateis-ok-but-not-in-all-test/65596 "2023-03-07T12:48:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kovacsdongo](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kovacsdongo](https://club.ministryoftesting.com/u/kovacsdongo)\
**Post date:** [7 March 2023 12:48 UTC](https://club.ministryoftesting.com/t/storagestateis-ok-but-not-in-all-test/65596/1 "2023-03-07T12:48:45Z")

</div>

hi All,  
I use playwright fw.  
I save storagestate.json before test with global-setup.ts  
in config i add: storageState: ‘storageState.json’,

my tests:

test.only(‘use state’, async ({ page,request }) =\> {  
//this step is working with storagestate  
await page.goto('[IMS](https://stage-app-avander-ims-ui.azurewebsites.net/%27));  
await page.getByRole(‘link’, { name: ‘Cases’ }).click()  
//but this is not working the response is 401 but why, because i am not navigate windows or anything  
const response = await request.get("[https://stage-app-avander-ims-ui.azurewebsites.net/api/activity/list"](https://stage-app-avander-ims-ui.azurewebsites.net/api/activity/list%22))  
console.log((await response.body()).toString())  
expect(response.status()).toBe(200)  
})  
thanks the help in advance

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/system/32/14378_2.png) [@system](https://club.ministryoftesting.com/u/system)\
**Post date:** [6 March 2025 12:49 UTC](https://club.ministryoftesting.com/t/storagestateis-ok-but-not-in-all-test/65596/2 "2025-03-06T12:49:27Z")

</div>

This topic was automatically closed after 730 days. New replies are no longer allowed.
