-
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 #9 from nahidthenh/nahid
LinkedIn, Twitter , Spotify Classic TestCases added
- Loading branch information
Showing
7 changed files
with
202 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'playwright-classic/classic-linkedin/'; | ||
|
||
|
||
test.describe('Classic LinkedIn', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
}); | ||
|
||
test('Default LinkedIn', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Classic LinkedIn' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
await page.waitForTimeout(1000); | ||
|
||
const iframeLocator = page.locator('iframe'); | ||
|
||
await expect(iframeLocator.first()).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'playwright-classic-editor/classic-twitter/'; | ||
|
||
|
||
test.describe('Classic Twitter', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
}); | ||
|
||
test('Default Twitter', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Classic Twitter' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
await page.waitForTimeout(1000); | ||
|
||
const iframeLocator = page.locator('#post-9250 div'); | ||
await expect(iframeLocator.first()).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'playwright-elementor/elementor-linkedin/'; | ||
|
||
|
||
test.describe('Elementor LinkedIn', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
}); | ||
|
||
test('Default LinkedIn', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Default linkedIn Embed Test' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
const iframeLocator = page.locator('iframe'); | ||
|
||
await expect(iframeLocator.first()).toBeVisible(); | ||
await expect(page.locator('iframe').contentFrame().getByLabel('View profile for Md. Nahid')).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'playwright-elementor/elementor-twitter//'; | ||
|
||
|
||
test.describe('Elementor Twitter', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
}); | ||
|
||
test('Default Twitter Visibility Test', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Elementor Twitter' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
await page.waitForTimeout(1000); | ||
|
||
await expect(page.locator('iframe[title="X Post"]')).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'playwright-gutenberg/gutenberg-linkedin/'; | ||
|
||
|
||
test.describe('Gutenberg LinkedIn', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
}); | ||
|
||
test('Default LinkedIn', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Gutenberg LinkedIn' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
const iframeLocator = page.locator('iframe'); | ||
|
||
await expect(iframeLocator.first()).toBeVisible(); | ||
await expect(page.locator('iframe').contentFrame().getByLabel('View profile for Md. Nahid')).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
let slug = 'playwright-gutenberg/gutenberg-twitter/'; | ||
|
||
test.describe('Gutenberg Twitter', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(slug); | ||
}); | ||
|
||
test('Default Twitter Visibility Test', async ({ page }) => { | ||
const heading = page.getByRole('heading', { name: 'Gutenberg Twitter' }); | ||
await heading.scrollIntoViewIfNeeded(); | ||
await expect(heading).toBeVisible(); | ||
|
||
await page.waitForTimeout(1000); | ||
|
||
// Select the first iframe with title "X Post" and validate its visibility | ||
const iframe = page.locator('iframe[title="X Post"]').first(); | ||
await expect(iframe).toBeVisible(); | ||
}); | ||
}); |