File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ # tests/login_spec.yaml
2+ name : " Login Functionality Test"
3+ description : " Validate successful authentication flow"
4+ baseUrl : " {{config.baseUrl}}" # Uses your configured http://localhost:3000
5+
6+ scenarios :
7+ - name : " Login with valid credentials"
8+ steps :
9+ - action : " navigate"
10+ url : " /login"
11+ validate :
12+ - title : " Login Page"
13+
14+ - action : " fill"
15+ target : " #username" # Update selector to match your UI
16+ value : " {{credentials.akabarki76.username}}"
17+
18+ - action : " fill"
19+ target : " #password" # Update selector to match your UI
20+ value : " {{credentials.akabarki76.password}}"
21+
22+ - action : " click"
23+ target : " #submit-btn" # Update selector to match your UI
24+
25+ - action : " validate"
26+ assertions :
27+ - url : " /dashboard"
28+ - elementPresent : " .welcome-message"
29+ - textContains : " .user-greeting" " Welcome, {{credentials.akabarki76.username}}"
30+
31+ - name : " Login with invalid credentials"
32+ steps :
33+ - action : " navigate"
34+ url : " /login"
35+
36+ - action : " fill"
37+ target : " #username"
38+ value : " invalid@email.com"
39+
40+ - action : " fill"
41+ target : " #password"
42+ value : " wrong_password"
43+
44+ - action : " click"
45+ target : " #submit-btn"
46+
47+ - action : " validate"
48+ assertions :
49+ - elementPresent : " .error-message"
50+ - textContains : " .error-message" " Invalid credentials"
You can’t perform that action at this time.
0 commit comments