# Proving Ground — Product Requirements (v1.0)

Proving Ground is a small practice site for people learning test automation. It offers a practice login page with inline errors, a success page with log out, a practice index, placeholder site pages and a static courses table. Login is validated in the browser only, after a short delay, and needs no account.

**Problem.** Learners need a stable, predictable target where positive, negative and boundary behaviour is documented exactly, so they can practise writing reliable checks.

## Users
- **Learner** — A page with clear, repeatable success and error behaviour to practise login and table checks.
- **Instructor** — Fixed content (messages, headings, table rows) that exercises can assert against.

## Goals
- Every message, heading and table cell is stable and exactly as documented.
- Login rules are simple and deterministic: exact match, fixed check order.
- All navigation targets resolve.

## Practice login (LGN)

Login form validated in the browser, with a hint showing the practice credentials.

- **FR-LGN-01** (Must) The login page presents a labelled form and the practice credentials; submitting the credentials shown leads to the success page.
  - Path /provingground/practice-test-login/, heading "Test login", hint "Username: <name> Password: <password>" (values as displayed on the page)
  - Valid credentials redirect to /provingground/logged-in-successfully/ with heading "Logged In Successfully"
  - Tab title "Logged In Successfully | Proving Ground"
- **FR-LGN-02** (Must) A wrong username shows the alert "Your username is invalid!" and the page does not navigate.
  - Username "incorrectUser" with the correct password: red alert "Your username is invalid!"; URL unchanged
- **FR-LGN-03** (Must) A wrong password with a correct username shows the alert "Your password is invalid!" and the page does not navigate.
  - Correct username with password "incorrectPassword": red alert "Your password is invalid!"; URL unchanged
- **FR-LGN-04** (Should) The username is checked before the password: when both are wrong, or both empty, only the username message is shown.
  - Wrong username and wrong password: "Your username is invalid!" only
  - Both fields empty: "Your username is invalid!"
- **FR-LGN-05** (Should) Credentials must match exactly: comparison is case-sensitive and values are not trimmed.
  - Username with a capital first letter: "Your username is invalid!"
  - Password in lower case: "Your password is invalid!"
  - Username with a trailing space: "Your username is invalid!"
- **FR-LGN-06** (Could) Each submit hides any previous alert and, after about 300 ms, shows the result of that attempt only; one message is shown at a time.
  - After a wrong username then a wrong password, the alert is briefly hidden and then reads "Your password is invalid!"; never both messages at once
- **FR-LGN-07** (Could) Fields are labelled, the password is masked and the error container is an alert region hidden until a failed submit.
  - "Username" is a text input #username and "Password" a password input #password
  - #error has role "alert" and is not visible before a failed submit

## Success page and log out (OUT)

Confirmation after login with a way back.

- **FR-OUT-01** (Should) The success page greets the user and offers Log out, which returns to an empty login form.
  - Message "Congratulations <username>. You successfully logged in!" and a "Log out" button
  - Log out goes to /provingground/practice-test-login/ with heading "Test login" and both fields empty

## Navigation (NAV)

Practice index and primary menu.

- **FR-NAV-01** (Should) The Practice page lists the practice pages and each link opens its page.
  - Home has a "Practice" button leading to heading "Practice" with links "Test Login Page" and "Test Table"
  - Test Login Page opens "Test login"; Test Table opens "Test Table"
- **FR-NAV-02** (Could) Every primary menu item resolves; placeholder pages say they are coming soon and the brand returns home.
  - Courses, Blog and Contact show headings "Courses", "Blog", "Contact", each with "Coming soon."
  - Clicking "Proving Ground" opens Home with heading "Hello"
  - Menu: Home, Practice, Courses, Blog, Contact

## Courses table (TBL)

Static table for reading and assertion exercises.

- **FR-TBL-01** (Must) The table #courses_table lists exactly five courses with fixed columns and content.
  - Columns: ID, Course Name, Language, Level, Enrollments
  - 1 WebDriver with Java for beginners, Java, Beginner, 28,000+
  - 2 WebDriver with Java: Advanced, Java, Advanced, 12,000+
  - 3 Browser automation with TypeScript, TypeScript, Intermediate, 9,000+
  - 4 End-to-end testing fundamentals, JavaScript, Beginner, 15,000+
  - 5 Python browser automation, Python, Intermediate, 18,000+
  - Most enrolments: course 1
- **FR-TBL-02** (Should) Filtering by reading yields a predictable result for Level.
  - Level "Beginner": exactly "WebDriver with Java for beginners" (Java) and "End-to-end testing fundamentals" (JavaScript)

## Glossary and rules

- **Practice credentials** — The username and password shown on the login page for learners to use.

## Out of scope

- Server-side authentication
- Blog and course content
