Skip to content

Commit e276600

Browse files
committed
Fixed DOES NOT WORK tests
1 parent 01b0540 commit e276600

3 files changed

Lines changed: 16 additions & 15 deletions

File tree

src/site/components/Preview.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function Preview(props: Props) {
1717

1818
return (
1919
<>
20+
{props.globalStyle.customCss && <style>{props.globalStyle.customCss}</style>}
2021
<div style={{ fontFamily: fonts.body }}>
2122
<div style={{ backgroundColor: palette.light, color: palette.darkAccent, padding: 20, borderRadius: 5 }}>
2223
<Grid container spacing={3}>

tests/people.spec.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,21 @@ test.describe('People Management', () => {
231231
await seekEither.click();
232232
});
233233

234-
/* test('DOES NOT WORK should add card from people donations tab', async ({ page }) => {
234+
// Skipped: Stripe payment fields are in a secure iframe that Playwright cannot access
235+
test.skip('should add card from people donations tab', async ({ page }) => {
235236
const firstPerson = page.locator('table tbody tr').first();
236237
await firstPerson.click();
237238
await page.waitForURL(/\/people\/PER\d+/, { timeout: 10000 });
238239
await page.waitForTimeout(2000);
239-
240+
240241
const donationBtn = page.locator('button').getByText('Donations');
241242
await donationBtn.click();
242243
await page.waitForTimeout(5000);
243-
244+
244245
const addBtn = page.locator('[id="addBtnGroup"]');
245246
await addBtn.click();
246247
const addCardBtn = page.locator('[aria-labelledby="addBtnGroup"] li').first();
247248
await addCardBtn.click();
248-
// I'm pretty sure security measures prevent these fields from being found
249249
const cardEntry = page.locator('[name="cardnumber"]');
250250
await cardEntry.fill('4242424242424242');
251251
const dateEntry = page.locator('[name="exp-date"]');
@@ -254,10 +254,10 @@ test.describe('People Management', () => {
254254
await cvcEntry.fill('123');
255255
const zipEntry = page.locator('[name="postal"]');
256256
await zipEntry.fill('11111');
257-
257+
258258
const saveBtn = page.locator('Button').getByText('Save');
259259
await saveBtn.click();
260-
}); */
260+
});
261261

262262
test('should cancel adding card from people donations tab', async ({ page }) => {
263263
const firstPerson = page.locator('table tbody tr').first();
@@ -279,32 +279,31 @@ test.describe('People Management', () => {
279279
await addBtn.click();
280280
});
281281

282-
/* test('DOES NOT WORK should add bank account from people donations tab', async ({ page }) => {
283-
//fix donations test first ^^^^^
282+
// Skipped: Stripe payment fields are in a secure iframe that Playwright cannot access
283+
test.skip('should add bank account from people donations tab', async ({ page }) => {
284284
const firstPerson = page.locator('table tbody tr').first();
285285
await firstPerson.click();
286286
await page.waitForURL(/\/people\/PER\d+/, { timeout: 10000 });
287-
287+
288288
const donationBtn = page.locator('button').getByText('Donations');
289289
await donationBtn.click();
290290
await page.waitForTimeout(5000);
291-
291+
292292
const addBtn = page.locator('[id="addBtnGroup"]');
293293
await addBtn.click();
294294
const addBankBtn = page.locator('[aria-labelledby="addBtnGroup"] li').last();
295295
await addBankBtn.click();
296-
//similarly concerned about security preventing site from finding these
297296
await page.waitForTimeout(5000);
298297
const nameEntry = page.locator('[name="account-holder-name"]');
299298
await nameEntry.fill('Octavian');
300299
const routeEntry = page.locator('[name="routing-number"]');
301300
await routeEntry.fill('110000000');
302301
const accEntry = page.locator('[name="account-number"]');
303302
await accEntry.fill('000123456789');
304-
303+
305304
const saveBtn = page.locator('Button').getByText('Save');
306305
await saveBtn.click();
307-
}); */
306+
});
308307

309308
test('should cancel adding bank from people donations tab', async ({ page }) => {
310309
const firstPerson = page.locator('table tbody tr').first();

tests/website.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ test.describe('Website Management', () => {
9999
await expect(validatedText).toHaveCount(1);
100100
});
101101

102-
test('DOES NOT WORK should verify page preview', async ({ page }) => {
102+
test('should verify page preview', async ({ page }) => {
103103
const editBtn = page.locator('[data-testid="edit-page-button"]').last();
104104
await editBtn.click();
105105
await page.waitForTimeout(5000);
106-
const validatedText = page.locator('p').getByText('Octavian Test Text');
106+
const iframe = page.frameLocator('iframe');
107+
const validatedText = iframe.locator('p').getByText('Octavian Test Text');
107108
await expect(validatedText).toHaveCount(1);
108109
});
109110

0 commit comments

Comments
 (0)