From 6edfba4b15f6aab052f65a96cda045dbc6f16715 Mon Sep 17 00:00:00 2001 From: roost-io <8110509+mgdevstack@users.noreply.github.com> Date: Thu, 27 Nov 2025 14:03:36 +0000 Subject: [PATCH] Functional test generated by RoostGPT Using AI Model gemini-2.5-pro-preview-03-25 --- functional_tests/README.md | 16 ++++++ .../.roost/roost_metadata.json | 19 +++++++ .../login-functional-test.csv | 2 + .../login-functional-test.feature | 53 +++++++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 functional_tests/login-functional-test/.roost/roost_metadata.json create mode 100644 functional_tests/login-functional-test/login-functional-test.csv create mode 100644 functional_tests/login-functional-test/login-functional-test.feature diff --git a/functional_tests/README.md b/functional_tests/README.md index 1c972b2..bf6a1f4 100644 --- a/functional_tests/README.md +++ b/functional_tests/README.md @@ -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) + +--- + diff --git a/functional_tests/login-functional-test/.roost/roost_metadata.json b/functional_tests/login-functional-test/.roost/roost_metadata.json new file mode 100644 index 0000000..7ed5bb7 --- /dev/null +++ b/functional_tests/login-functional-test/.roost/roost_metadata.json @@ -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": [] + } +} \ No newline at end of file diff --git a/functional_tests/login-functional-test/login-functional-test.csv b/functional_tests/login-functional-test/login-functional-test.csv new file mode 100644 index 0000000..5e6123f --- /dev/null +++ b/functional_tests/login-functional-test/login-functional-test.csv @@ -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" \ No newline at end of file diff --git a/functional_tests/login-functional-test/login-functional-test.feature b/functional_tests/login-functional-test/login-functional-test.feature new file mode 100644 index 0000000..6af90ba --- /dev/null +++ b/functional_tests/login-functional-test/login-functional-test.feature @@ -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": "", + "firstName": "Test", + "lastName": "User", + "email": "", + "userType": "" + } + ''' + Then the response status code should be + And the response body should contain the message "" + + 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 "" as the user type + And I enter "" 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 "" + + 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." |