UNPKG

playwright-fluent

Version:
28 lines (27 loc) 858 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const SUT = tslib_1.__importStar(require("../../playwright-fluent")); describe('Playwright Fluent - click', () => { let p; beforeEach(() => { p = new SUT.PlaywrightFluent(); }); afterEach(async () => { await p.close(); }); test('should give back an error on click without launching the browser', async () => { // Given const position = { x: 1, y: 2 }; // When let result = undefined; try { await p.clickAtPosition(position); } catch (error) { result = error; } // Then expect(result && result.message).toContain("Cannot click at position 'x: 1, y: 2' because no browser has been launched"); }); });