playwright-fluent
Version:
Fluent API around playwright
18 lines (17 loc) • 750 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const SUT = tslib_1.__importStar(require("../index"));
describe('wait for page dialog to open', () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
beforeEach(() => { });
test('should return an error when browser has not been launched', async () => {
// Given
const page = undefined;
const dialog = undefined;
// When
// Then
const expectedError = new Error('Cannot wait for a dialog to open because no browser has been launched');
await SUT.waitForDialog(() => dialog, page).catch((error) => expect(error).toMatchObject(expectedError));
});
});
;