diff --git a/.gitignore b/.gitignore index 818066e..26dca31 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,7 @@ dist/ downloads/ eggs/ .eggs/ -lib/ -lib64/ + parts/ sdist/ var/ diff --git a/PixPin_2025-09-15_15-18-02.png b/PixPin_2025-09-15_15-18-02.png new file mode 100644 index 0000000..d16308d Binary files /dev/null and b/PixPin_2025-09-15_15-18-02.png differ diff --git a/config/dev_env.yaml b/config/dev_env.yaml index e69de29..4bcdef6 100644 --- a/config/dev_env.yaml +++ b/config/dev_env.yaml @@ -0,0 +1 @@ +base_url: http://localhost:5173 diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..a28e184 --- /dev/null +++ b/conftest.py @@ -0,0 +1,20 @@ +import pytest +import yaml + +@pytest.fixture(scope="session") +def env_config(): + # A fixture to read the config file once per session. + # In a real-world scenario, you might add logic here to select + # different config files (e.g., dev, prod) based on a command-line argument. + with open('config/dev_env.yaml', 'r') as file: + return yaml.safe_load(file) + +@pytest.fixture(scope="session") +def base_url(env_config): + """ + Provides the base URL for the application under test. + """ + url = env_config.get('base_url') + if not url: + raise Exception("'base_url' not found in config file.") + return url diff --git a/data/login_data.csv b/data/login_data.csv index e69de29..da73a67 100644 --- a/data/login_data.csv +++ b/data/login_data.csv @@ -0,0 +1,4 @@ +test_case,email,password,name,description +valid_credentials,poop@shenjianl.cn,shenjianZ,Test User,Valid credentials for successful login +invalid_password,test.user@example.com,WrongPassword,N/A,Correct email but incorrect password +invalid_email,nouser@example.com,Password123,N/A,Non-existent email \ No newline at end of file diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1214003..bc6ea06 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -8,13 +8,16 @@ import { import { FormElementsPage } from "./components/pages/form-elements"; import { DynamicContentPage } from "./components/pages/dynamic-content"; import { cn } from "./lib/utils"; +import { LoginPage } from "./components/pages/login-page"; +import { HomePage } from "./components/pages/home-page"; +import { ProtectedRoute } from "./components/protected-route"; function App() { return ( -
+
{/* Sidebar */} -