e2e tests added. Core & Authentication

This commit is contained in:
AG
2025-12-08 10:18:42 +02:00
parent d284563301
commit 615c3a0cb7
16 changed files with 740 additions and 133 deletions

View File

@@ -1,4 +1,4 @@
import React from 'react';
import React, { useId } from 'react';
import { X } from 'lucide-react';
interface FilledInputProps {
@@ -19,6 +19,8 @@ interface FilledInputProps {
}
const FilledInput: React.FC<FilledInputProps> = ({ label, value, onChange, onClear, onFocus, onBlur, type = "number", icon, autoFocus, step, inputMode, autocapitalize, autoComplete, rightElement }) => {
const id = useId();
const handleClear = () => {
const syntheticEvent = {
target: { value: '' }
@@ -29,10 +31,11 @@ const FilledInput: React.FC<FilledInputProps> = ({ label, value, onChange, onCle
return (
<div className="relative group bg-surface-container-high rounded-t-lg border-b border-outline-variant hover:bg-white/5 focus-within:border-primary transition-colors">
<label className="absolute top-2 left-4 text-[10px] font-medium text-on-surface-variant flex items-center gap-1">
<label htmlFor={id} className="absolute top-2 left-4 text-[10px] font-medium text-on-surface-variant flex items-center gap-1">
{icon} {label}
</label>
<input
id={id}
type={type}
step={step}
inputMode={inputMode || (type === 'number' ? 'decimal' : 'text')}

View File

@@ -58,6 +58,8 @@ const Login: React.FC<LoginProps> = ({ onLogin, language, onLanguageChange }) =>
<h2 className="text-2xl text-on-surface mb-2">{t('change_pass_title', language)}</h2>
<p className="text-sm text-on-surface-variant mb-6">{t('change_pass_desc', language)}</p>
{error && <div className="text-error text-sm text-center bg-error-container/10 p-2 rounded-lg mb-4">{error}</div>}
<div className="space-y-4">
<FilledInput
label={t('change_pass_new', language)}