@@ -48,4 +48,48 @@ describe('
', () => {
cy.findByRole('button', { name: 'Next Step' })
.should('have.disabled')
})
+
+ it('renders the detected flag', () => {
+ cy.mountFragment(EnvironmentSetupFragmentDoc, {
+ onResult: (res) => {
+ res.frameworks[0].isDetected = true
+ },
+ render: (gqlVal) => (
+
+
+
+ ),
+ })
+
+ cy.findByRole('button', {
+ name: 'Front-end Framework Pick a framework',
+ expanded: false,
+ }).click()
+
+ cy.findByRole('option', { name: 'Create React App (detected)' }).should('be.visible')
+ })
+
+ it('shows the description of bundler as Dev Server', () => {
+ cy.mountFragment(EnvironmentSetupFragmentDoc, {
+ onResult: (res) => {
+ res.framework = {
+ ...res.frameworks[3],
+ supportedBundlers: res.allBundlers,
+ }
+ },
+ render: (gqlVal) => (
+
+
+
+ ),
+ })
+
+ cy.findByLabelText('Bundler(Dev Server)').should('be.visible')
+ })
})
diff --git a/packages/launchpad/src/setup/EnvironmentSetup.vue b/packages/launchpad/src/setup/EnvironmentSetup.vue
index 457228e3880e..24c4898e2ded 100644
--- a/packages/launchpad/src/setup/EnvironmentSetup.vue
+++ b/packages/launchpad/src/setup/EnvironmentSetup.vue
@@ -22,6 +22,7 @@
:value="props.gql.bundler?.type ?? undefined"
:placeholder="t('setupPage.projectSetup.bundlerPlaceholder')"
:label="t('setupPage.projectSetup.bundlerLabel')"
+ :description="t('setupPage.projectSetup.bundlerLabelDescription')"
selector-type="bundler"
data-testid="select-bundler"
@select-bundler="val => onWizardSetup('bundler', val)"
@@ -59,16 +60,19 @@ fragment EnvironmentSetup on Wizard {
name
type
isSelected
+ isDetected
}
framework {
type
id
name
isSelected
+ isDetected
supportedBundlers {
id
type
name
+ isDetected
}
category
}
@@ -76,6 +80,7 @@ fragment EnvironmentSetup on Wizard {
id
name
isSelected
+ isDetected
type
category
}
@@ -83,6 +88,7 @@ fragment EnvironmentSetup on Wizard {
id
name
type
+ isDetected
}
language {
id
diff --git a/packages/launchpad/src/setup/ScaffoldLanguageSelect.vue b/packages/launchpad/src/setup/ScaffoldLanguageSelect.vue
index 608354f02ac2..ae39f82a72a1 100644
--- a/packages/launchpad/src/setup/ScaffoldLanguageSelect.vue
+++ b/packages/launchpad/src/setup/ScaffoldLanguageSelect.vue
@@ -15,7 +15,7 @@
onLanguageSelect(val)"
/>
diff --git a/packages/launchpad/src/setup/ScaffoldedFiles.vue b/packages/launchpad/src/setup/ScaffoldedFiles.vue
index 559bb8f5e8c3..e9d74d3da112 100644
--- a/packages/launchpad/src/setup/ScaffoldedFiles.vue
+++ b/packages/launchpad/src/setup/ScaffoldedFiles.vue
@@ -79,7 +79,7 @@ const needsChanges = computed(() => props.gql.scaffoldedFiles?.some((f) => f.sta
const mutation = useMutation(ScaffoldedFiles_CompleteSetupDocument)
-const completeSetup = () => {
- mutation.executeMutation({})
+const completeSetup = async () => {
+ await mutation.executeMutation({})
}
diff --git a/packages/launchpad/src/setup/SelectFwOrBundler.cy.tsx b/packages/launchpad/src/setup/SelectFwOrBundler.cy.tsx
index 4f1ad74eaa5f..0c224b2557ac 100644
--- a/packages/launchpad/src/setup/SelectFwOrBundler.cy.tsx
+++ b/packages/launchpad/src/setup/SelectFwOrBundler.cy.tsx
@@ -8,6 +8,7 @@ const manyOptions = [
isSelected: false,
type: 'vue',
category: 'vue',
+ isDetected: true,
},
{
name: 'React.js',
@@ -41,6 +42,18 @@ describe('