4.2.2 - tracking across email, fixes to dark mode.

This commit is contained in:
2026-05-06 15:50:01 +12:00
parent a7ce4c74b5
commit 2f4001b8af
11 changed files with 323 additions and 41 deletions
+11 -2
View File
@@ -36,6 +36,7 @@ async function moveToOwnerStep(container: HTMLElement) {
describe('BookingSection', () => {
beforeEach(() => {
window.sessionStorage.clear();
Object.defineProperty(document, 'referrer', {
configurable: true,
value: 'https://www.google.com/'
@@ -104,9 +105,15 @@ describe('BookingSection', () => {
message: 'Loves small group walks.',
services: ['Pack Walks', 'Other Services'],
website: '',
referrer: 'https://www.google.com/'
referrer: 'https://www.google.com/',
stepChanges: 1,
journey: [window.location.pathname]
});
expect(payload.formStartedAt).toEqual(expect.any(Number));
expect(payload.visitStartedAt).toEqual(expect.any(Number));
expect(payload.pageEnteredAt).toEqual(expect.any(Number));
expect(payload.firstInteractionAt).toEqual(expect.any(Number));
expect(payload.sendClickedAt).toEqual(expect.any(Number));
expect(screen.getByRole('dialog', { name: /Booking confirmed/i })).toBeInTheDocument();
expect(screen.getByRole('heading', { name: /on our radar/i })).toBeInTheDocument();
@@ -156,7 +163,9 @@ describe('BookingSection', () => {
petName: '',
location: '',
message: 'I would like to discuss a business partnership.',
services: []
services: [],
stepChanges: 1,
journey: [window.location.pathname]
});
expect(screen.getByRole('dialog', { name: /Enquiry confirmed/i })).toBeInTheDocument();