playwright-fluent
Version:
Fluent API around playwright
18 lines (17 loc) • 863 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const SUT = tslib_1.__importStar(require("../index"));
const select_options_in_handle_1 = require("../select-options-in-handle");
describe('select options in handle', () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
beforeEach(() => { });
test('should throw an error when browser is not launched', async () => {
// Given
const handle = undefined;
// When
// Then
const expectedError = new Error("Cannot select options 'foo,bar' because no browser has been launched");
await SUT.selectOptionsInHandle(handle, 'foobar', ['foo', 'bar'], undefined, select_options_in_handle_1.defaultSelectOptions).catch((error) => expect(error).toMatchObject(expectedError));
});
});
;