@@ -62,6 +62,10 @@ describe( 'Performance Page', { testIsolation: true }, () => {
62
62
} ) ;
63
63
64
64
it ( 'Mouse down-> without exclude: Verify if "Link Prefetch" is displayed and intercept the network call' , ( ) => {
65
+ cy . exec (
66
+ `npx wp-env run cli wp option update _transient_nfd_site_capabilities '{"hasLinkPrefetchClick": true, "hasLinkPrefetchHover": true}' --format=json`
67
+ ) ;
68
+ cy . reload ( ) ;
65
69
performanceLocators . verifyIfLinkPreFetchIsDisplayed ( ) ;
66
70
performanceLocators . verifyIfToggleIsEnabled ( ) ;
67
71
performanceLocators . interceptCallForMouseDownWithoutExcludeRunTimeURL (
@@ -90,33 +94,32 @@ describe( 'Performance Page', { testIsolation: true }, () => {
90
94
`npx wp-env run cli wp option update nfd_link_prefetch_settings '{"activeOnDesktop": true, "behavior": "mouseDown"}' --format=json`
91
95
) ;
92
96
cy . exec (
93
- `npx wp-env run cli wp option update _transient_nfd_site_capabilities '{"hasLinkPrefetchClick": true, "hasLinkPrefetchHover": false}' --format=json`
97
+ `npx wp-env run cli wp option update _transient_nfd_site_capabilities '{"hasLinkPrefetchClick": true, "hasLinkPrefetchHover": false}' --format=json`
94
98
) ;
95
99
cy . reload ( ) ;
96
100
performanceLocators . verifyIfLinkPreFetchIsDisplayed ( ) ;
97
101
performanceLocators . verifyIfToggleIsEnabled ( ) ;
98
- performanceLocators . linkPrefetchCapabilityCheck ( 'onlyMouseDown' ) ;
102
+ performanceLocators . linkPrefetchCapabilityCheck ( 'onlyMouseDown' ) ;
99
103
} ) ;
100
104
101
105
it ( 'hasLinkPrefetchHover capability' , ( ) => {
102
106
cy . exec (
103
- `npx wp-env run cli wp option update nfd_link_prefetch_settings '{"activeOnDesktop": true, "behavior": "mouseHover"}' --format=json`
107
+ `npx wp-env run cli wp option update nfd_link_prefetch_settings '{"activeOnDesktop": true, "behavior": "mouseHover"}' --format=json`
104
108
) ;
105
109
cy . exec (
106
- `npx wp-env run cli wp option update _transient_nfd_site_capabilities '{"hasLinkPrefetchClick": true, "hasLinkPrefetchHover": true}' --format=json`
110
+ `npx wp-env run cli wp option update _transient_nfd_site_capabilities '{"hasLinkPrefetchClick": true, "hasLinkPrefetchHover": true}' --format=json`
107
111
) ;
108
112
cy . reload ( ) ;
109
113
performanceLocators . verifyIfLinkPreFetchIsDisplayed ( ) ;
110
114
performanceLocators . verifyIfToggleIsEnabled ( ) ;
111
- performanceLocators . linkPrefetchCapabilityCheck ( 'both' ) ;
115
+ performanceLocators . linkPrefetchCapabilityCheck ( 'both' ) ;
112
116
} ) ;
113
117
114
118
it ( 'LinkPrefetch Capabilities to false' , ( ) => {
115
119
cy . exec (
116
- `npx wp-env run cli wp option update _transient_nfd_site_capabilities '{"hasLinkPrefetchClick": false, "hasLinkPrefetchHover": false}' --format=json`
120
+ `npx wp-env run cli wp option update _transient_nfd_site_capabilities '{"hasLinkPrefetchClick": false, "hasLinkPrefetchHover": false}' --format=json`
117
121
) ;
118
122
cy . reload ( ) ;
119
123
cy . get ( performanceLocators . _linkPrefetchText ) . should ( 'not.exist' ) ;
120
124
} ) ;
121
-
122
125
} ) ;
0 commit comments