-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: geo 567 integrate delete reports teardown in the playwright tes…
…ts (#507) Co-authored-by: Sukanya Rath <[email protected]>
- Loading branch information
1 parent
7aac138
commit 219ef95
Showing
11 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
import { test } from '@playwright/test'; | ||
import { PagePaths } from './utils'; | ||
import { PTPage } from './pages/page'; | ||
import { | ||
EXTERNAL_API_BASE_URL, | ||
EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY, | ||
PagePaths, | ||
} from './utils'; | ||
import { PTPage, User } from './pages/page'; | ||
import { waitForApiResponses } from './utils/report'; | ||
|
||
test('logout', async ({ page }) => { | ||
await page.goto(PagePaths.DASHBOARD); | ||
test('logout', async ({ page, request }) => { | ||
const { user } = await waitForApiResponses( | ||
{ | ||
user: page.waitForResponse( | ||
(res) => res.url().includes('/api/user') && res.status() === 200, | ||
), | ||
}, | ||
async () => { | ||
await page.goto(PagePaths.DASHBOARD); | ||
}, | ||
); | ||
const instance = new PTPage(page); | ||
await instance.setup(); | ||
|
||
await request.delete( | ||
`${EXTERNAL_API_BASE_URL}/api/v1/pay-transparency/reports`, | ||
{ | ||
params: { companyName: (user as User).legalName }, | ||
headers: { 'x-api-key': EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY }, | ||
}, | ||
); | ||
|
||
await instance.logout(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters