diff --git a/.github/workflows/deploy-beta-testing.yml b/.github/workflows/deploy-beta-testing.yml
index 215c3e46f..52d5c302b 100644
--- a/.github/workflows/deploy-beta-testing.yml
+++ b/.github/workflows/deploy-beta-testing.yml
@@ -5,6 +5,9 @@ on:
branches:
- develop
+env:
+ FRONTEND_BASE_PATH: /modern
+
jobs:
build:
runs-on: ubuntu-latest
@@ -31,7 +34,7 @@ jobs:
run: npm run build
- name: Build with base path
- run: npm run build -- --base=/spa
+ run: npm run build -- --base=${{ env.FRONTEND_BASE_PATH }}
- name: Override runtime config.js for BETA
env:
@@ -115,4 +118,4 @@ jobs:
ASADMIN='/usr/local/payara6/bin/asadmin --user admin'
DATAVERSE_FRONTEND=`$ASADMIN list-applications |grep $APPLICATION_NAME |awk '{print $1}'`
$ASADMIN undeploy $DATAVERSE_FRONTEND
- $ASADMIN deploy --name $APPLICATION_NAME --contextroot /spa $APPLICATION_WAR_PATH
+ $ASADMIN deploy --name $APPLICATION_NAME --contextroot ${{ env.FRONTEND_BASE_PATH }} $APPLICATION_WAR_PATH
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index c9786e7f4..1f03d2ddd 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -12,7 +12,7 @@ on:
- qa
- demo
basepath:
- description: 'Server base path (without slashes) for serving the application (e.g., spa). If left blank, it will try to deploy to the root base path.'
+ description: 'Server base path (without slashes) for serving the application (e.g., modern). If left blank, it will try to deploy to the root base path.'
type: string
required: false
diff --git a/.github/workflows/generate-war.yml b/.github/workflows/generate-war.yml
index 08850d7e5..07006d4e6 100644
--- a/.github/workflows/generate-war.yml
+++ b/.github/workflows/generate-war.yml
@@ -12,7 +12,7 @@ on:
- qa
- demo
basepath:
- description: 'Server base path (without slashes) for serving the application (e.g., spa). If left blank, it will try to deploy to the root base path.'
+ description: 'Server base path (without slashes) for serving the application (e.g., modern). If left blank, it will try to deploy to the root base path.'
type: string
required: false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4082a6953..2db245d58 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -63,6 +63,7 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
- Upgrade Keycloak to 26.3.2; updated SPI and test realm JSON.
- Truncate long collection and dataset descriptions with expandable content. (#789)
- UI polish: Files Table always shows action buttons. (#800)
+- Removed hard-coded references to /spa path and SPA name, changed to /modern (#945)
### Fixed
diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md
index da3ed45ac..e4fdeb440 100644
--- a/DEVELOPER_GUIDE.md
+++ b/DEVELOPER_GUIDE.md
@@ -236,7 +236,7 @@ project files and shut down any running containers.
Once the script has finished, you will be able to access Dataverse via:
-- Dataverse SPA Frontend: [http://localhost:8000/spa][dv_app_localhost_spa_url]
+- Dataverse MODERN Frontend: [http://localhost:8000/modern][dv_app_localhost_modern_url]
- Dataverse JSF Application: [http://localhost:8000][dv_app_localhost_legacy_url]
Note: The Dataverse configbaker takes some time to start the application, so the application will not be accessible until
@@ -802,7 +802,7 @@ describe('Create Dataset', () => {
})
it('navigates to the new dataset after submitting a valid form', () => {
- cy.visit('/spa/datasets/root/create')
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets/root/create`)
cy.findByLabelText(/Title/i).type('Test Dataset Title')
cy.findByLabelText(/Author Name/i).type('Test author name', { force: true })
@@ -885,7 +885,7 @@ it(
}
)
- cy.visit('/spa/')
+ cy.visit(`${FRONTEND_BASE_PATH}/`)
// Assertions that rely on your overridden config
cy.findByText('English').should('exist')
@@ -1134,7 +1134,7 @@ path included will redirect to the frontend application.
[dv_app_localhost_build_url]: http://localhost:5173
[dv_app_localhost_storybook_url]: http://localhost:6006/
[dv_app_localhost_designsystem_url]: http://localhost:6007/
-[dv_app_localhost_spa_url]: http://localhost:8000/spa
+[dv_app_localhost_modern_url]: http://localhost:8000/modern
[dv_app_localhost_legacy_url]: http://localhost:8000/
diff --git a/README.md b/README.md
index 8cc779c1d..16be50e7a 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@
Website |
- View Demo (BETA) |
+ View Demo (BETA) |
Report Bug |
Request Feature
@@ -139,21 +139,21 @@ All environments follow an “all-in-one” setup, where the frontend and backen
The **Beta** environment provides a remote space for testing the latest changes. GitHub Actions automatically deploy the current `develop` branches of both the frontend and backend.
- **Audience:** Development team, QA analysts, project managers, selected users for early feedback
-- **URL:** [beta.dataverse.org/spa][dv_app_beta_spa_url]
+- **URL:** [beta.dataverse.org/modern][dv_app_beta_modern_url]
#### Demo
The **Demo** environment showcases the latest officially released version of the SPA, compatible with the latest Dataverse backend release. Deployments target specific tagged releases (e.g., `0.1.0`) and are performed on demand.
- **Audience:** Project managers, curation team, early adoption testers
-- **URL:** [demo.dataverse.org/spa][dv_app_demo_spa_url]
+- **URL:** [demo.dataverse.org/modern][dv_app_demo_modern_url]
#### QA
The **QA** environment is a dedicated, short-lived testing space. It is deployed on demand with feature branches (e.g., `feature/xxx`), frequently overwritten, and used for validating new features and bug fixes before merging into development.
- **Audience:** QA analysts, development team
-- **URL:** [qa.dataverse.org/spa][dv_app_qa_spa_url]
+- **URL:** [qa.dataverse.org/modern][dv_app_qa_modern_url]
#### Spike Environments
@@ -397,15 +397,15 @@ Distributed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for mo
-[dv_app_beta_spa_url]: https://beta.dataverse.org/spa
-[dv_app_demo_spa_url]: https://demo.dataverse.org/spa
-[dv_app_qa_spa_url]: https://qa.dataverse.org/spa
+[dv_app_beta_modern_url]: https://beta.dataverse.org/modern
+[dv_app_demo_modern_url]: https://demo.dataverse.org/modern
+[dv_app_qa_modern_url]: https://qa.dataverse.org/modern
[dv_app_beta_legacyjsf_url]: https://beta.dataverse.org
[dv_app_legacyjsf_demo_url]: https://demo.dataverse.org/
[dv_app_localhost_build_url]: http://localhost:5173
[dv_app_localhost_storybook_url]: http://localhost:6006/
[dv_app_localhost_designsystem_url]: http://localhost:6007/
-[dv_app_localhost_spa_url]: http://localhost:8000/spa
+[dv_app_localhost_modern_url]: http://localhost:8000/modern
[dv_app_localhost_legacy_url]: http://localhost:8000/
diff --git a/cypress.config.ts b/cypress.config.ts
index b9f6c55e6..6998d3198 100644
--- a/cypress.config.ts
+++ b/cypress.config.ts
@@ -35,6 +35,7 @@ export default defineConfig({
}
},
env: {
+ frontendBasePath: '/modern',
backendUrl: 'http://localhost:8000',
oidcClientId: 'test',
oidcAuthorizationEndpoint: 'http://localhost:8000/realms/test/protocol/openid-connect/auth',
diff --git a/dev-env/nginx.conf b/dev-env/nginx.conf
index 74b1d8f2c..9785ffe6d 100644
--- a/dev-env/nginx.conf
+++ b/dev-env/nginx.conf
@@ -104,7 +104,7 @@ http {
}
# Route for SPA frontend
- location /spa {
+ location /modern {
proxy_pass http://frontend:5173;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
diff --git a/dev-env/shib-dev-env/nginx/nginx.conf b/dev-env/shib-dev-env/nginx/nginx.conf
index e8f502d08..9c7b5c6c7 100644
--- a/dev-env/shib-dev-env/nginx/nginx.conf
+++ b/dev-env/shib-dev-env/nginx/nginx.conf
@@ -107,7 +107,7 @@ http {
}
# Route for SPA frontend
- location /spa {
+ location /modern {
proxy_pass http://frontend:5173;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
diff --git a/dev-env/vite.config.ts b/dev-env/vite.config.ts
index b5b2e3bc5..3036ac992 100644
--- a/dev-env/vite.config.ts
+++ b/dev-env/vite.config.ts
@@ -4,6 +4,7 @@ import istanbul from 'vite-plugin-istanbul'
import * as path from 'path'
export default defineConfig({
+ base: '/modern',
plugins: [
react(),
istanbul({
diff --git a/package.json b/package.json
index 59d87c00b..5ee6120cb 100644
--- a/package.json
+++ b/package.json
@@ -62,7 +62,7 @@
"zod": "4.1.12"
},
"scripts": {
- "start": "vite --base=/spa",
+ "start": "vite",
"build": "tsc && vite build",
"build-keycloak-theme": "npm run build && keycloakify build",
"preview": "vite preview",
diff --git a/packages/design-system/src/lib/stories/rich-text-editor/RichTextEditor.stories.tsx b/packages/design-system/src/lib/stories/rich-text-editor/RichTextEditor.stories.tsx
index d4297bfb4..256284021 100644
--- a/packages/design-system/src/lib/stories/rich-text-editor/RichTextEditor.stories.tsx
+++ b/packages/design-system/src/lib/stories/rich-text-editor/RichTextEditor.stories.tsx
@@ -53,7 +53,7 @@ export const WithAllFormats: Story = {
render: () => (
Heading 1Heading 2
Heading 3
Hello Dataverse new rick rich text editor! This is a link.
Item 1
Item 2
onUpdate: ({ editor }) => onChange && onChange(editor.getHTML())
This is a blockquoute
'
+ 'Heading 1
Heading 2
Heading 3
Hello Dataverse new rick rich text editor! This is a link.
Item 1
Item 2
onUpdate: ({ editor }) => onChange && onChange(editor.getHTML())
This is a blockquoute
'
}
onChange={handleChange}
/>
diff --git a/src/i18n.ts b/src/i18n.ts
index 6ae4911c2..9c70c88c7 100644
--- a/src/i18n.ts
+++ b/src/i18n.ts
@@ -25,9 +25,9 @@ void i18next
returnNull: false,
backend: {
loadPath:
- import.meta.env.BASE_URL != '/spa'
+ import.meta.env.BASE_URL != '/modern'
? `${import.meta.env.BASE_URL}locales/{{lng}}/{{ns}}.json`
- : `/spa/locales/{{lng}}/{{ns}}.json`
+ : `/modern/locales/{{lng}}/{{ns}}.json`
}
})
diff --git a/src/sections/edit-collection-featured-items/featured-items-form/FeaturedItemsFormHelper.ts b/src/sections/edit-collection-featured-items/featured-items-form/FeaturedItemsFormHelper.ts
index b8fdea165..9140266d8 100644
--- a/src/sections/edit-collection-featured-items/featured-items-form/FeaturedItemsFormHelper.ts
+++ b/src/sections/edit-collection-featured-items/featured-items-form/FeaturedItemsFormHelper.ts
@@ -144,7 +144,7 @@ export class FeaturedItemsFormHelper {
}
/**
- * @description This method parses a URL to extract the type and identifier of a Dataverse object (Collection, Dataset, or File). Works for URL's from the SPA and JSF versions of Dataverse.
+ * @description This method parses a URL to extract the type and identifier of a Dataverse object (Collection, Dataset, or File). Works for URLs from the modern frontend and JSF versions of Dataverse.
* @param input - The URL or DOI string to parse.
* @returns An object containing the type and identifier of the Dataverse object, or null if the input is not a valid URL or does not match any known patterns.
*/
@@ -165,7 +165,7 @@ export class FeaturedItemsFormHelper {
try {
const url = new URL(value)
- const path = url.pathname.replace(/^\/spa/, '') // reomve "/spa" if exists
+ const path = url.pathname.replace(/^\/modern/, '') // remove "/modern" if exists
const searchParams = url.searchParams
// --- COLLECTION ---
@@ -213,7 +213,7 @@ export class FeaturedItemsFormHelper {
}
/**
- * @description This method transforms the type and identifier of a Dataverse object into a URL for the SPA version of Dataverse.
+ * @description This method transforms the type and identifier of a Dataverse object into a URL for the Modern version of Dataverse.
* @param type - The type of the Dataverse object (Collection, Dataset, or File).
* @param identifier - The identifier of the Dataverse object (e.g., alias for Collection, persistent ID for Dataset, or file ID for File).
* @returns A string representing the URL for the specified Dataverse object.
@@ -244,7 +244,7 @@ export class FeaturedItemsFormHelper {
try {
const url = new URL(trimmed)
- const path = url.pathname.replace(/^\/spa/, '') // remove "/spa" if exists
+ const path = url.pathname.replace(/^\/modern/, '') // remove "/modern" if exists
const searchParams = url.searchParams
// --- COLLECTION ---
diff --git a/src/sections/layout/Layout.tsx b/src/sections/layout/Layout.tsx
index 4fcc858db..a0924c2cd 100644
--- a/src/sections/layout/Layout.tsx
+++ b/src/sections/layout/Layout.tsx
@@ -13,7 +13,7 @@ export function Layout() {
{HeaderFactory.create()}
{/*
- You are using the new Dataverse SPA version. This is an early release and
+ You are using the new Dataverse Modern version. This is an early release and
some features from the original site are not yet available.
*/}
diff --git a/src/sections/layout/header/Header.tsx b/src/sections/layout/header/Header.tsx
index 6f91d3084..ef34fb73b 100644
--- a/src/sections/layout/header/Header.tsx
+++ b/src/sections/layout/header/Header.tsx
@@ -12,6 +12,8 @@ import { encodeReturnToPathInStateQueryParam } from '@/sections/auth-callback/Au
import { LanguageSwitcher } from './LanguageSwitcher'
import styles from './Header.module.scss'
+const BASENAME_URL = import.meta.env.BASE_URL ?? ''
+
interface HeaderProps {
notficationRepository: NotificationRepository
}
@@ -32,7 +34,7 @@ export function Header({ notficationRepository }: HeaderProps) {
diff --git a/src/sections/not-implemented/NotImplementedModal.tsx b/src/sections/not-implemented/NotImplementedModal.tsx
index 2f40c00e4..8263731a8 100644
--- a/src/sections/not-implemented/NotImplementedModal.tsx
+++ b/src/sections/not-implemented/NotImplementedModal.tsx
@@ -17,7 +17,7 @@ export function NotImplementedModal({ show, handleClose }: NotImplementedModalPr
{modalTitle}
- This feature is not implemented yet in SPA.
+ This feature is not implemented yet in the Modern version.
If you want to use this feature you can go to the original{' '}
Dataverse page.
diff --git a/tests/component/collection/domain/models/FeaturedItemMother.ts b/tests/component/collection/domain/models/FeaturedItemMother.ts
index adf80de0f..36edbf533 100644
--- a/tests/component/collection/domain/models/FeaturedItemMother.ts
+++ b/tests/component/collection/domain/models/FeaturedItemMother.ts
@@ -14,7 +14,7 @@ export class FeaturedItemMother {
imageFileUrl: '/storybook/css.webp',
displayOrder: 1,
content:
- '
Some Title
Hello Dataverse new rick rich text editor! This is a link.
Item 1
Item 2
onUpdate: ({ editor }) => onChange && onChange(editor.getHTML())
This is a blockquoute
'
+ 'Some Title
Hello Dataverse new rick rich text editor! This is a link.
Item 1
Item 2
onUpdate: ({ editor }) => onChange && onChange(editor.getHTML())
This is a blockquoute
'
},
{
id: 2,
@@ -58,7 +58,7 @@ export class FeaturedItemMother {
imageFileUrl: `/storybook/${img}.webp`,
displayOrder: 1,
content:
- 'Some Title
Hello Dataverse new rick rich text editor! This is a link.
Item 1
Item 2
onUpdate: ({ editor }) => onChange && onChange(editor.getHTML())
This is a blockquoute
',
+ 'Some Title
Hello Dataverse new rick rich text editor! This is a link.
Item 1
Item 2
onUpdate: ({ editor }) => onChange && onChange(editor.getHTML())
This is a blockquoute
',
...props
}
}
diff --git a/tests/component/info/domain/models/TermsOfUseMother.ts b/tests/component/info/domain/models/TermsOfUseMother.ts
index f00799569..3c01f9e20 100644
--- a/tests/component/info/domain/models/TermsOfUseMother.ts
+++ b/tests/component/info/domain/models/TermsOfUseMother.ts
@@ -6,7 +6,7 @@ export class TermsOfUseMother {
}
static createWithOnClickScript(): TermsOfUse {
- return 'Terms of Use SPA dev
Please see our full terms of use
Thanks for reading!
'
+ return 'Terms of Use dev
Please see our full terms of use
Thanks for reading!
'
}
static createEmpty(): TermsOfUse {
diff --git a/tests/component/sections/collection/edit-collection-dropdown/EditCollectionDropdown.spec.tsx b/tests/component/sections/collection/edit-collection-dropdown/EditCollectionDropdown.spec.tsx
index 36368f266..627499848 100644
--- a/tests/component/sections/collection/edit-collection-dropdown/EditCollectionDropdown.spec.tsx
+++ b/tests/component/sections/collection/edit-collection-dropdown/EditCollectionDropdown.spec.tsx
@@ -158,7 +158,7 @@ describe('EditCollectionDropdown', () => {
cy.findByRole('button', { name: 'Permissions' }).click()
cy.findByText('Not Implemented').should('exist')
- cy.findByText('This feature is not implemented yet in SPA.').should('exist')
+ cy.findByText(/This feature is not implemented yet in the Modern version./i).should('exist')
})
describe('delete button', () => {
diff --git a/tests/component/sections/edit-featured-items/FeaturedItemsForm.spec.tsx b/tests/component/sections/edit-featured-items/FeaturedItemsForm.spec.tsx
index 4ef13f2b3..c0dac0086 100644
--- a/tests/component/sections/edit-featured-items/FeaturedItemsForm.spec.tsx
+++ b/tests/component/sections/edit-featured-items/FeaturedItemsForm.spec.tsx
@@ -453,7 +453,7 @@ describe('FeaturedItemsForm', () => {
cy.findByLabelText(/Dataverse Object URL/)
.should('exist')
.should('be.visible')
- .type('https://foo.com/spa/collections/foo')
+ .type('https://foo.com/modern/collections/foo')
cy.findByTestId('dv-object-info').within(() => {
cy.contains('Type: collection').should('exist').should('be.visible')
@@ -462,7 +462,7 @@ describe('FeaturedItemsForm', () => {
cy.findByLabelText(/Dataverse Object URL/)
.clear()
- .type('https://foo.com/spa/datasets?persistentId=doi:10.5072/FK2/HIS9DO')
+ .type('https://foo.com/modern/datasets?persistentId=doi:10.5072/FK2/HIS9DO')
cy.findByTestId('dv-object-info').within(() => {
cy.contains('Type: dataset').should('exist').should('be.visible')
@@ -471,7 +471,7 @@ describe('FeaturedItemsForm', () => {
cy.findByLabelText(/Dataverse Object URL/)
.clear()
- .type('https://foo.com/spa/files?id=4')
+ .type('https://foo.com/modern/files?id=4')
cy.findByTestId('dv-object-info').within(() => {
cy.contains('Type: file').should('exist').should('be.visible')
@@ -1307,7 +1307,7 @@ describe('FeaturedItemsForm', () => {
cy.get('@third-item').within(() => {
cy.findByLabelText(/Dataverse Object URL/).type(
- 'http://localhost:8000/spa/collections/dataverse-admin-collection'
+ 'http://localhost:8000/modern/collections/dataverse-admin-collection'
)
cy.findByTestId('dv-object-info').within(() => {
cy.contains('Type: collection').should('exist').should('be.visible')
diff --git a/tests/component/sections/edit-featured-items/FeaturedItemsFormHelper.spec.ts b/tests/component/sections/edit-featured-items/FeaturedItemsFormHelper.spec.ts
index cca3e3ac3..b4a9c8c21 100644
--- a/tests/component/sections/edit-featured-items/FeaturedItemsFormHelper.spec.ts
+++ b/tests/component/sections/edit-featured-items/FeaturedItemsFormHelper.spec.ts
@@ -79,18 +79,18 @@ const testFormFields: FeaturedItemField[] = [
{
type: FeaturedItemType.COLLECTION,
dvObjectIdentifier: 'sample-collection-id',
- dvObjectUrl: 'http://localhost:8000/spa/collections/sample-collection-id',
+ dvObjectUrl: 'http://localhost:8000/modern/collections/sample-collection-id',
itemId: 4
},
{
type: FeaturedItemType.DATASET,
dvObjectIdentifier: 'doi:10.5072/FK2/ABC123',
- dvObjectUrl: 'http://localhost:8000/spa/datasets?persistentId=doi:10.5072/FK2/ABC123'
+ dvObjectUrl: 'http://localhost:8000/modern/datasets?persistentId=doi:10.5072/FK2/ABC123'
},
{
type: FeaturedItemType.FILE,
dvObjectIdentifier: '44',
- dvObjectUrl: 'http://localhost:8000/spa/files?id=44&datasetVersion=2.0',
+ dvObjectUrl: 'http://localhost:8000/modern/files?id=44&datasetVersion=2.0',
itemId: 6
}
]
@@ -249,9 +249,9 @@ describe('FeaturedItemsFormHelper', () => {
})
})
- it('should return collection type and identifier from SPA URL', () => {
+ it('should return collection type and identifier from modern frontend URL', () => {
const result = FeaturedItemsFormHelper.extractDvObjectTypeAndIdentiferFromUrlValue(
- 'http://localhost:8000/spa/collections/dataverse-admin-collection'
+ 'http://localhost:8000/modern/collections/dataverse-admin-collection'
)
expect(result).to.deep.equal({
@@ -271,9 +271,9 @@ describe('FeaturedItemsFormHelper', () => {
})
})
- it('should return dataset type and identifier from SPA URL', () => {
+ it('should return dataset type and identifier from modern frontend URL', () => {
const result = FeaturedItemsFormHelper.extractDvObjectTypeAndIdentiferFromUrlValue(
- 'http://localhost:8000/spa/datasets?persistentId=doi:10.5072/FK2/HIS9DO'
+ 'http://localhost:8000/modern/datasets?persistentId=doi:10.5072/FK2/HIS9DO'
)
expect(result).to.deep.equal({
@@ -293,9 +293,9 @@ describe('FeaturedItemsFormHelper', () => {
})
})
- it('should return file type and identifier from SPA URL', () => {
+ it('should return file type and identifier from modern frontend URL', () => {
const result = FeaturedItemsFormHelper.extractDvObjectTypeAndIdentiferFromUrlValue(
- 'http://localhost:8000/spa/files?id=4&datasetVersion=2.0'
+ 'http://localhost:8000/modern/files?id=4&datasetVersion=2.0'
)
expect(result).to.deep.equal({
@@ -371,7 +371,7 @@ describe('FeaturedItemsFormHelper', () => {
})
})
- describe('transformDvObjectTypeAndIdentifierToSpaURL', () => {
+ describe('transformDvObjectTypeAndIdentifierToURL', () => {
it('should return collection page URL when type is collection', () => {
const identifier = 'sample-collection-id'
const result = FeaturedItemsFormHelper.transformDvObjectTypeAndIdentifierToSpaURL(
diff --git a/tests/component/sections/layout/header/Header.spec.tsx b/tests/component/sections/layout/header/Header.spec.tsx
index c6f76b391..c293afc27 100644
--- a/tests/component/sections/layout/header/Header.spec.tsx
+++ b/tests/component/sections/layout/header/Header.spec.tsx
@@ -22,8 +22,9 @@ describe('Header component', () => {
)
- cy.findByRole('link', { name: /Dataverse/ }).should('exist')
- cy.findByRole('link').should('have.attr', 'href', '/spa/')
+ cy.findByRole('link', { name: /Dataverse/ })
+ .should('exist')
+ .and('have.attr', 'href')
})
it('displays the user name when the user is logged in', () => {
diff --git a/tests/component/sections/not-implemented/NotImplemented.spec.tsx b/tests/component/sections/not-implemented/NotImplemented.spec.tsx
index 3a9766c92..90f8f6429 100644
--- a/tests/component/sections/not-implemented/NotImplemented.spec.tsx
+++ b/tests/component/sections/not-implemented/NotImplemented.spec.tsx
@@ -10,7 +10,7 @@ describe('NotImplementedModal Component', () => {
cy.findByText('Not Implemented').should('exist')
// Check if the modal body has specific content
- cy.findByText('This feature is not implemented yet in SPA.').should('exist')
+ cy.findByText(/This feature is not implemented yet in the Modern version./i).should('exist')
})
it('closes the modal when the Close button is clicked', () => {
diff --git a/tests/e2e-integration/e2e/sections/auth/Login.spec.tsx b/tests/e2e-integration/e2e/sections/auth/Login.spec.tsx
index 3b70545ed..16fff3461 100644
--- a/tests/e2e-integration/e2e/sections/auth/Login.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/auth/Login.spec.tsx
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { Utils } from '@/shared/helpers/Utils'
import { TestsUtils } from '@tests/e2e-integration/shared/TestsUtils'
import { requireAppConfig } from '@/config'
@@ -6,7 +7,7 @@ const appConfig = requireAppConfig()
describe('Login', () => {
it('successfully log in with a user that exists in dataverse and not in the OIDC provider', () => {
- cy.visit('/spa/')
+ cy.visit(`${FRONTEND_BASE_PATH}/`)
cy.wait(1_000)
cy.findByTestId('oidc-login').click()
@@ -15,7 +16,7 @@ describe('Login', () => {
cy.wait(1_500)
cy.url()
- .should('eq', `${Cypress.config().baseUrl as string}/spa`)
+ .should('eq', `${Cypress.config().baseUrl as string}${FRONTEND_BASE_PATH}`)
.then(() => {
const token = Utils.getLocalStorageItem(
`${appConfig.oidc.localStorageKeyPrefix}token`
@@ -29,7 +30,7 @@ describe('Login', () => {
// TODO: Fix - We could do this in another iteration, first time e2e runs it will pass but second no because it will be already linked
it('successfully log in and finish the sign up with a user that exists in the OIDC provider and not in dataverse', () => {
- cy.visit('/spa/')
+ cy.visit(`${FRONTEND_BASE_PATH}/`)
cy.wait(1_000)
cy.findByTestId('oidc-login').click()
@@ -41,7 +42,10 @@ describe('Login', () => {
cy.url().should((currentUrl) => {
const baseUrl = Cypress.config().baseUrl as string
- expect([`${baseUrl}/spa`, `${baseUrl}/spa/collections`]).to.include(currentUrl)
+ expect([
+ `${baseUrl}${FRONTEND_BASE_PATH}`,
+ `${baseUrl}${FRONTEND_BASE_PATH}/collections`
+ ]).to.include(currentUrl)
})
cy.get('body').then(($body) => {
diff --git a/tests/e2e-integration/e2e/sections/collection/Collection.spec.ts b/tests/e2e-integration/e2e/sections/collection/Collection.spec.ts
index faf7a36f7..f0fb2e907 100644
--- a/tests/e2e-integration/e2e/sections/collection/Collection.spec.ts
+++ b/tests/e2e-integration/e2e/sections/collection/Collection.spec.ts
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { DatasetHelper } from '../../../shared/datasets/DatasetHelper'
import { TestsUtils } from '../../../shared/TestsUtils'
import { faker } from '@faker-js/faker'
@@ -13,14 +14,14 @@ describe('Collection Page', () => {
})
it('successfully loads root collection when accessing the home', () => {
- cy.visit('/spa/collections')
+ cy.visit(`${FRONTEND_BASE_PATH}/collections`)
cy.findAllByText(/Root/i).should('exist')
})
it('navigates to a dataset from the list when clicking the title', () => {
cy.wrap(DatasetHelper.createWithTitle(title), { timeout: 10000 }).then(() => {
cy.wait(1_000)
- cy.visit('/spa/collections')
+ cy.visit(`${FRONTEND_BASE_PATH}/collections`)
cy.findByText(/Dataverse Admin/i).should('exist')
@@ -37,7 +38,7 @@ describe('Collection Page', () => {
cy.wrap(CollectionHelper.create(uniqueCollectionId))
.its('id')
.then((collectionId: string) => {
- cy.visit(`/spa/collections/${collectionId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/collections/${collectionId}`)
cy.findByText('Unpublished').should('exist')
cy.findByRole('button', { name: 'Publish' }).click()
@@ -52,7 +53,7 @@ describe('Collection Page', () => {
describe.skip('Currently skipping all tests as we are only rendering an infinite scrollable container. Please refactor these tests if a toggle button is added to switch between pagination and infinite scroll.', () => {
it('navigates to the correct page of the datasets list when passing the page query param', () => {
cy.wrap(DatasetHelper.createMany(12), { timeout: 10000 }).then(() => {
- cy.visit('/spa/collections?page=2')
+ cy.visit(`${FRONTEND_BASE_PATH}/collections?page=2`)
cy.findAllByText(/Root/i).should('exist')
cy.findByText(/Dataverse Admin/i).should('exist')
@@ -62,7 +63,7 @@ describe('Collection Page', () => {
it('updates the page query param when navigating to another page', () => {
cy.wrap(DatasetHelper.createMany(12), { timeout: 10000 }).then(() => {
- cy.visit('/spa/collections')
+ cy.visit(`${FRONTEND_BASE_PATH}/collections`)
cy.findAllByText(/Root/i).should('exist')
cy.findByText(/Dataverse Admin/i).should('exist')
@@ -75,7 +76,7 @@ describe('Collection Page', () => {
it('correctly changes the pages when using the back and forward buttons from the browser after using some page number button', () => {
cy.wrap(DatasetHelper.createMany(12), { timeout: 10000 }).then(() => {
- cy.visit('/spa/collections?page=2')
+ cy.visit(`${FRONTEND_BASE_PATH}/collections?page=2`)
cy.findAllByText(/Root/i).should('exist')
cy.findByText(/Dataverse Admin/i).should('exist')
@@ -95,7 +96,7 @@ describe('Collection Page', () => {
it('displays a collection different from the root when accessing a subcollection', () => {
cy.wrap(CollectionHelper.create('collection-1')).then(() => {
- cy.visit('/spa/collections/collection-1')
+ cy.visit(`${FRONTEND_BASE_PATH}/collections/collection-1`)
cy.findAllByText(/Scientific Research/i).should('exist')
cy.findByText(/Dataverse Admin/i).should('exist')
diff --git a/tests/e2e-integration/e2e/sections/collection/CollectionItemsPanel.spec.ts b/tests/e2e-integration/e2e/sections/collection/CollectionItemsPanel.spec.ts
index 6e52e2a2a..4aa9ebb29 100644
--- a/tests/e2e-integration/e2e/sections/collection/CollectionItemsPanel.spec.ts
+++ b/tests/e2e-integration/e2e/sections/collection/CollectionItemsPanel.spec.ts
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { CollectionItem } from '@/collection/domain/models/CollectionItemSubset'
import { CollectionItemType } from '@/collection/domain/models/CollectionItemType'
import { CollectionItemsQueryParams } from '@/collection/domain/models/CollectionItemsQueryParams'
@@ -74,7 +75,7 @@ describe('Collection Items Panel', () => {
})
it('performs different search, filtering and respond to back and forward navigation', () => {
- cy.visit(`/spa/collections`)
+ cy.visit(`${FRONTEND_BASE_PATH}/collections`)
cy.wait('@getCollectionItems').then((interception) => {
const { totalItemsInResponse, collectionsInResponse, datasetsInResponse, filesInResponse } =
@@ -323,7 +324,7 @@ describe('Collection Items Panel', () => {
.should('have.length', 2)
})
// 8 Sort by Name (Z-A)
- cy.visit(`/spa/collections`)
+ cy.visit(`${FRONTEND_BASE_PATH}/collections`)
cy.intercept({
pathname: '/api/v1/search',
query: {
diff --git a/tests/e2e-integration/e2e/sections/create-collection/CreateCollection.spec.tsx b/tests/e2e-integration/e2e/sections/create-collection/CreateCollection.spec.tsx
index d1ac4246e..5e128a257 100644
--- a/tests/e2e-integration/e2e/sections/create-collection/CreateCollection.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/create-collection/CreateCollection.spec.tsx
@@ -1,7 +1,8 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { TestsUtils } from '../../../shared/TestsUtils'
import { faker } from '@faker-js/faker'
-const CREATE_COLLECTION_PAGE_URL = '/spa/collections/root/create'
+const CREATE_COLLECTION_PAGE_URL = `${FRONTEND_BASE_PATH}/collections/root/create`
describe('Create Collection', () => {
beforeEach(() => {
diff --git a/tests/e2e-integration/e2e/sections/create-dataset/CreateDataset.spec.tsx b/tests/e2e-integration/e2e/sections/create-dataset/CreateDataset.spec.tsx
index 608856cce..3bc7e7523 100644
--- a/tests/e2e-integration/e2e/sections/create-dataset/CreateDataset.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/create-dataset/CreateDataset.spec.tsx
@@ -1,8 +1,9 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { TestsUtils } from '../../../shared/TestsUtils'
import { DatasetLabelValue } from '../../../../../src/dataset/domain/models/Dataset'
import { DatasetHelper } from '@tests/e2e-integration/shared/datasets/DatasetHelper'
-const CREATE_DATASET_PAGE_URL = '/spa/datasets/root/create'
+const CREATE_DATASET_PAGE_URL = `${FRONTEND_BASE_PATH}/datasets/root/create`
describe('Create Dataset', () => {
beforeEach(() => {
diff --git a/tests/e2e-integration/e2e/sections/dataset/Dataset.spec.tsx b/tests/e2e-integration/e2e/sections/dataset/Dataset.spec.tsx
index f6d4608d9..073b9cb28 100644
--- a/tests/e2e-integration/e2e/sections/dataset/Dataset.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/dataset/Dataset.spec.tsx
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import {
DatasetLabelValue,
DatasetNonNumericVersionSearchParam
@@ -28,7 +29,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create())
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.fixture('dataset-finch1.json').then((dataset: Dataset) => {
cy.findByRole('heading', {
name: dataset.datasetVersion.metadataBlocks.citation.fields[0].value
@@ -54,7 +57,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create(collectionId))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Draft').should('exist')
cy.findByRole('button', { name: 'Publish Dataset' }).should('exist').click()
cy.findByRole('button', { name: 'Publish' }).should('exist')
@@ -71,7 +76,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create())
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Draft').should('exist')
cy.findByRole('button', { name: 'Publish Dataset' }).should('exist').click()
cy.findByRole('button', { name: 'Publish' }).should('exist')
@@ -87,7 +94,7 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create().then((dataset) => DatasetHelper.publish(dataset.persistentId)))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.findByText('Version 1.0').should('exist')
cy.findByRole('button', { name: 'Edit Dataset' }).should('exist').click()
cy.findByRole('button', { name: 'Metadata' }).should('exist').click()
@@ -110,7 +117,7 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create().then((dataset) => DatasetHelper.publish(dataset.persistentId)))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.findByText('Version 1.0').should('exist')
cy.findByRole('button', { name: 'Edit Dataset' }).should('exist').click()
cy.findByRole('button', { name: 'Metadata' }).should('exist').click()
@@ -131,7 +138,7 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create().then((dataset) => DatasetHelper.publish(dataset.persistentId)))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.findByText('Version 1.0').should('exist')
cy.findByRole('button', { name: 'Edit Dataset' }).should('exist').click()
cy.findByRole('button', { name: 'Metadata' }).should('exist').click()
@@ -158,7 +165,7 @@ describe('Dataset', () => {
.then((persistentId: string) => {
TestsUtils.logout()
cy.wait(1500) // Wait for the dataset to be published
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.fixture('dataset-finch1.json').then((dataset: Dataset) => {
cy.findByRole('heading', {
@@ -179,7 +186,9 @@ describe('Dataset', () => {
.its('persistentId')
.then((persistentId: string) => {
TestsUtils.logout()
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByTestId('not-found-page').should('exist')
})
@@ -190,7 +199,7 @@ describe('Dataset', () => {
.its('persistentId')
.then((persistentId: string) => {
cy.wait(1500) // Wait for the dataset to be published
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=1.0`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=1.0`)
cy.fixture('dataset-finch1.json').then((dataset: Dataset) => {
cy.findByRole('heading', {
@@ -208,7 +217,7 @@ describe('Dataset', () => {
.its('persistentId')
.then((persistentId: string) => {
cy.wait(1500) // Wait for the dataset to be published
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=2.0`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=2.0`)
cy.fixture('dataset-finch1.json').then((dataset: Dataset) => {
cy.findByRole('heading', {
@@ -222,7 +231,7 @@ describe('Dataset', () => {
})
it('loads page not found when passing a wrong persistentId', () => {
- cy.visit('/spa/datasets?persistentId=doi:10.5072/FK2/WRONG')
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=doi:10.5072/FK2/WRONG`)
cy.findByTestId('not-found-page').should('exist')
})
@@ -230,7 +239,7 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create().then((dataset) => DatasetHelper.createPrivateUrl(dataset.id)))
.its('token')
.then((token: string) => {
- cy.visit(`/spa/datasets?privateUrlToken=${token}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?privateUrlToken=${token}`)
cy.fixture('dataset-finch1.json').then((dataset: Dataset) => {
cy.findByRole('heading', {
@@ -250,7 +259,7 @@ describe('Dataset', () => {
)
.its('token')
.then((token: string) => {
- cy.visit(`/spa/datasets?privateUrlToken=${token}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?privateUrlToken=${token}`)
cy.fixture('dataset-finch1.json').then((dataset: Dataset) => {
cy.findByRole('heading', {
@@ -275,7 +284,7 @@ describe('Dataset', () => {
.then(() => Promise.all([dataset, DatasetHelper.deaccession(dataset.id)]))
})
.then(([dataset]: [DatasetResponse, { status: string }]) => {
- cy.visit(`/spa/datasets?persistentId=${dataset.persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${dataset.persistentId}`)
cy.findByText(DatasetLabelValue.DEACCESSIONED).should('exist')
})
@@ -289,7 +298,9 @@ describe('Dataset', () => {
)
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Root').should('exist')
cy.findByRole('link', { name: 'Scientific Research' }).should('exist').click()
@@ -302,7 +313,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create())
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByRole('button', { name: 'Edit Dataset' }).should('exist').click()
cy.findByRole('button', { name: 'Delete Dataset' }).should('exist').click()
@@ -322,7 +335,9 @@ describe('Dataset', () => {
return { dataset, guestbook }
})
).then(({ dataset, guestbook }) => {
- cy.visit(`/spa/datasets?persistentId=${dataset.persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${dataset.persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByRole('tab', { name: /Terms and Guestbook/ }).click()
cy.findByTestId('dataset-terms-guestbook-accordion-header')
@@ -351,7 +366,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.create())
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -363,7 +380,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.createWithFiles(FileHelper.createMany(3)), { timeout: 5000 })
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -383,7 +402,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.createWithFiles(FileHelper.createMany(30)), { timeout: 20000 })
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -407,7 +428,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.createWithFiles(FileHelper.createMany(30)), { timeout: 20000 })
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -437,7 +460,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.createWithFiles(FileHelper.createMany(3)))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -459,7 +484,7 @@ describe('Dataset', () => {
cy.wait(1500) // Wait for the dataset to be published
TestsUtils.logout()
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.findByText('Files').should('exist')
@@ -474,7 +499,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.createWithFiles(FileHelper.createManyRestricted(1)))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -505,7 +532,7 @@ describe('Dataset', () => {
TestsUtils.logout()
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.wait(1500) // Wait for the files to be loaded
@@ -540,7 +567,9 @@ describe('Dataset', () => {
.then((persistentId: string) => {
cy.wait(1500) // Wait for the files to be embargoed
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.wait(1500) // Wait for the files to be loaded
@@ -598,7 +627,9 @@ describe('Dataset', () => {
cy.wrap(DatasetHelper.createWithFiles(files))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -719,7 +750,9 @@ describe('Dataset', () => {
.then((fileData) => cy.wrap(DatasetHelper.createWithFiles([fileData])))
.its('persistentId')
.then((persistentId: string) => {
- cy.visit(`/spa/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`)
+ cy.visit(
+ `${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}&version=${DRAFT_PARAM}`
+ )
cy.findByText('Files').should('exist')
@@ -738,7 +771,7 @@ describe('Dataset', () => {
.its('persistentId')
.then((persistentId: string) => {
cy.wait(1500) // Wait for the dataset to be published
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.wait(1500) // Wait for the page to load
cy.findByText('Files').should('exist')
@@ -763,7 +796,7 @@ describe('Dataset', () => {
.then((persistentId: string) => {
TestsUtils.logout()
cy.wait(1500) // Wait for the dataset to be published and the session to clear
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.wait(1500) // Wait for the page to load
cy.findByText('Files').should('exist')
@@ -793,7 +826,7 @@ describe('Dataset', () => {
return dataset
})
).then((publishedDataset) => {
- cy.visit(`/spa/datasets?persistentId=${publishedDataset.persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${publishedDataset.persistentId}`)
cy.wait(1500) // Wait for the page to load
cy.findByText('Files').should('exist')
@@ -825,7 +858,7 @@ describe('Dataset', () => {
})
).then((publishedDataset) => {
TestsUtils.logout()
- cy.visit(`/spa/datasets?persistentId=${publishedDataset.persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${publishedDataset.persistentId}`)
cy.wait(1500)
cy.findByText('Files').should('exist')
@@ -850,7 +883,7 @@ describe('Dataset', () => {
.its('persistentId')
.then((persistentId: string) => {
cy.wait(1500) // Wait for the dataset to be published
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.wait(1500) // Wait for the page to load
cy.findByText('Files').should('exist')
@@ -876,7 +909,7 @@ describe('Dataset', () => {
.its('persistentId')
.then((persistentId: string) => {
cy.wait(1500) // Wait for the page to load
- cy.visit(`/spa/datasets?persistentId=${persistentId}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/datasets?persistentId=${persistentId}`)
cy.wait(1500) // Wait for the page to load
cy.findByText('Files').should('exist')
diff --git a/tests/e2e-integration/e2e/sections/edit-dataset-metadata/EditDatasetMetadata.spec.tsx b/tests/e2e-integration/e2e/sections/edit-dataset-metadata/EditDatasetMetadata.spec.tsx
index 95ef4321d..fb5cdb2d8 100644
--- a/tests/e2e-integration/e2e/sections/edit-dataset-metadata/EditDatasetMetadata.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/edit-dataset-metadata/EditDatasetMetadata.spec.tsx
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { faker } from '@faker-js/faker'
import { TestsUtils } from '../../../shared/TestsUtils'
import {
@@ -22,7 +23,9 @@ describe('Edit Dataset metadata', () => {
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetMetadataUrl = `/spa${Route.EDIT_DATASET_METADATA}?${searchParams.toString()}`
+ const editDatasetMetadataUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_METADATA
+ }?${searchParams.toString()}`
cy.visit(editDatasetMetadataUrl)
@@ -43,7 +46,9 @@ describe('Edit Dataset metadata', () => {
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetMetadataUrl = `/spa${Route.EDIT_DATASET_METADATA}?${searchParams.toString()}`
+ const editDatasetMetadataUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_METADATA
+ }?${searchParams.toString()}`
cy.visit(editDatasetMetadataUrl)
@@ -70,7 +75,9 @@ describe('Edit Dataset metadata', () => {
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetMetadataUrl = `/spa${Route.EDIT_DATASET_METADATA}?${searchParams.toString()}`
+ const editDatasetMetadataUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_METADATA
+ }?${searchParams.toString()}`
TestsUtils.logout()
@@ -89,7 +96,9 @@ describe('Edit Dataset metadata', () => {
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetMetadataUrl = `/spa${Route.EDIT_DATASET_METADATA}?${searchParams.toString()}`
+ const editDatasetMetadataUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_METADATA
+ }?${searchParams.toString()}`
TestsUtils.logout()
diff --git a/tests/e2e-integration/e2e/sections/edit-dataset-terms/EditDatasetTerms.spec.tsx b/tests/e2e-integration/e2e/sections/edit-dataset-terms/EditDatasetTerms.spec.tsx
index 996fc2b06..f30c0f89a 100644
--- a/tests/e2e-integration/e2e/sections/edit-dataset-terms/EditDatasetTerms.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/edit-dataset-terms/EditDatasetTerms.spec.tsx
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { faker } from '@faker-js/faker'
import { TestsUtils } from '../../../shared/TestsUtils'
import { DatasetNonNumericVersionSearchParam } from '../../../../../src/dataset/domain/models/Dataset'
@@ -21,7 +22,9 @@ describe('Edit Dataset Terms', () => {
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetTermsUrl = `/spa${Route.EDIT_DATASET_TERMS}?${searchParams.toString()}`
+ const editDatasetTermsUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_TERMS
+ }?${searchParams.toString()}`
cy.visit(editDatasetTermsUrl)
@@ -73,7 +76,9 @@ describe('Edit Dataset Terms', () => {
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
searchParams.set('tab', 'restrictedFilesTerms')
- const editDatasetTermsUrl = `/spa${Route.EDIT_DATASET_TERMS}?${searchParams.toString()}`
+ const editDatasetTermsUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_TERMS
+ }?${searchParams.toString()}`
cy.visit(editDatasetTermsUrl)
@@ -129,7 +134,9 @@ describe('Edit Dataset Terms', () => {
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetTermsUrl = `/spa${Route.EDIT_DATASET_TERMS}?${searchParams.toString()}`
+ const editDatasetTermsUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_TERMS
+ }?${searchParams.toString()}`
cy.visit(editDatasetTermsUrl)
@@ -171,7 +178,9 @@ describe('Edit Dataset Terms', () => {
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
searchParams.set('tab', 'restrictedFilesTerms')
- const editDatasetTermsUrl = `/spa${Route.EDIT_DATASET_TERMS}?${searchParams.toString()}`
+ const editDatasetTermsUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_TERMS
+ }?${searchParams.toString()}`
cy.visit(editDatasetTermsUrl)
@@ -192,7 +201,9 @@ describe('Edit Dataset Terms', () => {
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetTermsUrl = `/spa${Route.EDIT_DATASET_TERMS}?${searchParams.toString()}`
+ const editDatasetTermsUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_TERMS
+ }?${searchParams.toString()}`
cy.visit(editDatasetTermsUrl)
cy.findByRole('link', { name: datasetTitle }).click()
@@ -220,7 +231,9 @@ describe('Edit Dataset Terms', () => {
const searchParams = new URLSearchParams()
searchParams.set(QueryParamKey.PERSISTENT_ID, dataset.persistentId)
searchParams.set(QueryParamKey.VERSION, DatasetNonNumericVersionSearchParam.DRAFT)
- const editDatasetTermsUrl = `/spa${Route.EDIT_DATASET_TERMS}?${searchParams.toString()}`
+ const editDatasetTermsUrl = `${FRONTEND_BASE_PATH}${
+ Route.EDIT_DATASET_TERMS
+ }?${searchParams.toString()}`
cy.visit(editDatasetTermsUrl)
diff --git a/tests/e2e-integration/e2e/sections/edit-file-metadata/EditFileMetadata.spec.tsx b/tests/e2e-integration/e2e/sections/edit-file-metadata/EditFileMetadata.spec.tsx
index 3e0048c6f..4f16f50c0 100644
--- a/tests/e2e-integration/e2e/sections/edit-file-metadata/EditFileMetadata.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/edit-file-metadata/EditFileMetadata.spec.tsx
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { TestsUtils } from '../../../shared/TestsUtils'
import { DatasetHelper } from '../../../shared/datasets/DatasetHelper'
import { FileHelper } from '../../../shared/files/FileHelper'
@@ -18,7 +19,7 @@ describe('EditFileMetadata', () => {
)
.its('id')
.then((id: string) => {
- cy.visit(`/spa/files?id=${id}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${id}`)
cy.findByRole('heading', { name: 'blob' }).should('exist')
@@ -58,7 +59,7 @@ describe('EditFileMetadata', () => {
return false
}
})
- cy.visit(`/spa/files/edit-metadata?id=wrong-id`)
+ cy.visit(`${FRONTEND_BASE_PATH}/files/edit-metadata?id=wrong-id`)
cy.findByText(/something went wrong/).should('exist')
})
})
diff --git a/tests/e2e-integration/e2e/sections/file/File.spec.tsx b/tests/e2e-integration/e2e/sections/file/File.spec.tsx
index 94df5d70e..bee0c1594 100644
--- a/tests/e2e-integration/e2e/sections/file/File.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/file/File.spec.tsx
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { TestsUtils } from '../../../shared/TestsUtils'
import { DatasetHelper } from '../../../shared/datasets/DatasetHelper'
import { DatasetLabelValue } from '../../../../../src/dataset/domain/models/Dataset'
@@ -14,21 +15,23 @@ describe('File', () => {
describe('Visit the File Page as a logged in user', () => {
it('successfully loads a file in draft mode', () => {
- cy.wrap(DatasetHelper.createWithFile(FileHelper.create())).then((datasetResponse) => {
- if (!datasetResponse.file) {
- throw new Error('Expected created dataset to include a file')
- }
-
- cy.visit(`/spa/files?id=${datasetResponse.file.id}`)
+ cy.wrap(
+ DatasetHelper.createWithFile(FileHelper.create()).then(
+ (datasetResponse) => datasetResponse.file
+ )
+ )
+ .its('id')
+ .then((id: string) => {
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${id}`)
- cy.findByRole('heading', { name: 'blob' }).should('exist')
- cy.findByText(DatasetLabelValue.DRAFT).should('exist')
- cy.findByText(DatasetLabelValue.UNPUBLISHED).should('exist')
- cy.findByRole('tab', { name: 'Versions' }).should('exist')
- cy.findByText('Metadata').should('exist')
+ cy.findByRole('heading', { name: 'blob' }).should('exist')
+ cy.findByText(DatasetLabelValue.DRAFT).should('exist')
+ cy.findByText(DatasetLabelValue.UNPUBLISHED).should('exist')
+ cy.findByRole('tab', { name: 'Versions' }).should('exist')
+ cy.findByText('Metadata').should('exist')
- cy.findByRole('button', { name: 'Access File' }).should('exist')
- })
+ cy.findByRole('button', { name: 'Access File' }).should('exist')
+ })
})
it('successfully loads a published file when the user is not authenticated', () => {
@@ -38,8 +41,10 @@ describe('File', () => {
throw new Error('Expected created dataset to include a file')
}
+ const fileId = datasetResponse.file.id
+
TestsUtils.logout()
- cy.visit(`/spa/files?id=${datasetResponse.file.id}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${fileId}`)
cy.findByRole('heading', { name: 'blob' }).should('exist')
@@ -56,69 +61,73 @@ describe('File', () => {
})
it('loads version summaries when clicking on the version tab', () => {
- cy.wrap(DatasetHelper.createWithFileAndPublish(FileHelper.create()), { timeout: 6000 }).then(
- (datasetResponse) => {
- if (!datasetResponse.file) {
- throw new Error('Expected created dataset to include a file')
- }
-
- cy.visit(`/spa/files?id=${datasetResponse.file.id}`)
+ cy.wrap(
+ DatasetHelper.createWithFileAndPublish(FileHelper.create()).then(
+ (datasetResponse) => datasetResponse.file
+ ),
+ { timeout: 6000 }
+ )
+ .its('id')
+ .then((id: string) => {
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${id}`)
cy.wait(3000)
cy.findByRole('tab', { name: 'Versions' }).should('exist').click({ force: true })
cy.findByText('1.0').should('exist')
- }
- )
+ })
})
it('loads page not found when the user is not authenticated and tries to access a draft', () => {
- cy.wrap(DatasetHelper.createWithFile(FileHelper.create())).then((datasetResponse) => {
- if (!datasetResponse.file) {
- throw new Error('Expected created dataset to include a file')
- }
-
- TestsUtils.logout()
- cy.visit(`/spa/files?id=${datasetResponse.file.id}`)
-
- cy.findByTestId('not-found-page').should('exist')
- })
+ cy.wrap(
+ DatasetHelper.createWithFile(FileHelper.create()).then(
+ (datasetResponse) => datasetResponse.file
+ )
+ )
+ .its('id')
+ .then((id: string) => {
+ TestsUtils.logout()
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${id}`)
+ cy.findByTestId('not-found-page').should('exist')
+ })
})
it('successfully loads a file when passing the id and datasetVersion', () => {
- cy.wrap(DatasetHelper.createWithFileAndPublish(FileHelper.create()), { timeout: 6000 }).then(
- (datasetResponse) => {
- if (!datasetResponse.file) {
- throw new Error('Expected created dataset to include a file')
- }
-
- cy.visit(`/spa/files?id=${datasetResponse.file.id}&datasetVersion=1.0`)
+ cy.wrap(
+ DatasetHelper.createWithFileAndPublish(FileHelper.create()).then(
+ (datasetResponse) => datasetResponse.file
+ ),
+ { timeout: 6000 }
+ )
+ .its('id')
+ .then((id: string) => {
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${id}&datasetVersion=1.0`)
cy.findByRole('heading', { name: 'blob' }).should('exist')
cy.findByText('Version 1.0').should('exist')
- }
- )
+ })
})
it('loads page not found when passing a wrong id', () => {
- cy.visit(`/spa/files?id=wrong-id`)
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=wrong-id`)
cy.findByTestId('not-found-page').should('exist')
})
it('loads correctly the breadcrumbs', () => {
- cy.wrap(DatasetHelper.createWithFile(FileHelper.create())).then((datasetResponse) => {
- if (!datasetResponse.file) {
- throw new Error('Expected created dataset to include a file')
- }
-
- cy.visit(`/spa/files?id=${datasetResponse.file.id}`)
-
- cy.findByText('Root').should('exist')
- cy.findByRole('link', { name: "Darwin's Finches" }).should('exist').click({ force: true })
-
- cy.findByRole('heading', { name: "Darwin's Finches" }).should('exist')
- })
+ cy.wrap(
+ DatasetHelper.createWithFile(FileHelper.create()).then(
+ (datasetResponse) => datasetResponse.file
+ )
+ )
+ .its('id')
+ .then((id: string) => {
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${id}`)
+ cy.findByText('Root').should('exist')
+ cy.findByRole('link', { name: "Darwin's Finches" }).should('exist').click({ force: true })
+
+ cy.findByRole('heading', { name: "Darwin's Finches" }).should('exist')
+ })
})
it('downloads a file from the file page directly for dataset editors even when a guestbook is assigned', () => {
@@ -140,7 +149,7 @@ describe('File', () => {
})
)
.then((file) => {
- cy.visit(`/spa/files?id=${file.id}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${file.id}`)
cy.wait(1500)
cy.window().then((window) => {
@@ -180,7 +189,7 @@ describe('File', () => {
)
.then((file) => {
TestsUtils.logout()
- cy.visit(`/spa/files?id=${file.id}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${file.id}`)
cy.wait(1500)
cy.findByRole('button', { name: 'Access File' }).as('accessButton')
diff --git a/tests/e2e-integration/e2e/sections/homepage/Homepage.spec.tsx b/tests/e2e-integration/e2e/sections/homepage/Homepage.spec.tsx
index 7f9c5db44..d93341769 100644
--- a/tests/e2e-integration/e2e/sections/homepage/Homepage.spec.tsx
+++ b/tests/e2e-integration/e2e/sections/homepage/Homepage.spec.tsx
@@ -1,10 +1,11 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { CollectionItemsQueryParams } from '@/collection/domain/models/CollectionItemsQueryParams'
import { CollectionItemType } from '../../../../../src/collection/domain/models/CollectionItemType'
describe('Homepage', () => {
it('should navigate to the collections page with the search value encoded in the URL', () => {
const searchValue = 'John Doe'
- cy.visit('/spa/')
+ cy.visit(`${FRONTEND_BASE_PATH}/`)
cy.get('[aria-label="Search"]').type(searchValue)
cy.get('[aria-label="Submit Search"]').click()
@@ -19,9 +20,9 @@ describe('Homepage', () => {
})
it('navigates directly to the collection page when clicking the Browse All Collections button', () => {
- cy.visit('/spa/')
+ cy.visit(`${FRONTEND_BASE_PATH}/`)
cy.findByRole('link', { name: 'Browse All Collections' }).click()
- cy.url().should('eq', `${Cypress.config().baseUrl as string}/spa/collections`)
+ cy.url().should('eq', `${Cypress.config().baseUrl as string}${FRONTEND_BASE_PATH}/collections`)
})
})
diff --git a/tests/e2e-integration/shared/basePath.ts b/tests/e2e-integration/shared/basePath.ts
new file mode 100644
index 000000000..30e433fee
--- /dev/null
+++ b/tests/e2e-integration/shared/basePath.ts
@@ -0,0 +1 @@
+export const FRONTEND_BASE_PATH = Cypress.env('frontendBasePath') as string
diff --git a/tests/e2e-integration/shared/files/FileHelper.ts b/tests/e2e-integration/shared/files/FileHelper.ts
index 77c3b8c4f..abea1f844 100644
--- a/tests/e2e-integration/shared/files/FileHelper.ts
+++ b/tests/e2e-integration/shared/files/FileHelper.ts
@@ -1,3 +1,4 @@
+import { FRONTEND_BASE_PATH } from '@tests/e2e-integration/shared/basePath'
import { DataverseApiHelper } from '../DataverseApiHelper'
import { FileLabel, FileLabelType } from '../../../../src/files/domain/models/FileMetadata'
import { faker } from '@faker-js/faker'
@@ -98,7 +99,7 @@ export class FileHelper extends DataverseApiHelper {
static download(id: number): Promise {
return new Cypress.Promise((resolve) => {
- cy.visit(`/spa/files?id=${id}`)
+ cy.visit(`${FRONTEND_BASE_PATH}/files?id=${id}`)
cy.get(`#action-button-access-file-${id}`).click()
cy.findByTestId(`download-original-file`).click()
cy.then(() => resolve())
diff --git a/tests/support/commands.tsx b/tests/support/commands.tsx
index 1c298c054..9b989c77d 100644
--- a/tests/support/commands.tsx
+++ b/tests/support/commands.tsx
@@ -1,4 +1,5 @@
import { UserMother } from '../component/users/domain/models/UserMother'
+import { FRONTEND_BASE_PATH } from '../e2e-integration/shared/basePath'
export {}
///
@@ -122,7 +123,7 @@ Cypress.Commands.add(
)
Cypress.Commands.add('login', () => {
- cy.visit('/spa/')
+ cy.visit(`${FRONTEND_BASE_PATH}/`)
cy.wait(1_000)
cy.findByTestId('oidc-login').click()
@@ -131,7 +132,7 @@ Cypress.Commands.add('login', () => {
cy.wait(1_500)
cy.url()
- .should('eq', `${Cypress.config().baseUrl as string}/spa`)
+ .should('eq', `${Cypress.config().baseUrl as string}${FRONTEND_BASE_PATH}`)
.then(() => {
const appConfig = requireAppConfig()
const token = Utils.getLocalStorageItem(
@@ -147,7 +148,7 @@ Cypress.Commands.add('login', () => {
})
Cypress.Commands.add('logout', () => {
- cy.visit('/spa/')
+ cy.visit(`${FRONTEND_BASE_PATH}/`)
cy.get('#dropdown-user').click()
cy.findByTestId('oidc-logout').click()
})
diff --git a/vite.config.ts b/vite.config.ts
index 1e8196843..55ed74726 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -5,6 +5,7 @@ import { keycloakify } from "keycloakify/vite-plugin";
import * as path from 'path'
export default defineConfig({
+ base: '/modern',
plugins: [
react(),
istanbul({