Skip to content

Commit 2b80f52

Browse files
committed
fixing capabilties for the first run
1 parent 688a406 commit 2b80f52

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎tests/playwright/global-setup.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ async function globalSetup(config) {
1414
timeout: 60000,
1515
});
1616

17+
// wp-module-data registers the site with Hiive on the first admin request.
18+
// On success HiiveConnection::connect() calls SiteCapabilities::clear(),
19+
// which deletes the nfd_site_capabilities transient so pre-arming it keeps
20+
// the suite off Hiive entirely.
21+
utils.fancyLog('🚫 Throttling Hiive connection for the test run...', 55, 'gray', '');
22+
execSync('npx wp-env run cli -- wp transient set nfd_data_connection_throttle 1 3600 || true', {
23+
stdio: 'inherit',
24+
encoding: 'utf-8',
25+
timeout: 60000,
26+
});
27+
1728
// Set permalink structure via WP-CLI (runs before browser is created)
1829
const permalinkStructure = '/%postname%/';
1930
utils.fancyLog(`🔗 Setting permalink structure to: ${permalinkStructure}`, 55, 'gray', '');

0 commit comments

Comments
 (0)