mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Also exclude . and update tests
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
let element: HTMLInputElement;
|
||||
let icon = 'info';
|
||||
const pattern = String.raw`^[a-zA-Z0-9][a-zA-Z0-9.\-]*$`;
|
||||
const pattern = String.raw`^[a-zA-Z0-9][a-zA-Z0-9\-]*$`;
|
||||
|
||||
onMount(() => {
|
||||
if (element && autofocus) {
|
||||
|
||||
@@ -3,9 +3,9 @@ import { render } from '@testing-library/svelte';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { InputId } from '../../../src/lib/elements/forms';
|
||||
|
||||
const validStrings = ['valid_string', 'valid-string', 'valid.string', 'validstring123', 'valid_'];
|
||||
const validStrings = ['valid-string', 'validstring', 'validstring123', 'valid-'];
|
||||
|
||||
const invalidStrings = ['-invalid', '.invalid', '_invalid'];
|
||||
const invalidStrings = ['-invalid', '.invalid', 'in_valid', 'in.va.lid'];
|
||||
|
||||
test('shows id input', () => {
|
||||
const { getByPlaceholderText } = render(InputId);
|
||||
|
||||
Reference in New Issue
Block a user