79515480

Date: 2025-03-17 18:51:50
Score: 0.5
Natty:
Report link

I've successfully managed to do it ,

->assertScript('window.fbq.queue.length === 0'); //assumes that no fb events are pending

When user successfully register, a pixel event is fired.

fbq('track', 'Lead', {}, {eventID})

My task was to write a test case in laravel dusk for this event that, it is actually dispatches or not when user registers.

You can also check that fbq is actually exists or not

$fbqExists = $browser->script('return typeof window.fbq !== "undefined"');
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Sublan Mustafa