-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from nahidthenh/nahid
Fix Failed TestCase Issue
- Loading branch information
Showing
11 changed files
with
135 additions
and
117 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
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
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'elementor-youtube-2'; | ||
|
||
|
||
test.describe("Elementor YouTube Others", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
// await page.waitForLoadState('networkidle'); | ||
}); | ||
|
||
test('Default YouTube', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Default YouTube' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
const framelocator = page.frameLocator('iframe[title="শ্রেষ্ঠ মানুষেরা - \\[পর্ব ৮\\] - ইবরাহিম \\(আঃ\\)"]'); | ||
|
||
await expect(page.getByText('Copy URL Form Right-click on')).toBeVisible(); | ||
await expect(framelocator.locator('.ytp-cued-thumbnail-overlay-image')).toBeVisible(); | ||
await expect(framelocator.getByRole('button', { name: 'Share' })).toBeVisible(); | ||
await expect(framelocator.getByLabel('Play', { exact: true })).toBeVisible(); | ||
await expect(framelocator.locator('div').filter({ hasText: 'শ্রেষ্ঠ মানুষেরা - [পর্ব ৮] - ইবরাহিম (আঃ)' }).nth(4)).toBeVisible(); | ||
await expect(framelocator.getByRole('link', { name: 'Watch on YouTube' })).toBeVisible(); | ||
}); | ||
|
||
test('Custom Player Preset 1', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Custom Player Preset 1' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
await expect(page.getByText('Copy URL Form URL Box On Top')).toBeVisible(); | ||
// await expect(page.locator('.plyr__poster').first()).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-23222a0 button').filter({ hasText: /^Play$/ })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-23222a0').getByText('PausePlay')).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-23222a0').getByRole('button', { name: 'Settings' })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-23222a0').getByRole('button', { name: 'Restart' })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-23222a0').getByRole('button', { name: 'Mute' })).toBeVisible(); | ||
}); | ||
|
||
test('Custom Player Preset 2 Disable Few Controls', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Custom Player Preset 2' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
await expect(page.getByText('Copy URL Form Share Icon')).toBeVisible(); | ||
await expect(page.locator('[id="\\39 7765ca"] > .plyr > .plyr__video-wrapper > .plyr__poster')).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-97765ca button').filter({ hasText: /^Play$/ })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-97765ca').getByRole('button', { name: 'Restart' })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-97765ca').getByRole('button', { name: 'Forward 10s' })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-97765ca').getByRole('button', { name: 'Settings' })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-97765ca').getByRole('button', { name: 'Rewind 10s' })).toBeVisible(); | ||
}); | ||
|
||
test('Enable Custom Player and Thumbnail', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Enable Custom Player and' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
await expect(page.getByText('Copy URL Form Embed Code')).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-27221be').getByText('PausePlay')).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-27221be').getByRole('button', { name: 'Mute' })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-27221be').getByRole('button', { name: 'Settings' })).toBeVisible(); | ||
await expect(page.locator('#ep-elements-id-27221be').getByRole('button', { name: 'Fullscreen' })).toBeVisible(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'playwright-gutenberg/gutenberg-youtube'; | ||
|
||
test.describe("Gutenberg YouTube Others", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
// await page.waitForLoadState('networkidle'); | ||
}); | ||
|
||
test('Default YouTube', async ({ page }) => { | ||
const framelocator = page.frameLocator('iframe[title="শ্রেষ্ঠ মানুষেরা - \\[পর্ব ৮\\] - ইবরাহিম \\(আঃ\\)"]') | ||
const heading = page.getByRole('heading', { name: 'Default YouTube' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
await expect(page.getByText('Copy URL Form Right-click on')).toBeVisible(); | ||
await expect(page.locator('.ep-embed-content-wraper').first()).toBeVisible(); | ||
await expect(framelocator.getByLabel('Play', { exact: true })).toBeVisible(); | ||
await expect(framelocator.getByRole('button', { name: 'Share' })).toBeVisible(); | ||
await expect(framelocator.locator('div').filter({ hasText: 'শ্রেষ্ঠ মানুষেরা - [পর্ব ৮] - ইবরাহিম (আঃ)' }).nth(4)).toBeVisible(); | ||
await expect(framelocator.getByRole('link', { name: 'Watch on YouTube' })).toBeVisible(); | ||
}); | ||
|
||
test('Custom Player Preset 1', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Custom Player Preset 1' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
await expect(page.getByText('Copy URL Form URL Box On Top')).toBeVisible(); | ||
await expect(page.locator('.plyr__poster').first()).toBeVisible(); | ||
await expect(page.locator('button').filter({ hasText: /^Play$/ }).first()).toBeVisible(); | ||
await expect(page.getByText('PausePlay').first()).toBeVisible(); | ||
await expect(page.getByRole('button', { name: 'Forward 10s' }).first()).toBeVisible(); | ||
await expect(page.getByRole('button', { name: 'Settings' }).first()).toBeVisible(); | ||
}); | ||
|
||
test('Custom Player Preset 2 Disable Few Controls', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Custom Player Preset 2' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
await expect(page.getByText('Copy URL Form Share Icon')).toBeVisible(); | ||
await expect(page.locator('button').filter({ hasText: /^Play$/ }).nth(1)).toBeVisible(); | ||
await expect(page.getByRole('button', { name: 'Restart' }).nth(1)).toBeVisible(); | ||
await expect(page.getByText('PausePlay').nth(1)).toBeVisible(); | ||
await expect(page.getByRole('button', { name: 'Settings' }).nth(1)).toBeVisible(); | ||
}); | ||
|
||
test('Enable Custom Player and Thumbnail', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Enable Custom Player and' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
await expect(page.getByText('Copy URL Form Embed Code')).toBeVisible(); | ||
await expect(page.locator('button').filter({ hasText: /^Play$/ }).nth(2)).toBeVisible(); | ||
await expect(page.getByRole('button', { name: 'Forward 10s' }).nth(2)).toBeVisible(); | ||
await expect(page.getByRole('button', { name: 'Settings' }).nth(2)).toBeVisible(); | ||
}); | ||
}); |