Opens the contact form through a build switch instead of the TEST ONLY commit; closes the AI-DLC records
Continuous Integration / check (pull_request) Successful in 2m25s
Continuous Integration / build-test (pull_request) Skipped
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / lighthouse (pull_request) Successful in 9m2s
Continuous Integration / deploy-production (pull_request) Skipped
Continuous Integration / check (pull_request) Successful in 2m25s
Continuous Integration / build-test (pull_request) Skipped
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / lighthouse (pull_request) Successful in 9m2s
Continuous Integration / deploy-production (pull_request) Skipped
The form is closed unless the build sets VITE_CONTACT_FORM_ENABLED=true (only
the test build does), so d449e76 no longer has to be undone before the merge.
Status files of contact-form-cms, asf-packages-cms, asf-cms-host-injection and
asf-translation-files are closed; Build and Test summary added.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import { configuredContactFormEnabled } from './contactFormEnv';
|
||||
|
||||
describe('configuredContactFormEnabled', () => {
|
||||
afterEach(() => {
|
||||
vi.unstubAllEnvs();
|
||||
});
|
||||
|
||||
it('is closed when nothing is set', () => {
|
||||
vi.stubEnv('VITE_CONTACT_FORM_ENABLED', undefined as unknown as string);
|
||||
expect(configuredContactFormEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
it('is open when the build sets it to true', () => {
|
||||
vi.stubEnv('VITE_CONTACT_FORM_ENABLED', 'true');
|
||||
expect(configuredContactFormEnabled()).toBe(true);
|
||||
});
|
||||
|
||||
it('is closed for any other value', () => {
|
||||
vi.stubEnv('VITE_CONTACT_FORM_ENABLED', 'false');
|
||||
expect(configuredContactFormEnabled()).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user