diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41db39b0..fdf577fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - master + workflow_dispatch: jobs: release: diff --git a/.github/workflows/update_master.yml b/.github/workflows/update_master.yml index c7166792..8f7cd78c 100644 --- a/.github/workflows/update_master.yml +++ b/.github/workflows/update_master.yml @@ -24,13 +24,12 @@ jobs: Please approve and squash-merge it. ### IMPORTANT: - Before merging, make sure all the changes are listed in the squash-commit footer. - Format must be plain conventional-commit, one per line. - No `*` bullets and no `----` comments are allowed. - Commit footer format for release-please changelog ([docs](https://github.com/googleapis/release-please/tree/main?tab=readme-ov-file#what-if-my-pr-contains-multiple-fixes-or-features)): + Before merging, make sure: + 1. Commit message is a conventional-commit with `fix:` or `feat:`, otherwise no version bump will be triggered. + 2. All the changes are listed in the squash-commit footer. + Format must be plain conventional-commit, one per line. + No `*` bullets and no `----` comments are allowed ([docs](https://github.com/googleapis/release-please/tree/main?tab=readme-ov-file#what-if-my-pr-contains-multiple-fixes-or-features)): ``` fix: av1 support (#557) - fix: types definitions (#565) feat: kareoke style subtitles (#563) - fix: allowUsageReport (#569) ``` diff --git a/test/e2e/specs/apiAndEventsPage.spec.ts b/test/e2e/specs/apiAndEventsPage.spec.ts new file mode 100644 index 00000000..232b8a67 --- /dev/null +++ b/test/e2e/specs/apiAndEventsPage.spec.ts @@ -0,0 +1,20 @@ +import { vpTest } from '../fixtures/vpTest'; +import { expect, test } from '@playwright/test'; +import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout'; +import { getLinkByName } from '../testData/pageLinksData'; +import { ExampleLinkName } from '../testData/ExampleLinkNames'; + +// Link to API and Events page +const link = getLinkByName(ExampleLinkName.APIAndEvents); +/** + * Testing if video on API and Events page is playing by checking that is pause return false. + */ +vpTest(`Test if video on API and Events page is playing as expected`, async ({ page, pomPages }) => { + await test.step('Navigate to api and events page by clicking on link', async () => { + await pomPages.mainPage.clickLinkByName(link.name); + await waitForPageToLoadWithTimeout(page, 5000); + }); + await test.step('Validating that the video is playing (in case isPause is false)', async () => { + expect(await pomPages.apiAndEventsPage.apiAndEventsVideoComponent.isPaused()).toEqual(false); + }); +}); diff --git a/test/e2e/src/pom/PageManager.ts b/test/e2e/src/pom/PageManager.ts index 19359c2d..b496aabb 100644 --- a/test/e2e/src/pom/PageManager.ts +++ b/test/e2e/src/pom/PageManager.ts @@ -3,6 +3,7 @@ import { HighlightsGraphPage } from './highlightsGraphPage'; import { BasePage } from './BasePage'; import { MainPage } from './mainPage'; import { AnalyticsPage } from './analyticsPage'; +import { ApiAndEventsPage } from './apiAndEventsPage'; /** * Page manager, @@ -48,5 +49,12 @@ export class PageManager { public get analyticsPage(): AnalyticsPage { return this.getPage(AnalyticsPage); } + + /** + * Returns API and Events page object + */ + public get apiAndEventsPage(): ApiAndEventsPage { + return this.getPage(ApiAndEventsPage); + } } export default PageManager; diff --git a/test/e2e/src/pom/apiAndEventsPage.ts b/test/e2e/src/pom/apiAndEventsPage.ts new file mode 100644 index 00000000..79453f5d --- /dev/null +++ b/test/e2e/src/pom/apiAndEventsPage.ts @@ -0,0 +1,16 @@ +import { Page } from '@playwright/test'; +import { VideoComponent } from '../../components/videoComponent'; +import { BasePage } from './BasePage'; +const API_AND_EVENTS_PAGE_VIDEO_SELECTOR = '//*[@id="player_html5_api"]'; + +/** + * Video player examples api and events page object + */ +export class ApiAndEventsPage extends BasePage { + public apiAndEventsVideoComponent: VideoComponent; + + constructor(page: Page) { + super(page); + this.apiAndEventsVideoComponent = new VideoComponent(page, API_AND_EVENTS_PAGE_VIDEO_SELECTOR); + } +}