Skip to content

Commit

Permalink
adding delete connect account id test after all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joeltejeda committed Apr 29, 2022
1 parent e621ae2 commit 081be1b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
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();
};

This file was deleted.

0 comments on commit 081be1b

Please sign in to comment.