Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2743dc8
Abort async operations on SIGTERM/SIGINT
fredrikekelund Dec 18, 2025
d34ee1e
Also send abort message to child server
fredrikekelund Dec 18, 2025
9a31e58
Only create AbortController when topic is not `abort`
fredrikekelund Dec 18, 2025
61f3256
Fix
fredrikekelund Dec 18, 2025
f81ba0c
More fixes
fredrikekelund Dec 18, 2025
bd6b4d9
Tweaks
fredrikekelund Dec 18, 2025
eb32b3b
Merge branch 'dev/studio-cli-i2' into f26d/cli-abort-async-operations
fredrikekelund Dec 18, 2025
a6a7e7a
Fix unit tests
fredrikekelund Dec 18, 2025
27bd5c3
Merge branch 'dev/studio-cli-i2' into f26d/cli-abort-async-operations
fredrikekelund Dec 19, 2025
569058f
Fix types
fredrikekelund Dec 19, 2025
8786163
Remove `this.sessionPath` files individually
fredrikekelund Dec 19, 2025
abbcfc8
Stop running servers in a detached process
fredrikekelund Dec 19, 2025
fa0537e
Revert "Remove `this.sessionPath` files individually"
fredrikekelund Dec 19, 2025
c984234
Retry
fredrikekelund Dec 19, 2025
87e62ec
Increase timeouts
fredrikekelund Dec 19, 2025
d42d25e
Fix deprecated blueprint syntax
fredrikekelund Dec 19, 2025
3f9ef30
Merge branch 'dev/studio-cli-i2' into f26d/fix-e2e-tests-windows
fredrikekelund Dec 19, 2025
10955cf
Increase timeout
fredrikekelund Dec 19, 2025
fc4fa56
Try adding a small delay
fredrikekelund Dec 19, 2025
814d4ae
Kill `site list --watch` on SIGINT
fredrikekelund Dec 19, 2025
96e03aa
Create main window after creating site watcher
fredrikekelund Dec 19, 2025
ef932ca
Try using async fs method for cleanup
fredrikekelund Dec 22, 2025
0354512
Try rimraf (which has advanced retry strategies)
fredrikekelund Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cli/commands/site/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export async function runCommand( format: 'table' | 'json', watch: boolean ): Pr
},
{ debounceMs: 500 }
);

process.on( 'SIGINT', disconnect );
Comment on lines +129 to +130
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The studio site list --watch command would previously not interrupt in response to Ctrl+C

}
} finally {
if ( ! watch ) {
Expand Down
14 changes: 7 additions & 7 deletions e2e/blueprints.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test.describe( 'Blueprints', () => {
await onboarding.closeWhatsNew();

const siteContent = new SiteContent( session.mainWindow, DEFAULT_SITE_NAME );
await expect( siteContent.siteNameHeading ).toBeVisible( { timeout: 120_000 } );
await expect( siteContent.siteNameHeading ).toBeVisible( { timeout: 200_000 } );
} );

test.afterAll( async () => {
Expand Down Expand Up @@ -49,7 +49,7 @@ test.describe( 'Blueprints', () => {

// Wait for site to be created and running
const siteContent = new SiteContent( session.mainWindow, siteName );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 120_000 } );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 300_000 } );

// Navigate to Settings tab to get admin URL
const settingsTab = await siteContent.navigateToTab( 'Settings' );
Expand Down Expand Up @@ -85,7 +85,7 @@ test.describe( 'Blueprints', () => {

// Wait for site to be created and running
const siteContent = new SiteContent( session.mainWindow, siteName );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 120_000 } );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 300_000 } );

// Navigate to Settings tab to get admin URL
const settingsTab = await siteContent.navigateToTab( 'Settings' );
Expand Down Expand Up @@ -123,7 +123,7 @@ test.describe( 'Blueprints', () => {

// Wait for site to be created and running
const siteContent = new SiteContent( session.mainWindow, siteName );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 120_000 } );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 300_000 } );

// Navigate to Settings tab to get admin URL
const settingsTab = await siteContent.navigateToTab( 'Settings' );
Expand Down Expand Up @@ -159,7 +159,7 @@ test.describe( 'Blueprints', () => {

// Wait for site to be created and running
const siteContent = new SiteContent( session.mainWindow, siteName );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 120_000 } );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 300_000 } );

// Navigate to Settings tab to get admin URL
const settingsTab = await siteContent.navigateToTab( 'Settings' );
Expand Down Expand Up @@ -197,7 +197,7 @@ test.describe( 'Blueprints', () => {

// Wait for site to be created and running
const siteContent = new SiteContent( session.mainWindow, siteName );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 120_000 } );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 300_000 } );

// Navigate to Settings tab to verify site is accessible
const settingsTab = await siteContent.navigateToTab( 'Settings' );
Expand Down Expand Up @@ -236,7 +236,7 @@ test.describe( 'Blueprints', () => {

// Wait for site to be created and running
const siteContent = new SiteContent( session.mainWindow, siteName );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 120_000 } );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 300_000 } );

// Navigate to Settings tab to verify site is accessible
const settingsTab = await siteContent.navigateToTab( 'Settings' );
Expand Down
4 changes: 3 additions & 1 deletion e2e/e2e-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import path from 'path';
import { findLatestBuild, parseElectronApp } from 'electron-playwright-helpers';
import fs from 'fs-extra';
import { _electron as electron, Page, ElectronApplication } from 'playwright';
import { rimraf } from 'rimraf';

export class E2ESession {
electronApp: ElectronApplication;
Expand Down Expand Up @@ -92,7 +93,8 @@ export class E2ESession {

async cleanup() {
await this.electronApp?.close();

// Clean up temporary folder to hold application data
fs.rmSync( this.sessionPath, { recursive: true, force: true } );
await rimraf( this.sessionPath );
}
}
4 changes: 2 additions & 2 deletions e2e/fixtures/blueprints/activate-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"steps": [
{
"step": "installPlugin",
"pluginZipFile": {
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "hello-dolly"
}
Expand All @@ -14,4 +14,4 @@
"pluginPath": "hello-dolly/hello.php"
}
]
}
}
4 changes: 2 additions & 2 deletions e2e/fixtures/blueprints/activate-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"steps": [
{
"step": "installTheme",
"themeZipFile": {
"themeData": {
"resource": "wordpress.org/themes",
"slug": "twentytwentyone"
}
Expand All @@ -14,4 +14,4 @@
"themeFolderName": "twentytwentyone"
}
]
}
}
4 changes: 2 additions & 2 deletions e2e/fixtures/blueprints/install-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"steps": [
{
"step": "installPlugin",
"pluginZipFile": {
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "akismet"
}
}
]
}
}
4 changes: 2 additions & 2 deletions e2e/fixtures/blueprints/install-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"steps": [
{
"step": "installTheme",
"themeZipFile": {
"themeData": {
"resource": "wordpress.org/themes",
"slug": "twentytwentytwo"
}
}
]
}
}
2 changes: 1 addition & 1 deletion e2e/localization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ test.describe( 'Localization', () => {

// Wait for site to be created
const siteContent = new SiteContent( session.mainWindow, siteName );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 120_000 } );
await expect( siteContent.runningButton ).toBeAttached( { timeout: 200_000 } );

const settingsTabButton = session.mainWindow.getByRole( 'tab', { name: /Settings|設定/i } );
await settingsTabButton.click();
Expand Down
Loading
Loading