Link to product landing page with language prefix (#46068)
This commit is contained in:
@@ -7,7 +7,9 @@ describe('sidebar', () => {
|
|||||||
describe('nav', () => {
|
describe('nav', () => {
|
||||||
test('top level product mentioned at top of sidebar', async () => {
|
test('top level product mentioned at top of sidebar', async () => {
|
||||||
const $ = await getDOM('/get-started')
|
const $ = await getDOM('/get-started')
|
||||||
expect($('[data-testid="sidebar-product-xl"]').text()).toBe('Get started')
|
const sidebarProduct = $('[data-testid="sidebar-product-xl"]')
|
||||||
|
expect(sidebarProduct.text()).toBe('Get started')
|
||||||
|
expect(sidebarProduct.attr('href')).toBe('/en/get-started')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('REST pages get the REST sidebar', async () => {
|
test('REST pages get the REST sidebar', async () => {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const SidebarNav = ({ variant = 'full' }: Props) => {
|
|||||||
<div className="mt-3" id="allproducts-menu">
|
<div className="mt-3" id="allproducts-menu">
|
||||||
<Link
|
<Link
|
||||||
data-testid="sidebar-product-xl"
|
data-testid="sidebar-product-xl"
|
||||||
href={currentProduct.href}
|
href={`/${router.locale}${currentProduct.href}`}
|
||||||
// Note the `_product-title` is used by the popover preview cards
|
// Note the `_product-title` is used by the popover preview cards
|
||||||
// when it needs this text for in-page links.
|
// when it needs this text for in-page links.
|
||||||
className="d-block pl-1 mb-2 h3 color-fg-default no-underline _product-title"
|
className="d-block pl-1 mb-2 h3 color-fg-default no-underline _product-title"
|
||||||
|
|||||||
Reference in New Issue
Block a user