115 lines
4.6 KiB
Gherkin
115 lines
4.6 KiB
Gherkin
@smoke @auth
|
|
Feature: Auth pages
|
|
Login entry points should render their forms and support real session-based login.
|
|
|
|
Scenario: company login page renders
|
|
Given I visit "/en/company/auth/login"
|
|
Then I see "Login to Company Portal"
|
|
And I see "Email address"
|
|
And I see "Password"
|
|
And I see "Login"
|
|
|
|
Scenario: company login validates required fields
|
|
Given I visit "/en/company/auth/login"
|
|
When I click "Login"
|
|
Then I see "Email is required"
|
|
And I see "Password is required"
|
|
|
|
Scenario: company user can log in with real credentials
|
|
Given I visit "/en/company/auth/login"
|
|
When I log in as "e2e-company-login@heygermany.test" with password "CompanyPass123!"
|
|
Then the URL contains "/company"
|
|
And I see "Find qualified international nurses for German healthcare"
|
|
|
|
Scenario: company candidates requires authentication
|
|
Given I visit "/en/company/candidates"
|
|
Then the URL contains "/en/company/auth/login"
|
|
And I see "Login to Company Portal"
|
|
|
|
Scenario: company candidate detail requires authentication
|
|
Given I visit "/en/company/candidate/test-candidate"
|
|
Then the URL contains "/en/company/auth/login"
|
|
And I see "Login to Company Portal"
|
|
|
|
Scenario: backoffice login page renders
|
|
Given I visit "/en/backoffice/auth/login"
|
|
Then I see "Email address"
|
|
And I see "Password"
|
|
And I see "Login"
|
|
And the URL contains "/backoffice/auth/login"
|
|
|
|
Scenario: backoffice user can log in with real credentials
|
|
Given I visit "/en/backoffice/auth/login"
|
|
When I log in as "e2e-backoffice-login@heygermany.test" with password "BackofficePass123!"
|
|
Then the URL contains "/backoffice/candidates"
|
|
And I see "Candidate Pool"
|
|
|
|
Scenario: backoffice candidates requires authentication
|
|
Given I visit "/en/backoffice/candidates"
|
|
Then the URL contains "/en/backoffice/auth/login"
|
|
And I see "Login"
|
|
|
|
Scenario: backoffice candidate detail requires authentication
|
|
Given I visit "/en/backoffice/candidate/test-candidate"
|
|
Then the URL contains "/en/backoffice/auth/login"
|
|
And I see "Login"
|
|
|
|
Scenario: candidate application requires authentication
|
|
Given I visit "/en/jobs/application"
|
|
Then the URL contains "/en/jobs/apply"
|
|
And I see "Who is This For?"
|
|
|
|
Scenario: logged-in company user is redirected away from company login
|
|
Given I visit "/en/company/auth/login"
|
|
When I log in as "e2e-company-login@heygermany.test" with password "CompanyPass123!"
|
|
And I visit "/en/company/auth/login"
|
|
Then the URL contains "/en/company/candidates"
|
|
And I see "Find qualified international nurses for German healthcare"
|
|
|
|
Scenario: company root redirects to candidates after login
|
|
Given I visit "/en/company/auth/login"
|
|
When I log in as "e2e-company-login@heygermany.test" with password "CompanyPass123!"
|
|
And I visit "/en/company"
|
|
Then the URL contains "/en/company/candidates"
|
|
|
|
Scenario: company root requires authentication
|
|
Given I visit "/en/company"
|
|
Then the URL contains "/en/company/auth/login"
|
|
And I see "Login to Company Portal"
|
|
|
|
Scenario: logged-in backoffice user is redirected away from backoffice login
|
|
Given I visit "/en/backoffice/auth/login"
|
|
When I log in as "e2e-backoffice-login@heygermany.test" with password "BackofficePass123!"
|
|
And I visit "/en/backoffice/auth/login"
|
|
Then the URL contains "/en/backoffice/candidates"
|
|
And I see "Candidate Pool"
|
|
|
|
Scenario: backoffice dashboard redirects to candidates after login
|
|
Given I visit "/en/backoffice/auth/login"
|
|
When I log in as "e2e-backoffice-login@heygermany.test" with password "BackofficePass123!"
|
|
And I visit "/en/backoffice/dashboard"
|
|
Then the URL contains "/en/backoffice/candidates"
|
|
|
|
Scenario: backoffice root requires authentication
|
|
Given I visit "/en/backoffice"
|
|
Then the URL contains "/en/backoffice/auth/login"
|
|
And I see "Login"
|
|
|
|
Scenario: company logout ends the protected session
|
|
Given I visit "/en/company/auth/login"
|
|
When I log in as "e2e-company-login@heygermany.test" with password "CompanyPass123!"
|
|
And I log out
|
|
And I wait for 3500 milliseconds
|
|
And I visit "/en/company/candidates"
|
|
Then the URL contains "/en/company/auth/login"
|
|
And I see "Login to Company Portal"
|
|
|
|
Scenario: backoffice logout ends the protected session
|
|
Given I visit "/en/backoffice/auth/login"
|
|
When I log in as "e2e-backoffice-login@heygermany.test" with password "BackofficePass123!"
|
|
And I log out
|
|
And I wait for 3500 milliseconds
|
|
And I visit "/en/backoffice/candidates"
|
|
Then the URL contains "/en/backoffice/auth/login"
|
|
And I see "Login"
|