Change subtitle heading to new slogan

- Unify reading subtitle/slogan throughout the application.
- Refactor related unit tests for easier future changes.
- Add typed constants for Vue app environment variables.
This commit is contained in:
undergroundwires
2023-08-01 17:50:36 +02:00
parent 5901dc5f11
commit 1e80ee1fb0
13 changed files with 276 additions and 170 deletions

View File

@@ -1,7 +1,10 @@
export function getProcessEnvironmentStub(): NodeJS.ProcessEnv {
import { VueAppEnvironment } from '@/application/Parser/ProjectInformationParser';
export function getProcessEnvironmentStub(): VueAppEnvironment {
return {
VUE_APP_VERSION: '0.11.3',
VUE_APP_NAME: 'stub-name',
VUE_APP_SLOGAN: 'stub-slogan',
VUE_APP_REPOSITORY_URL: 'stub-repository-url',
VUE_APP_HOMEPAGE_URL: 'stub-homepage-url',
};

View File

@@ -3,21 +3,23 @@ import { Version } from '@/domain/Version';
import { VersionStub } from './VersionStub';
export class ProjectInformationStub implements IProjectInformation {
public name = 'name';
public name = 'stub-name';
public version = new VersionStub();
public repositoryUrl = 'repositoryUrl';
public repositoryUrl = 'stub-repositoryUrl';
public homepage = 'homepage';
public homepage = 'stub-homepage';
public feedbackUrl = 'feedbackUrl';
public feedbackUrl = 'stub-feedbackUrl';
public releaseUrl = 'releaseUrl';
public releaseUrl = 'stub-releaseUrl';
public repositoryWebUrl = 'repositoryWebUrl';
public repositoryWebUrl = 'stub-repositoryWebUrl';
public downloadUrl = 'downloadUrl';
public downloadUrl = 'stub-downloadUrl';
public slogan = 'stub-slogan';
public withName(name: string): ProjectInformationStub {
this.name = name;