From 646b2545d57429513a179be1a351a3bb19e4712e Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 5 Oct 2025 19:58:59 +0200 Subject: [PATCH] fix(setup): set dbtype value also for single-db Signed-off-by: Daniel Kesselberg --- core/src/views/Setup.cy.ts | 22 ++++++++++++++-------- core/src/views/Setup.vue | 5 +++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/core/src/views/Setup.cy.ts b/core/src/views/Setup.cy.ts index f252801c4d8..43da1f19a38 100644 --- a/core/src/views/Setup.cy.ts +++ b/core/src/views/Setup.cy.ts @@ -84,9 +84,13 @@ describe('Default setup page', () => { cy.mockInitialState('core', 'config', config) cy.mount(SetupView) - // No DB radio selectors if only sqlite cy.get('[data-cy-setup-form-field^="dbtype"]') - .should('not.exist') + .should('exist') + .should('not.be.visible') + .find('input') + .should('be.checked') + + cy.get('[data-cy-setup-form-field="dbtype-sqlite"]').should('exist') // Two warnings: sqlite and single db support cy.get('[data-cy-setup-form-db-note="sqlite"]') @@ -94,10 +98,10 @@ describe('Default setup page', () => { cy.get('[data-cy-setup-form-db-note="single-db"]') .should('be.visible') - // Admin login, password and data directory + // Admin login, password, data directory and db type cy.get('[data-cy-setup-form-field]') .should('be.visible') - .should('have.length', 3) + .should('have.length', 4) }) it('Renders single DB mysql', () => { @@ -110,9 +114,11 @@ describe('Default setup page', () => { cy.mockInitialState('core', 'config', config) cy.mount(SetupView) - // No DB radio selectors if only mysql cy.get('[data-cy-setup-form-field^="dbtype"]') - .should('not.exist') + .should('exist') + .should('not.be.visible') + .find('input') + .should('be.checked') // Single db support warning cy.get('[data-cy-setup-form-db-note="single-db"]') @@ -124,11 +130,11 @@ describe('Default setup page', () => { cy.get('[data-cy-setup-form-db-note="sqlite"]') .should('not.exist') - // Admin login, password, data directory, db user, + // Admin login, password, data directory, db type, db user, // db password, db name and db host cy.get('[data-cy-setup-form-field]') .should('be.visible') - .should('have.length', 7) + .should('have.length', 8) }) it('Changes fields from sqlite to mysql then oci', () => { diff --git a/core/src/views/Setup.vue b/core/src/views/Setup.vue index 50ec0da9035..b30e1049e74 100644 --- a/core/src/views/Setup.vue +++ b/core/src/views/Setup.vue @@ -82,7 +82,8 @@
-

+ +

- + {{ t('core', 'Only {firstAndOnlyDatabase} is available.', { firstAndOnlyDatabase }) }}
{{ t('core', 'Install and activate additional PHP modules to choose other database types.') }}