mirror of
https://github.com/mattermost/mattermost.git
synced 2026-04-15 22:12:19 -04:00
20 lines
766 B
JavaScript
20 lines
766 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import * as TIMEOUTS from '../fixtures/timeouts';
|
|
|
|
Cypress.Commands.overwrite('reload', (originalFn, forceReload, options, duration = TIMEOUTS.THREE_SEC) => {
|
|
localStorage.setItem('__landingPageSeen__', 'true');
|
|
originalFn(forceReload, options);
|
|
cy.wait(duration);
|
|
});
|
|
|
|
Cypress.Commands.overwrite('visit', (originalFn, url, options, duration = TIMEOUTS.THREE_SEC) => {
|
|
localStorage.setItem('__landingPageSeen__', 'true');
|
|
originalFn(url, options);
|
|
cy.wait(duration);
|
|
});
|
|
|
|
Cypress.Commands.add('typeWithForce', {prevSubject: true}, (subject, text, options = {}) => {
|
|
cy.get(subject).type(text, {force: true, ...options});
|
|
});
|