How to use the testcafe-hammerhead.StateSnapshot.empty function in testcafe-hammerhead

To help you get started, we’ve selected a few testcafe-hammerhead examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / testcafe / src / test-run / index.js View on Github external
async switchToCleanRun (url) {
        this.ctx             = Object.create(null);
        this.fixtureCtx      = Object.create(null);
        this.consoleMessages = new BrowserConsoleMessages();

        this.session.useStateSnapshot(StateSnapshot.empty());

        if (this.speed !== this.opts.speed) {
            const setSpeedCommand = new actionCommands.SetTestSpeedCommand({ speed: this.opts.speed });

            await this.executeCommand(setSpeedCommand);
        }

        if (this.pageLoadTimeout !== this.opts.pageLoadTimeout) {
            const setPageLoadTimeoutCommand = new actionCommands.SetPageLoadTimeoutCommand({ duration: this.opts.pageLoadTimeout });

            await this.executeCommand(setPageLoadTimeoutCommand);
        }

        await this.navigateToUrl(url, true);

        if (this.activeDialogHandler) {
github DevExpress / testcafe / src / role / index.js View on Github external
constructor (loginPage, initFn, options = {}) {
        super();

        this[roleMarker] = true;

        this.id    = nanoid(7);
        this.phase = loginPage ? PHASE.uninitialized : PHASE.initialized;

        this.loginPage = loginPage;
        this.initFn    = initFn;
        this.opts      = options;

        this.url           = null;
        this.stateSnapshot = StateSnapshot.empty();
        this.initErr       = null;
    }

testcafe-hammerhead

A powerful web-proxy used as a core for the TestCafe testing framework (https://github.com/DevExpress/testcafe).

MIT
Latest version published 2 days ago

Package Health Score

86 / 100
Full package analysis

Similar packages