Skip to content

Commit

Permalink
Add smoke tests for /test-plan-report/15 as anon and admin
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarf committed Jun 20, 2024
1 parent d02c732 commit 255a245
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion client/tests/smokeTest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,33 @@ describe('smoke test', () => {
const h1Handle = await page.waitForSelector('h1');
const h1Text = await h1Handle.evaluate(h1 => h1.innerText);
expect(h1Text).toBe('Data Management');
})
}),
getPage(
{ role: false, url: '/test-plan-report/15' },
async page => {
// Wait for an h2 because an h1 will show while the page is
// still loading
await page.waitForSelector('h2');
const h1Handle = await page.waitForSelector('h1');
const h1Text = await h1Handle.evaluate(h1 => h1.innerText);
expect(h1Text).toBe(
'Test 1:\nNavigate forwards to a not pressed toggle button'
);
}
),
getPage(
{ role: 'admin', url: '/test-plan-report/15' },
async page => {
// Wait for an h2 because an h1 will show while the page is
// still loading
await page.waitForSelector('h2');
const h1Handle = await page.waitForSelector('h1');
const h1Text = await h1Handle.evaluate(h1 => h1.innerText);
expect(h1Text).toBe(
'Test 1:\nNavigate forwards to a not pressed toggle button'
);
}
)
]);
});
});

0 comments on commit 255a245

Please sign in to comment.