feature/gherkin-e2e-tests #26

Merged
david merged 9 commits from feature/gherkin-e2e-tests into main 2026-04-26 04:27:43 +00:00
2 changed files with 39 additions and 0 deletions
Showing only changes of commit d91da9b0be - Show all commits
@@ -0,0 +1,32 @@
Feature: Password Reset
As a user who forgot my password
I want to reset my password
So that I can regain access to my account
@happy-path @authentication @issue-10
Scenario: User can access password reset page
Given I am on the login page
When I click the "Forgot password?" link
Then I should be on the password reset page
And I should see "Reset Password"
@happy-path @authentication @issue-10 @wip
Scenario: User requests password reset with valid email
Given I am on the password reset page
When I fill in "email" with "existing-user@example.com"
And I click the "Send Reset Link" button
Then I should see "Password reset link sent"
And I should see "Check your email"
@negative-test @authentication @issue-10 @wip
Scenario: User requests password reset with invalid email
Given I am on the password reset page
When I fill in "email" with "nonexistent@example.com"
And I click the "Send Reset Link" button
Then I should see an error message
@negative-test @authentication @issue-10 @wip
Scenario: User submits empty email field
Given I am on the password reset page
When I click the "Send Reset Link" button
Then I should see "email is required" error
@@ -223,6 +223,13 @@ Then('I should be on the home page', async function () {
expect(currentUrl).toContain('/');
});
Then('I should be on the password reset page', async function () {
const currentUrl = world.page.url();
console.log(`🌍 Checking current URL: ${currentUrl}`);
expect(currentUrl).toContain('/auth/password-reset');
});
Then('I should be redirected to {string}', async function (path: string) {
await world.page.waitForLoadState('networkidle');
const currentUrl = world.page.url();