UNPKG

playwright-fluent

Version:
31 lines (30 loc) 962 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const path = tslib_1.__importStar(require("path")); const SUT = tslib_1.__importStar(require("../../playwright-fluent")); describe('Playwright Fluent - pause', () => { let p; beforeEach(() => { p = new SUT.PlaywrightFluent(); }); afterEach(async () => { await p.close(); }); test('should not pause on CI - chromium', async () => { // Given const url = `file:${path.join(__dirname, 'pause.test.html')}`; const selector = '#dynamically-added-input'; // When await p .withBrowser('chromium') .withOptions({ headless: false }) .withCursor() .navigateTo(url) .pause() .click(selector); // Then const hasFocus = await p.hasFocus(selector); expect(hasFocus).toBe(true); }); });