Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions functional_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,19 @@

---

**Execution Date:** 11/27/2025, 2:03:35 PM

**Test Unique Identifier:** "login-functional-test"

**Input(s):**
1. login.docx
Path: /var/tmp/Roost/RoostGPT/login-functional-test/8b84b586-7ca6-4826-9d33-419837ee421f/login.docx

**Test Output Folder:**
1. [login-functional-test.json](login-functional-test/login-functional-test.json)
2. [login-functional-test.feature](login-functional-test/login-functional-test.feature)
3. [login-functional-test.csv](login-functional-test/login-functional-test.csv)
4. [login-functional-test.xlsx](login-functional-test/login-functional-test.xlsx)

---

19 changes: 19 additions & 0 deletions functional_tests/login-functional-test/.roost/roost_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"project": {
"name": "login-functional-test",
"created_at": "2025-11-27T14:03:35.927Z",
"updated_at": "2025-11-27T14:03:35.927Z"
},
"files": {
"input_files": [
{
"fileName": "login.docx",
"fileURI": "/var/tmp/Roost/RoostGPT/login-functional-test/8b84b586-7ca6-4826-9d33-419837ee421f/functional_tests/login-functional-test/login.docx",
"fileSha": "4c85af107e"
}
]
},
"api_files": {
"input_files": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"Scenario Outline: Validate API response when creating a new user with a unique or duplicate Login ID"
"Scenario Outline: Validate user creation feedback on the UI for unique and duplicate Login IDs"
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Feature: User Login ID Uniqueness
As a system administrator
I want to ensure that all user login IDs are unique, regardless of user type (Standard or SSO)
So that data integrity is maintained and user accounts can be uniquely identified.

Background:
Given the API base URL is "https://api.example.com"
And a user already exists in the system with login ID "existing.user"

# API tests to validate the backend logic for user creation and login ID conflict detection.
# This is the primary validation for the new SSO user check capability.
@api
Scenario Outline: Validate API response when creating a new user with a unique or duplicate Login ID
When I send a POST request to "/api/v1/users" with the following payload:
'''
{
"loginID": "<loginID>",
"firstName": "Test",
"lastName": "User",
"email": "<email>",
"userType": "<userType>"
}
'''
Then the response status code should be <statusCode>
And the response body should contain the message "<expectedMessage>"

Examples:
| description | userType | loginID | email | statusCode | expectedMessage |
| Create standard user with new ID | standard | new.standard | new.standard@test.com | 201 | "User created successfully" |
| Block standard user with dup ID | standard | existing.user | new.standard@test.com | 409 | "Login ID already exists" |
| Create SSO user with new ID | sso | new.sso | new.sso@test.com | 201 | "User created successfully" |
| Block SSO user with dup ID | sso | existing.user | new.sso@test.com | 409 | "Login ID already exists" |
| Block user with empty login ID | standard | | empty.id@test.com | 400 | "Login ID cannot be empty" |
| Block user with empty user type | | another.new | another@test.com | 400 | "User Type is required" |

# UI tests to ensure the user interface correctly displays feedback when creating users.
# This validates that the backend error is properly communicated to the end-user.
@ui
Scenario Outline: Validate user creation feedback on the UI for unique and duplicate Login IDs
Given I am an administrator on the "Add New User" page
When I select "<userType>" as the user type
And I enter "<loginID>" into the "Login ID" field
And I fill in all other required user details
And I click the "Create User" button
Then I should see a notification message saying "<expectedMessage>"

Examples:
| description | userType | loginID | expectedMessage |
| Create standard user with new ID | Standard | new.standard | "User created successfully!" |
| Block standard user with dup ID | Standard | existing.user | "Error: Login ID 'existing.user' is already in use." |
| Create SSO user with new ID | SSO | new.sso | "User created successfully!" |
| Block SSO user with dup ID | SSO | existing.user | "Error: Login ID 'existing.user' is already in use." |
| Validate empty login ID field | Standard | | "Error: Login ID is a required field." |