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:
Mutasem Aldmour
2024-06-11 10:23:30 +02:00
committed by GitHub
parent aaa78435b0
commit 50bd5b9080
58 changed files with 1416 additions and 497 deletions

View File

@@ -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);
});

View File

@@ -54,6 +54,7 @@ declare global {
}
>;
resetDatabase(): void;
setAppDate(targetDate: number | Date): void;
}
}
}