Create Ads
Module E2E Tests to Cover Basic Module Setup Flow
#8314
Labels
Module: Ads
Google Ads module related issues
P0
High priority
Team S
Issues for Squad 1
Type: Enhancement
Improvement of an existing feature
Feature Description
As a final means to the Ads module work, comes the requirement to implement an E2E test suite that covers the basic module set up flow. This E2E test suite will cover set up flows for new and existing users, with and without the legacy Ads Module ID field present in the GA4 module.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Create an E2E test suite for the Ads module that covers the following requirements:
For new users of the plugin:
For existing users users of the plugin with no GA4 Ads Conversion ID present:
For existing users users of the plugin with a GA4 Ads Conversion ID present:
For all scenarios:
Implementation Brief
Add
tests/e2e/specs/modules/ads/setup-no-previous-ads-cenversion-id.js
Ads setup with no Ads conversion ID present
setupSiteKit()
util functiondeactivateUtilityPlugins
andresetSiteKit
util functionsshows error message if invalid Ads conversion ID is entered
Settings
page and switch to theconnect more services
tab. Then trigger the setup ofAds
module. You follow this examplesite-kit-wp/tests/e2e/specs/modules/analytics/write-scope-requests.test.js
Lines 216 to 227 in d8a3974
Ads
module settings view:ads conversion id
adsConversionID
value - meaning value that does not starts withAWS
, like12345
. For example `expect( page ).toFill( '#ads-conversion-id-field-id', '12345' )conversion ids must be in the format
. Note - verify during execution if this message changedallows saving Ads conversion ID with an empty value but does not connect the module
Ads
module, and verify the field is presentTracking for your Ads campaigns won’t work until you insert a valid ID
is presentConfirm changes
CTA, and wait for navigation to verify that.googlesitekit-publisher-win
banner appeared notifying of successful setup ofAds
moduleAds
module is present underConnected Services
tab in Settings page but withComplete setup
CTA (active but not connected)connects the module when valid Ads conversion ID is saved
AWS-12345
Ads
module is appearing underConnected Services
tabAdd
tests/e2e/specs/modules/ads/setup-with-previous-ads-cenversion-id.js
adsConversionID
setting of Analytics 4 module on request. You can pass setting as param. You can checksetAnalyticsExistingPropertyID
util for idea, ande2e-rest-analytics-existing-property-id.php
e2e pluginmigrates the Ads conversion ID field from GA4 and activates and connects the Ads module
Ads conversion ID has been moved to
text is shownconnected services
tab and verify thatAds
module is thereremoving the Ads conversion ID field from disconnects the Ads module
Ads
module settings, and clean the setting valueAds
module is appearing inConnected services
tab but withComplete setup
CTAIn each test that successfully connects
Ads
module fetch the homepage and verify that tag is there. You can borrow the logic fromtoHaveAdSenseTag
util function, look for Ads gtag ID, in formatAWS-
, example -gtag('config','AW-12345')
. You might need to add e2e plugin that will return the homepage url, which can be then fetched with util function.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: