110 lines
5.1 KiB
Gherkin
110 lines
5.1 KiB
Gherkin
Feature: Browser tab title names the current page
|
|
|
|
Background:
|
|
Given the SPA is mounted with its router
|
|
And the tab title format is "<page> · RenewCMS" for a page that has a name
|
|
And the tab title is just "RenewCMS" when the current page has no name at all
|
|
And page names are translated to the interface language
|
|
And the title is set in one place for the whole SPA, not by each screen
|
|
And no /v1 call is made only to set the title
|
|
|
|
Scenario Outline: Back-office pages show their name
|
|
Given a signed-in verified user
|
|
When the user navigates to <path>
|
|
Then the tab title is "<title>"
|
|
|
|
Examples:
|
|
| path | title |
|
|
| /home | Home · RenewCMS |
|
|
| /article | Articles · RenewCMS |
|
|
| /article/new | Articles · RenewCMS |
|
|
| /media | Media · RenewCMS |
|
|
| /users | Users · RenewCMS |
|
|
| /activity | Activity · RenewCMS |
|
|
| /profile | Profile · RenewCMS |
|
|
| /integration | Integration · RenewCMS |
|
|
| /integration/api-keys | Integration · RenewCMS |
|
|
| /settings | Settings · RenewCMS |
|
|
| /settings/media/variants | Settings · RenewCMS |
|
|
| /settings/media/cache | Settings · RenewCMS |
|
|
|
|
Scenario Outline: Auth pages show the card heading they display
|
|
Given a signed-out visitor
|
|
When the visitor navigates to <path>
|
|
Then the tab title is "<title>"
|
|
|
|
Examples:
|
|
| path | title |
|
|
| /login | Log in · RenewCMS |
|
|
| /register | Create the owner account · RenewCMS |
|
|
| /register/pending | Check your email · RenewCMS |
|
|
| /register/reset/request | Reset your password · RenewCMS |
|
|
| /register/reset/validate?c=CODE&email=EMAIL | Choose a new password · RenewCMS |
|
|
| /invite/accept?c=CODE | Accept your invite · RenewCMS |
|
|
| /register/validate?c=CODE without a session | Log in to finish verifying · RenewCMS |
|
|
|
|
Scenario: An auth card with no heading uses the product name
|
|
Given the verify screen is verifying a code and its card shows no heading
|
|
Then the tab title is "RenewCMS"
|
|
|
|
Scenario: Auth card heading changes inside one route
|
|
Given an auth screen whose card heading changes between states
|
|
When the card heading changes
|
|
Then the tab title follows the new card heading
|
|
|
|
Scenario: Title updates when the page changes
|
|
Given a signed-in verified user on /home with the tab title "Home · RenewCMS"
|
|
When the user navigates to /media
|
|
Then the tab title is "Media · RenewCMS"
|
|
When the user navigates back to /home
|
|
Then the tab title is "Home · RenewCMS"
|
|
|
|
Scenario: Leaving the login screen does not leave "Log in" stuck
|
|
Given a signed-out visitor on /login with the tab title "Log in · RenewCMS"
|
|
When the visitor logs in successfully and is redirected to /home
|
|
Then the tab title is "Home · RenewCMS"
|
|
|
|
Scenario: Logging out does not keep the back-office title
|
|
Given a signed-in verified user on /settings
|
|
When the user logs out and is sent to /login
|
|
Then the tab title is "Log in · RenewCMS"
|
|
|
|
Scenario: Editor tab shows the article's own title once loaded
|
|
Given a signed-in verified user
|
|
When the user opens /article/42/edit and the article is still loading
|
|
Then the tab title is "Editor · RenewCMS"
|
|
When the article "Hello world" has loaded
|
|
Then the tab title is "Hello world · RenewCMS"
|
|
|
|
Scenario: Editor tab follows the saved article title
|
|
Given the user is editing the article "Hello world" at /article/42/edit
|
|
When the article title is saved as "Hello again"
|
|
Then the tab title is "Hello again · RenewCMS"
|
|
|
|
Scenario Outline: Editor tab falls back to "Editor"
|
|
Given a signed-in verified user
|
|
When the user opens /article/42/edit and <situation>
|
|
Then the tab title is "Editor · RenewCMS"
|
|
|
|
Examples:
|
|
| situation |
|
|
| the article fails to load |
|
|
| the article has an empty title |
|
|
|
|
Scenario: Leaving the editor drops the article title
|
|
Given the user is on /article/42/edit with the tab title "Hello world · RenewCMS"
|
|
When the user navigates to /article
|
|
Then the tab title is "Articles · RenewCMS"
|
|
|
|
Scenario: Not-found page
|
|
Given any user
|
|
When the user navigates to an unknown path
|
|
Then the tab title is "404 · RenewCMS"
|
|
|
|
Scenario: Title follows the interface language
|
|
Given the interface language is Français
|
|
When the user navigates to /media
|
|
Then the tab title is the French "Media" name followed by " · RenewCMS"
|
|
When the user switches the interface language to English
|
|
Then the tab title is "Media · RenewCMS" without a navigation
|