fix: update regex patterns for example.com in various test files

This commit is contained in:
GitHub Actions
2026-02-18 13:00:41 +00:00
parent a9f8e0a79a
commit d8f0a9be86
6 changed files with 135 additions and 21 deletions

View File

@@ -295,7 +295,7 @@ describe('SecurityHeaderProfileForm', () => {
{ wrapper: createWrapper() }
);
const reportUriInput = screen.getByPlaceholderText(/example.com\/csp-report/);
const reportUriInput = screen.getByPlaceholderText(/^https:\/\/example\.com\/csp-report$/);
fireEvent.change(reportUriInput, { target: { value: 'https://test.com/report' } });
expect(reportUriInput).toHaveValue('https://test.com/report');
@@ -307,7 +307,7 @@ describe('SecurityHeaderProfileForm', () => {
if(reportOnlySwitch) {
fireEvent.click(reportOnlySwitch); // Disable
expect(screen.queryByPlaceholderText(/example.com\/csp-report/)).not.toBeInTheDocument();
expect(screen.queryByPlaceholderText(/^https:\/\/example\.com\/csp-report$/)).not.toBeInTheDocument();
}
});