Skip to content

Commit

Permalink
change config and add browserName based identifiers for book lending
Browse files Browse the repository at this point in the history
  • Loading branch information
dualcnhq committed Nov 20, 2024
1 parent 0f59337 commit 3ebb4b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export const identifier = {
url: '/details',
default: '/details/theworksofplato01platiala',
},
lending: {
chromium: 'hitrun0000haro',
firefox: 'cornellstudiesin26unse',
webkit: 'annualreport0000meth_x3r2'
},
details: {
url: '/details',
default: 'goody',
Expand All @@ -46,7 +51,6 @@ export const identifier = {
image_single: 'mma_albert_einstein_270714',
radio_borrow: 'WGBH_89_7_FM_20210918_040000',
tv_borrow: 'CSPAN3_20170413_154200_Discussion_Focuses_on_Sesame_Street_and_Autism',
book_lending: 'hitrun0000haro',
theater_video: '0872_Angels_Flight_05_32_34_00',
webamp: 'OTRR_Philip_Marlowe_Singles',
webamp_with_skin: 'winampskin_Tundra_Winamp_Skin_Actualized',
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const reportName = () => `${process.env.CATEGORY}/${formattedDateTime()}`;
* Timeouts were set by `ms`
*/
export default defineConfig({
workers: 1,
workers: 5,
// Timeout for each test
timeout: 2 * 60 * 1000,
// Maximum time the whole test suite can run
Expand Down
6 changes: 3 additions & 3 deletions tests/details/lending-bar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { test } from '../fixtures';

import { identifier } from '../../config';

test(`Load theater: bookreader with lending bar`, async ({ detailsPage, loginPage }) => {
test(`Load theater: bookreader with lending bar`, async ({ detailsPage, loginPage, browserName }) => {
await test.step('loan book with basic components', async () => {
await detailsPage.gotoPage(identifier.details.book_lending);
await detailsPage.gotoPage(identifier.lending[browserName]);
await detailsPage.lendingBar.verifyDefaultTexts();
await detailsPage.lendingBar.verifyInfoIcon();
await detailsPage.lendingBar.verifyLendingBarBasicNonLoggedIn();
Expand All @@ -13,7 +13,7 @@ test(`Load theater: bookreader with lending bar`, async ({ detailsPage, loginPag
await test.step('loan book with logged-in patron', async () => {
await loginPage.loginAs('patron');

await detailsPage.gotoPage(identifier.details.book_lending);
await detailsPage.gotoPage(identifier.lending[browserName]);
await detailsPage.lendingBar.verifyLendingBarLoggedIn();
});
});

0 comments on commit 3ebb4b2

Please sign in to comment.