-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
Context:
- Playwright Version: [1.0.2]
- Operating System: [Windows]
- Node version: [10.16.0]
- Browser: [Firefox]
Code Snippet
import { HTMLConstants } from "../Constants/HTMLConstants";
import { PageController } from "../Utils/PageController";
import { FeatureController} from "../Utils/FeatureController";
import { TestConfiguration} from "../Utils/TestConfiguration";
import { Utility } from "../Utils/Utility";
import { Frame } from "playwright";
const testSuite = "VRT for reconnect scenario";
describe(testSuite, () => {
let iframeLCW: Frame;
beforeAll(async () => {
await page.goto(TestConfiguration.GetTestUrl());
iframeLCW = await PageController.GetIframe(page);
await iframeLCW.waitForSelector(HTMLConstants.ChatButtonId);
await iframeLCW.click(HTMLConstants.ChatButtonId);
});
afterAll(async () => {
await page.close();
});
const spec1 = "it has disconnected baner";
it(spec1, async () => {
await iframeLCW.waitForSelector(HTMLConstants.SystemWelcomMessageSelector);
await page.context().setOffline(true);
await iframeLCW.waitForSelector(HTMLConstants.DisconnectedBannerSelector);
const image = await page.screenshot();
expect(image).toMatchImageSnapshot({
customSnapshotIdentifier: Utility.SnapshotPath(testSuite, spec1)
});
});
const spec2 = "it has reconnect banner";
it(spec2, async () => {
await page.context().setOffline(false);
await iframeLCW.waitForSelector(HTMLConstants.ReconnectedBanerSelector);
const image = await page.screenshot();
expect(image).toMatchImageSnapshot({
customSnapshotIdentifier: Utility.SnapshotPath(testSuite, spec2)
});
});
});Describe the bug
This test is using jest-playwright-preset, this code makes use of iframe. In iframe if there is a reconnect disconnect scenario, a banner for the same shows up. When using firefox, the disconnect\reconnect banners do not appear. This works fine for chromium. We are facing this issue only for firefox.
Also, on firefox browsers, turning offline\online manualy works fine and shows the banners.
Please let me know if further details are required.
Metadata
Metadata
Assignees
Labels
No labels