-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
400 additions
and
450 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,62 +1,44 @@ | ||
import { test } from '@playwright/test'; | ||
import { test } from '../../tests/fixtures'; | ||
|
||
import { CollectionPage } from '../page-objects/collection-page'; | ||
|
||
let collectionPage: CollectionPage; | ||
|
||
test.describe('Collection Page - Basic display tests', () => { | ||
test.describe.configure({ mode: 'serial' }); | ||
|
||
test(`Collections use collection page layout`, async ({ browser }) => { | ||
const browserPage = await browser.newPage(); | ||
collectionPage = new CollectionPage(browserPage); | ||
|
||
await test.step(`Go to "oldtimeradio" collection page`, async () => { | ||
await collectionPage.visit('oldtimeradio'); | ||
}); | ||
|
||
await test.step(`Check if collection thumbnail, summary and action bar appears`, async () => { | ||
await collectionPage.validatePageHeaderElements(); | ||
}); | ||
|
||
await test.step(`Check if Collection | About | Forum tabs are displayed`, async () => { | ||
await collectionPage.validateCollectionPageTabs(); | ||
}); | ||
test(`Collections basic display - use collection page layout`, async ({ | ||
collectionPage, | ||
}) => { | ||
await test.step(`Check if collection thumbnail, summary and action bar appears`, async () => { | ||
await collectionPage.validatePageHeaderElements(); | ||
}); | ||
|
||
test(`"More..." link to About tab appears below description`, async () => { | ||
await test.step(`Go to "ytjdradio" collection page`, async () => { | ||
await collectionPage.visit('ytjdradio'); | ||
}); | ||
|
||
await test.step(`Click the "More..." link and check if About page is displayed`, async () => { | ||
await collectionPage.clickMoreBtnFromSummary(); | ||
await collectionPage.validateAboutTabPage(); | ||
}); | ||
await test.step(`Check if Collection | About | Forum tabs are displayed`, async () => { | ||
await collectionPage.validateCollectionPageTabs(); | ||
}); | ||
}); | ||
|
||
test(`Tab navigation`, async () => { | ||
await test.step(`Navigate to "oldtimeradio" collection page`, async () => { | ||
await collectionPage.visit('oldtimeradio'); | ||
}); | ||
test(`Collections page - "More..." link to About tab appears below description`, async ({ | ||
page, | ||
collectionPage, | ||
}) => { | ||
await test.step(`Go to "ytjdradio" collection page`, async () => { | ||
await page.goto('/details/ytjdradio'); | ||
}); | ||
|
||
await test.step(`Click "About" tab button and check if About page is displayed`, async () => { | ||
await collectionPage.clickCollectionTab('About'); | ||
await collectionPage.validateAboutTabPage(); | ||
}); | ||
await test.step(`Click the "More..." link and check if About page is displayed`, async () => { | ||
await collectionPage.clickMoreBtnFromSummary(); | ||
await collectionPage.validateAboutTabPage(); | ||
}); | ||
}); | ||
|
||
await test.step(`Click "Forum" tab button and check if Forum page is displayed`, async () => { | ||
await collectionPage.clickCollectionTab('Forum'); | ||
await collectionPage.validateForumTabPage(); | ||
}); | ||
test(`Tab navigation`, async ({ collectionPage }) => { | ||
await test.step(`Click "About" tab button and check if About page is displayed in "oldtimeradio" collection page`, async () => { | ||
await collectionPage.clickCollectionTab('About'); | ||
await collectionPage.validateAboutTabPage(); | ||
}); | ||
|
||
await test.step(`Click "Collection" tab button and check if Collections page is displayed`, async () => { | ||
await collectionPage.clickCollectionTab('Collection'); | ||
await collectionPage.validateCollectionTabPage(); | ||
}); | ||
await test.step(`Click "Forum" tab button and check if Forum page is displayed`, async () => { | ||
await collectionPage.clickCollectionTab('Forum'); | ||
await collectionPage.validateForumTabPage(); | ||
}); | ||
}); | ||
|
||
test.afterAll(async () => { | ||
await collectionPage.page.close(); | ||
}); | ||
await test.step(`Click "Collection" tab button and check if Collections page is displayed`, async () => { | ||
await collectionPage.clickCollectionTab('Collection'); | ||
await collectionPage.validateCollectionTabPage(); | ||
}); | ||
}); |
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
Oops, something went wrong.