Skip to content

Commit 2d9b4fc

Browse files
committed
e2e fix
1 parent e974809 commit 2d9b4fc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

e2e/dogfooding.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ It is used to test the following features:
126126
})
127127

128128
await test.step('First start attempt — expect failure (port already in use)', async () => {
129-
await page.getByTestId('page-header-actions').getByRole('button', { name: 'Start' }).click()
129+
await page.getByTestId('service-detail-action-bar').getByRole('button', { name: 'Start' }).click()
130130

131131
// The spawned service will try to bind to port 9090 (default), which is
132132
// already occupied by the test host. Expect status to transition to Error.
@@ -169,7 +169,7 @@ It is used to test the following features:
169169

170170
// Navigate back to the Overview tab and start the service again
171171
await page.getByTestId('service-detail-tabs').getByRole('tab', { name: 'Overview' }).click()
172-
await page.getByTestId('page-header-actions').getByRole('button', { name: 'Start' }).click()
172+
await page.getByTestId('service-detail-action-bar').getByRole('button', { name: 'Start' }).click()
173173

174174
await expect(page.getByTestId('service-status-indicator')).toContainText('Running', { timeout: 60_000 })
175175
})
@@ -190,7 +190,7 @@ It is used to test the following features:
190190

191191
await test.step('Stop the service', async () => {
192192
// SIGTERM may cause non-zero exit → "Error" or clean → "Stopped"
193-
await page.getByTestId('page-header-actions').getByRole('button', { name: 'Stop' }).click()
193+
await page.getByTestId('service-detail-action-bar').getByRole('button', { name: 'Stop' }).click()
194194
await expect(page.getByTestId('service-status-indicator')).toContainText(/Stopped|Error/, { timeout: 30_000 })
195195
})
196196
} finally {

frontend/src/pages/services/service-detail/action-bar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export const ServiceDetailActionBar = Shade<ServiceDetailActionBarProps>({
4141
}
4242

4343
return (
44-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'wrap' }}>
44+
<div
45+
style={{ display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'wrap' }}
46+
data-testid="service-detail-action-bar"
47+
>
4548
{service.repositoryId ? (
4649
<BranchSelector
4750
serviceId={service.id}

0 commit comments

Comments
 (0)