mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat: Update NPS Value Survey (#9638)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in> Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'cypress-real-events';
|
||||
import FakeTimers from '@sinonjs/fake-timers';
|
||||
import { WorkflowPage } from '../pages';
|
||||
import {
|
||||
BACKEND_BASE_URL,
|
||||
@@ -8,6 +9,16 @@ import {
|
||||
N8N_AUTH_COOKIE,
|
||||
} from '../constants';
|
||||
|
||||
Cypress.Commands.add('setAppDate', (targetDate: number | Date) => {
|
||||
cy.window().then((win) => {
|
||||
FakeTimers.withGlobal(win).install({
|
||||
now: targetDate,
|
||||
toFake: ['Date'],
|
||||
shouldAdvanceTime: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('getByTestId', (selector, ...args) => {
|
||||
return cy.get(`[data-test-id="${selector}"]`, ...args);
|
||||
});
|
||||
|
||||
@@ -54,6 +54,7 @@ declare global {
|
||||
}
|
||||
>;
|
||||
resetDatabase(): void;
|
||||
setAppDate(targetDate: number | Date): void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user