-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding delete connect account id test after all tests
- Loading branch information
1 parent
e621ae2
commit 081be1b
Showing
2 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
tests/browser-automated-tests-playwright/delete-connect-account-id.js
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// global-setup.js | ||
const { test, expect, chromium } = require('@playwright/test'); | ||
|
||
module.exports = async config => { | ||
const { baseURL, storageState } = config.projects[0].use; | ||
const browser = await chromium.launch(); | ||
const page = await browser.newPage(); | ||
await page.goto(baseURL + '/auth/login'); | ||
await page.fill('#email', 'admin@example.com'); | ||
await page.fill('#password', 'password'); | ||
await page.click('#login'); | ||
|
||
const content = await page.textContent('.card-title') | ||
expect(content === 'Checklist'); // If we see "Checklist", we're logged in to admin | ||
|
||
await new Promise(x => setTimeout(x, 5000)); | ||
await page.goto(baseURL + '/admin/delete-connect-account'); | ||
console.log('deleting-connect-account-id'); | ||
await new Promise(x => setTimeout(x, 2000)); //2 secconds | ||
await page.goto(baseURL + 'admin/dashboard') | ||
const connect_to_stripe = await page.textContent('text="Review Stripe"'); | ||
expect (connect_to_stripe == 'Review Stripe'); | ||
console.log('stripe is not connected'); | ||
|
||
await page.context().storageState({ path: storageState }); | ||
await browser.close(); | ||
}; |
12 changes: 0 additions & 12 deletions
12
tests/browser-automated-tests-playwright/tests/delete-connect-account-id.js
This file was deleted.
Oops, something went wrong.