Fix version display issues, container shutdown problems, and modernize build scripts

This commit is contained in:
2026-01-23 14:39:33 +01:00
parent 81b3b84f81
commit 0d3832137f
15 changed files with 359 additions and 522 deletions

View File

@@ -55,16 +55,19 @@ describe('App Component', () => {
test('renders version number', () => {
render(<App />);
const versionText = screen.getByText(/v\d+\.\d+\.\d+(-dev|-test)?/);
// Version can be either v1.2.3 format (release), v1.2.3-dev/test format (legacy dev), or "unknown" format (new dev)
const versionText = screen.getByText(/(v\d+\.\d+\.\d+(-dev|-test)?|unknown)/);
expect(versionText).toBeInTheDocument();
// Check if it's a dev/test build
const isDevBuild = versionText.textContent.includes('-dev') || versionText.textContent.includes('-test');
// Check if it's a dev/test/unknown build
const isDevBuild = versionText.textContent.includes('-dev') ||
versionText.textContent.includes('-test') ||
versionText.textContent.includes('unknown');
// Additional validations can be added here based on build type
if (isDevBuild) {
// Dev/test specific validations could go here
expect(versionText.textContent).toMatch(/v\d+\.\d+\.\d+-(dev|test)/);
// Dev/test/unknown specific validations
expect(versionText.textContent).toMatch(/(v\d+\.\d+\.\d+-(dev|test)|unknown)/);
} else {
// Release build validations - just check that version pattern exists in the text
expect(versionText.textContent).toMatch(/v\d+\.\d+\.\d+/);

View File

@@ -8,7 +8,7 @@ function Footer() {
<div className="row">
<div className="col-md-6">
<p className="mb-0 text-muted small">
<strong>JMESPath Testing Tool</strong> v{VERSION} - Created for testing and validating JMESPath expressions
<strong>JMESPath Testing Tool</strong> {VERSION === 'unknown' ? VERSION : `v${VERSION}`} - Created for testing and validating JMESPath expressions
</p>
</div>
<div className="col-md-6 text-md-end">