Skip to content

Commit a26550a

Browse files
committed
Fix Failing Fonts Test
1 parent 98d0c5a commit a26550a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/cypress/integration/cloudflare-fonts.cy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ describe(
2424
} );
2525

2626
it( 'Shows Font Optimization section when capability is true and toggle is enabled', () => {
27-
setSiteCapabilities( { hasCloudflareFonts: true } );
28-
27+
// Visit the performance page to set the initial capabilities
2928
cy.visit( '/wp-admin/admin.php?page=nfd-performance' );
3029
cy.get( '#nfd-performance', { timeout: 10000 } ).should(
3130
'be.visible'
3231
);
3332

33+
setSiteCapabilities( { hasCloudflareFonts: true } );
34+
cy.reload();
35+
3436
performancePageLocators.getFontToggle().should( 'exist' );
3537
performancePageLocators
3638
.getFontToggle()

0 commit comments

Comments
 (0)