Logo: Relish

  1. Sign in

Project: My-project2

Automated testing of GTM tags in the datalayer

In order to test that GTM tags are properly present
As a user
I need to assert that the elements are present in the datalayer

Scenarios
Test that google tags are correctly showing in the dataLayer
Given
I am on "location"
Then
print current URL
Then
I assert that the "Product Sku" value matches the value of ".fcl-procat-product" from the "sku" element
Then
I assert that the "Product Category" value matches the value of ".fcl-procat-product" from the "category" element
Then
I assert that the "Product Destination" value matches the value of ".fcl-procat-product" from the "destination" element
Then
I assert that the "Product Name" value matches the value of ".fcl-procat-product" from the "package-name" element
Then
I assert that the "Product Selection" value matches the value of ".fcl-procat-product" from the "product-selection" element
Examples:
location
/flights/auckland/sydney
/holidays/seminyak/3386164

Last published about 5 years ago by BradForrest.