Skip to content

Commit

Permalink
Merge pull request #776 from Financial-Times/chore/change-my-account-url
Browse files Browse the repository at this point in the history
Relabel and redirect Account Settings in header
  • Loading branch information
thegreatercurve authored and andygout committed Mar 18, 2020
1 parent d4ee8fd commit f9540eb
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions __fixtures__/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{ "label": "Sign In", "url": "/login?location=${currentPath}", "submenu": null },
{ "label": "Sign Out", "url": "/logout", "submenu": null },
{ "label": "Subscribe", "url": "/products", "submenu": null },
{ "label": "Account Settings", "url": "https://myaccount.ft.com/details/core/view", "submenu": null },
{ "label": "Settings & Account", "url": "https://www.ft.com/myaccount", "submenu": null },
{ "label": "myFT", "url": "/myft", "submenu": null },
{ "label": "Portfolio", "url": "https://markets.ft.com/data/portfolio/dashboard", "submenu": null }
]
Expand Down Expand Up @@ -980,7 +980,7 @@
"label": "User",
"items": [
{ "label": "Help Centre", "url": "http://help.ft.com", "submenu": null },
{ "label": "Account Settings", "url": "https://myaccount.ft.com/details/core/view", "submenu": null },
{ "label": "Settings & Account", "url": "https://www.ft.com/myaccount", "submenu": null },
{ "label": "Contact Preferences", "url": "/myft/alerts", "submenu": null },
{ "label": "Sign Out", "url": "/logout", "submenu": null }
]
Expand Down Expand Up @@ -1161,7 +1161,7 @@
"label": "Navigation",
"items": [
{ "label": "Portfolio", "url": "https://markets.ft.com/data/portfolio/dashboard", "submenu": null },
{ "label": "Account Settings", "url": "https://myaccount.ft.com/details/core/view", "submenu": null }
{ "label": "Settings & Account", "url": "https://www.ft.com/myaccount", "submenu": null }
]
},
"navbar-right-anon": {
Expand Down
4 changes: 2 additions & 2 deletions examples/ft-ui/__test__/anonymous-user.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('examples/ft-ui', () => {
await expect(
page
).not.toMatchElement(
'.o-header__nav-list--right a[href="https://myaccount.ft.com/details/core/view"]',
{ text: 'Account Settings' }
'.o-header__nav-list--right a[href="https://www.ft.com/myaccount"]',
{ text: 'Settings & Account' }
)
await expect(
page
Expand Down
4 changes: 2 additions & 2 deletions examples/ft-ui/__test__/logged-in-user.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ describe('examples/ft-ui', () => {
it('renders the expected loggin-in user Header link elements', async () => {
await expect(page).toMatchElement('.o-header__top-column--right a[href="/myft"]', { text: 'myFT' })
await expect(page).toMatchElement(
'.o-header__nav-list--right a[href="https://myaccount.ft.com/details/core/view"]',
'.o-header__nav-list--right a[href="https://www.ft.com/myaccount"]',
{
text: 'Account Settings'
text: 'Settings & Account'
}
)
await expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const data: TNavMenu = {
submenu: null
},
{
label: 'Account Settings',
url: 'https://myaccount.ft.com/details/core/view',
label: 'Settings & Account',
url: 'https://www.ft.com/myaccount',
submenu: null
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const data: TNavMenu = {
label: 'User',
items: [
{ label: 'Help Centre', url: 'http://help.ft.com', submenu: null },
{ label: 'Account Settings', url: 'https://myaccount.ft.com/details/core/view', submenu: null },
{ label: 'Settings & Account', url: 'https://www.ft.com/myaccount', submenu: null },
{ label: 'Contact Preferences', url: '/myft/alerts', submenu: null },
{ label: 'Sign Out', url: '/logout', submenu: null }
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1239,10 +1239,10 @@ exports[`dotcom-ui-header/src/components/Drawer renders as a logged in user 1`]
>
<a
className="o-header__drawer-menu-link"
data-trackable="Account Settings"
href="https://myaccount.ft.com/details/core/view"
data-trackable="Settings & Account"
href="https://www.ft.com/myaccount"
>
Account Settings
Settings & Account
</a>
</li>
<li
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('dotcom-ui-header', () => {

it('renders the expected logged in user header links', () => {
expect(header.find('a[data-trackable="Portfolio"]')).toExist()
expect(header.find('a[data-trackable="Account Settings"]')).toExist()
expect(header.find('a[data-trackable="Settings & Account"]')).toExist()
})

it('does not render the anonymous user header links', () => {
Expand All @@ -79,7 +79,7 @@ describe('dotcom-ui-header', () => {

it('does not render the logged in user header links', () => {
expect(header.find('a[data-trackable="Portfolio"]')).not.toExist()
expect(header.find('a[data-trackable="Account Settings"]')).not.toExist()
expect(header.find('a[data-trackable="Settings & Account"]')).not.toExist()
})
})
})
4 changes: 2 additions & 2 deletions packages/dotcom-ui-header/src/__test__/enzyme/drawer.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ describe('dotcom-ui-header/src/components/drawer', () => {
expect(result.find('a[data-trackable="Sign Out"]')).toExist()
})

it('renders account settings link', () => {
expect(result.find('a[data-trackable="Account Settings"]')).toExist()
it('renders settings and account link', () => {
expect(result.find('a[data-trackable="Settings & Account"]')).toExist()
})
})

Expand Down

0 comments on commit f9540eb

Please sign in to comment.