Skip to content

Commit

Permalink
check for text content in Summary+ mock add empty campaign.
Browse files Browse the repository at this point in the history
  • Loading branch information
kt-12 committed Nov 7, 2024
1 parent d1fe9eb commit c7bbc72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/e2e/specs/dashboard/paid-features.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ test.describe( 'Paid Feature Listing', () => {
await page.close();
} );
test( 'When no campaign present', async () => {
await dashboardPage.fulfillAdsCampaignsRequest( [] );
await dashboardPage.goto();
await expect( dashboardPage.googleAdsSummaryCard ).toContainText(
'Google Ads'
Expand All @@ -98,7 +99,7 @@ test.describe( 'Paid Feature Listing', () => {
] );
await dashboardPage.goto();
await expect( dashboardPage.googleAdsSummaryCard ).toContainText(
'Google Ads'
/Google Ads.*Total Sales.*Total Spend/
);

await expect( dashboardPage.paidFeatures ).not.toBeVisible();
Expand Down
14 changes: 14 additions & 0 deletions tests/e2e/utils/pages/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ export default class DashboardPage extends MockRequests {
next_page: null,
} );

await this.fulfillAdsReportProgram( {
products: null,
campaigns: null,
intervals: null,
totals: {
sales: 0,
conversions: 0,
spend: 0,
clicks: 0,
impressions: 0,
},
next_page: null,
} );

await this.fulfillTargetAudience( {
location: 'selected',
countries: [ 'US' ],
Expand Down

0 comments on commit c7bbc72

Please sign in to comment.