@@ -8,7 +8,7 @@ test('DOG FOODING TIME - Create a service that uses the StackCraft GitHub reposi
88 const uuid = crypto . randomUUID ( )
99
1010 const stackName = `e2e-dog-fooding-time-${ uuid } `
11- const displayName = `E2E Test Stack - ${ browserName } - ${ uuid } `
11+ const displayName = `E2E DOG FOODING TIMETest Stack - ${ browserName } - ${ uuid } `
1212
1313 const workingDirectory = `/tmp/e2e-dog-fooding-time-${ uuid } `
1414
@@ -39,17 +39,47 @@ test('DOG FOODING TIME - Create a service that uses the StackCraft GitHub reposi
3939 await page . locator ( 'input[name="workingDirectory"]' ) . fill ( workingDirectory )
4040 await page . locator ( 'input[name="runCommand"]' ) . fill ( 'yarn start:service' )
4141
42+ // Add StackCraft GitHub repository inline
43+ await page . locator ( 'button' , { hasText : 'New' } ) . click ( )
44+ const repoForm = page . locator ( 'shade-github-repo-form' )
45+ await expect ( repoForm ) . toBeVisible ( )
46+ await repoForm . locator ( 'input[name="url"]' ) . fill ( 'https://github.com/furystack/stack-craft' )
47+ await repoForm . locator ( 'input[name="displayName"]' ) . fill ( 'StackCraft' )
48+ await repoForm . locator ( 'button' , { hasText : 'Add' } ) . click ( )
49+ await expect ( page . locator ( 'shade-noty-list' ) ) . toContainText ( '"StackCraft" was added.' )
50+
51+ // Select the newly created repository
52+ const repoSelect = page . locator ( 'shade-select' ) . filter ( { has : page . locator ( 'input[name="repositoryId"]' ) } )
53+ await repoSelect . locator ( '.select-trigger' ) . click ( )
54+ await repoSelect . locator ( '.dropdown-item' , { hasText : 'StackCraft' } ) . click ( )
55+
4256 await page . locator ( 'input[name="installCommand"]' ) . fill ( 'yarn install' )
4357 await page . locator ( 'input[name="buildCommand"]' ) . fill ( 'yarn build' )
4458 await page . locator ( 'input[name="runCommand"]' ) . fill ( 'yarn start:service' )
4559
4660 await page . locator ( 'button' , { hasText : 'Create' } ) . click ( )
4761
62+ // Step 2: Set up the service (clone, install, build)
4863 await page . locator ( 'button' , { hasText : 'Set up now' } ) . click ( )
4964
50- await expect ( page . locator ( 'shade-dashboard' ) ) . toBeVisible ( )
51- await expect ( page . locator ( `text=${ displayName } ` ) ) . toBeVisible ( )
65+ // Clone + install + build may take several minutes
66+ await expect ( page . getByText ( 'Service set up successfully!' ) ) . toBeVisible ( { timeout : 10 * 60 * 1000 } )
67+
68+ // Navigate to the service detail
69+ await page . locator ( 'button' , { hasText : 'View Service' } ) . click ( )
70+ await expect ( page . locator ( 'shade-service-detail' ) ) . toBeVisible ( )
5271
53- // Verify the service is running
72+ // Start the service
73+ await page . locator ( 'shade-service-detail button' , { hasText : 'Start' } ) . click ( )
74+
75+ // Wait for the service to reach running state
76+ await expect ( page . locator ( 'shade-service-status-indicator' ) ) . toContainText ( 'Running' )
77+
78+ // Navigate to logs
79+ await page . getByTestId ( 'page-header-actions' ) . getByRole ( 'button' , { name : 'Logs' } ) . click ( )
5480 await expect ( page . locator ( 'shade-service-logs' ) ) . toBeVisible ( )
81+
82+ // Verify that log entries appear
83+ await expect ( page . locator ( 'shade-log-viewer' ) ) . toBeVisible ( )
84+ await expect ( page . locator ( 'shade-log-viewer' ) ) . not . toContainText ( 'No log output yet.' )
5585} )
0 commit comments