Adds Monitoring Setup docs and deploy-scp troubleshooting/debug fixes #2

Merged
Sluijsens merged 11 commits from feature/gitea-deployment-workflow into master 2026-07-30 23:57:52 +02:00
10 changed files with 32 additions and 32 deletions
Showing only changes of commit 22bc5c5cde - Show all commits
@@ -16,7 +16,7 @@ beforeEach(() => {
async function openDialog() {
mockAuthenticated();
renderApp('/cms');
await screen.findByTestId('cms-add-button', {}, { timeout: 5000 });
await screen.findByTestId('cms-add-button', {}, { timeout: 10000 });
await userEvent.click(screen.getByTestId('cms-add-button'));
expect(screen.getByTestId('add-cms-name')).toBeInTheDocument();
}
@@ -13,7 +13,7 @@ beforeEach(() => {
async function openSetStatusDialog() {
mockAuthenticated();
renderApp('/cms');
const triggers = await screen.findAllByTestId('cms-instance-actions-trigger', {}, { timeout: 5000 });
const triggers = await screen.findAllByTestId('cms-instance-actions-trigger', {}, { timeout: 10000 });
await userEvent.click(triggers[0]);
await userEvent.click(await screen.findByTestId('cms-instance-set-status'));
expect(screen.getByTestId('set-status-select')).toBeInTheDocument();
@@ -14,7 +14,7 @@ beforeEach(() => {
async function openDialog() {
mockAuthenticated();
renderApp('/users');
await screen.findByTestId('users-invite-button', {}, { timeout: 5000 });
await screen.findByTestId('users-invite-button', {}, { timeout: 10000 });
await userEvent.click(screen.getByTestId('users-invite-button'));
expect(screen.getByTestId('invite-dialog-email')).toBeInTheDocument();
}
+3 -3
View File
@@ -12,21 +12,21 @@ describe('AccessDeniedPage', () => {
it('renders the 403 title and message', async () => {
renderApp('/403');
expect(await screen.findByTestId('access-denied-title', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('access-denied-title', {}, { timeout: 10000 })).toBeInTheDocument();
expect(screen.getByTestId('access-denied-message')).toBeInTheDocument();
});
it('renders the back to dashboard button', async () => {
renderApp('/403');
expect(await screen.findByTestId('access-denied-back-button', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('access-denied-back-button', {}, { timeout: 10000 })).toBeInTheDocument();
});
it('navigates to login when back button is clicked as guest', async () => {
mockGuest();
renderApp('/403');
const button = await screen.findByTestId('access-denied-back-button', {}, { timeout: 5000 });
const button = await screen.findByTestId('access-denied-back-button', {}, { timeout: 10000 });
await userEvent.click(button);
expect(await screen.findByTestId('login-form-submit-button')).toBeInTheDocument();
+6 -6
View File
@@ -20,7 +20,7 @@ describe('CmsPage', () => {
mockAuthenticated();
renderApp('/cms');
expect(await screen.findByTestId('cms-title', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('cms-title', {}, { timeout: 10000 })).toBeInTheDocument();
expect(screen.getByTestId('cms-add-button')).toBeInTheDocument();
});
@@ -28,7 +28,7 @@ describe('CmsPage', () => {
mockAuthenticated();
renderApp('/cms');
const rows = await screen.findAllByTestId('cms-instance-row', {}, { timeout: 5000 });
const rows = await screen.findAllByTestId('cms-instance-row', {}, { timeout: 10000 });
expect(rows.length).toBe(2);
});
@@ -37,7 +37,7 @@ describe('CmsPage', () => {
server.use(http.get(CMS_URL, () => HttpResponse.json([])));
renderApp('/cms');
expect(await screen.findByTestId('cms-empty-state', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('cms-empty-state', {}, { timeout: 10000 })).toBeInTheDocument();
expect(screen.getByTestId('cms-empty-add-button')).toBeInTheDocument();
});
@@ -45,7 +45,7 @@ describe('CmsPage', () => {
mockAuthenticated();
renderApp('/cms');
await screen.findByTestId('cms-add-button', {}, { timeout: 5000 });
await screen.findByTestId('cms-add-button', {}, { timeout: 10000 });
await userEvent.click(screen.getByTestId('cms-add-button'));
expect(await screen.findByTestId('add-cms-name')).toBeInTheDocument();
@@ -55,7 +55,7 @@ describe('CmsPage', () => {
mockAuthenticated();
renderApp('/cms');
await screen.findByTestId('cms-add-button', {}, { timeout: 5000 });
await screen.findByTestId('cms-add-button', {}, { timeout: 10000 });
await userEvent.click(screen.getByTestId('cms-add-button'));
await userEvent.type(screen.getByTestId('add-cms-name'), 'New CMS');
@@ -63,7 +63,7 @@ describe('CmsPage', () => {
await userEvent.type(screen.getByTestId('add-cms-apikey-input'), 'secret-key');
await userEvent.click(screen.getByTestId('add-cms-submit'));
const rows = await screen.findAllByTestId('cms-instance-row', {}, { timeout: 5000 });
const rows = await screen.findAllByTestId('cms-instance-row', {}, { timeout: 10000 });
expect(rows.length).toBe(3);
});
+3 -3
View File
@@ -12,21 +12,21 @@ describe('NotFoundPage', () => {
it('renders for an unknown route', async () => {
renderApp('/this-route-does-not-exist');
expect(await screen.findByTestId('not-found-title', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('not-found-title', {}, { timeout: 10000 })).toBeInTheDocument();
expect(screen.getByTestId('not-found-message')).toBeInTheDocument();
});
it('renders the back to dashboard button', async () => {
renderApp('/some/nonexistent/path');
expect(await screen.findByTestId('not-found-back-button', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('not-found-back-button', {}, { timeout: 10000 })).toBeInTheDocument();
});
it('navigates to login when back button is clicked as guest', async () => {
mockGuest();
renderApp('/this-does-not-exist');
const button = await screen.findByTestId('not-found-back-button', {}, { timeout: 5000 });
const button = await screen.findByTestId('not-found-back-button', {}, { timeout: 10000 });
await userEvent.click(button);
expect(await screen.findByTestId('login-form-submit-button')).toBeInTheDocument();
+2 -2
View File
@@ -16,7 +16,7 @@ describe('ProfilePage', () => {
mockAuthenticated();
renderApp('/profile');
expect(await screen.findByTestId('profile-title', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('profile-title', {}, { timeout: 10000 })).toBeInTheDocument();
expect(screen.getByTestId('profile-name-input')).toBeInTheDocument();
expect(screen.getByTestId('profile-email-input')).toBeInTheDocument();
expect(screen.getByTestId('profile-role-badge')).toBeInTheDocument();
@@ -61,7 +61,7 @@ describe('ProfilePage', () => {
await userEvent.type(nameInput, 'New Name');
await userEvent.click(screen.getByTestId('profile-save-button'));
expect(await screen.findByText(/profile updated/i, {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByText(/profile updated/i, {}, { timeout: 10000 })).toBeInTheDocument();
});
it('shows validation error for invalid email', async () => {
+13 -13
View File
@@ -16,21 +16,21 @@ describe('SettingsPage', () => {
mockAuthenticated();
renderApp('/settings');
expect(await screen.findByTestId('settings-title', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('settings-title', {}, { timeout: 10000 })).toBeInTheDocument();
});
it('shows the current availability status badge', async () => {
mockAuthenticated();
renderApp('/settings');
expect(await screen.findByTestId('availability-badge', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('availability-badge', {}, { timeout: 10000 })).toBeInTheDocument();
});
it('renders all three availability mode buttons', async () => {
mockAuthenticated();
renderApp('/settings');
await screen.findByTestId('availability-mode-selector', {}, { timeout: 5000 });
await screen.findByTestId('availability-mode-selector', {}, { timeout: 10000 });
expect(screen.getByTestId('mode-option-Available')).toBeInTheDocument();
expect(screen.getByTestId('mode-option-Maintenance')).toBeInTheDocument();
expect(screen.getByTestId('mode-option-NotAvailable')).toBeInTheDocument();
@@ -40,7 +40,7 @@ describe('SettingsPage', () => {
mockAuthenticated();
renderApp('/settings');
await screen.findByTestId('availability-mode-selector', {}, { timeout: 5000 });
await screen.findByTestId('availability-mode-selector', {}, { timeout: 10000 });
const maintenanceBtn = screen.getByTestId('mode-option-Maintenance');
await userEvent.click(maintenanceBtn);
@@ -51,10 +51,10 @@ describe('SettingsPage', () => {
mockAuthenticated();
renderApp('/settings');
await screen.findByTestId('availability-save-button', {}, { timeout: 5000 });
await screen.findByTestId('availability-save-button', {}, { timeout: 10000 });
await userEvent.click(screen.getByTestId('availability-save-button'));
expect(await screen.findByText(/availability updated/i, {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByText(/availability updated/i, {}, { timeout: 10000 })).toBeInTheDocument();
});
it('shows error toast when save fails', async () => {
@@ -66,10 +66,10 @@ describe('SettingsPage', () => {
mockAuthenticated();
renderApp('/settings');
await screen.findByTestId('availability-save-button', {}, { timeout: 5000 });
await screen.findByTestId('availability-save-button', {}, { timeout: 10000 });
await userEvent.click(screen.getByTestId('availability-save-button'));
expect(await screen.findByText(/something went wrong/i, {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByText(/something went wrong/i, {}, { timeout: 10000 })).toBeInTheDocument();
});
it('disables the availability controls and shows a banner when master-controlled', async () => {
@@ -86,7 +86,7 @@ describe('SettingsPage', () => {
mockAuthenticated();
renderApp('/settings');
expect(await screen.findByTestId('availability-master-controlled-banner', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('availability-master-controlled-banner', {}, { timeout: 10000 })).toBeInTheDocument();
expect(screen.getByTestId('mode-option-Available')).toBeDisabled();
expect(screen.getByTestId('mode-option-Maintenance')).toBeDisabled();
expect(screen.getByTestId('mode-option-NotAvailable')).toBeDisabled();
@@ -98,7 +98,7 @@ describe('SettingsPage', () => {
mockAuthenticated();
renderApp('/settings');
await screen.findByTestId('availability-save-button', {}, { timeout: 5000 });
await screen.findByTestId('availability-save-button', {}, { timeout: 10000 });
expect(screen.queryByTestId('availability-master-controlled-banner')).not.toBeInTheDocument();
expect(screen.getByTestId('availability-save-button')).not.toBeDisabled();
});
@@ -112,17 +112,17 @@ describe('SettingsPage', () => {
mockAuthenticated();
renderApp('/settings');
await screen.findByTestId('availability-save-button', {}, { timeout: 5000 });
await screen.findByTestId('availability-save-button', {}, { timeout: 10000 });
await userEvent.click(screen.getByTestId('availability-save-button'));
expect(await screen.findByText(/master cms controls this status/i, {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByText(/master cms controls this status/i, {}, { timeout: 10000 })).toBeInTheDocument();
});
it('renders all placeholder sections', async () => {
mockAuthenticated();
renderApp('/settings');
await screen.findByTestId('settings-title', {}, { timeout: 5000 });
await screen.findByTestId('settings-title', {}, { timeout: 10000 });
expect(screen.getByTestId('placeholder-settings.modules.title')).toBeInTheDocument();
expect(screen.getByTestId('placeholder-settings.systemConfig.title')).toBeInTheDocument();
expect(screen.getByTestId('placeholder-settings.branding.title')).toBeInTheDocument();
+1 -1
View File
@@ -19,7 +19,7 @@ describe('UsersPage', () => {
mockAuthenticated();
renderApp('/users');
expect(await screen.findByTestId('users-page', {}, { timeout: 5000 })).toBeInTheDocument();
expect(await screen.findByTestId('users-page', {}, { timeout: 10000 })).toBeInTheDocument();
expect(screen.getByTestId('users-invite-button')).toBeInTheDocument();
});
+1 -1
View File
@@ -42,7 +42,7 @@ export default defineConfig(({ command }) => ({
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
testTimeout: 15000,
testTimeout: 20000,
css: true,
coverage: {
provider: 'v8',