Skip to content

Commit 6c393e4

Browse files
authored
Merge pull request akabarki76#15 from AKA-NETWORK/akabarki76-patch-2
Create login_spec.yaml
2 parents 98452b6 + fe4087f commit 6c393e4

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

login_spec.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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"

0 commit comments

Comments
 (0)