playwright-fluent
Version:
Fluent API around playwright
19 lines (18 loc) • 847 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const SUT = tslib_1.__importStar(require("../index"));
const handle_actions_1 = require("../../../handle-actions");
describe('click-at-position', () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
beforeEach(() => { });
test('should return an error when page has not been initalized', async () => {
// Given
const page = undefined;
const position = { x: 1, y: 2 };
// When
// Then
const expectedError = new Error("Cannot click at position 'x: 1, y: 2' because no browser has been launched");
await SUT.clickAtPosition(position, page, handle_actions_1.defaultClickOptions).catch((error) => expect(error).toMatchObject(expectedError));
});
});
;