only include productGroups in main context on homepage (#31640)
This commit is contained in:
31
tests/rendering/homepage.js
Normal file
31
tests/rendering/homepage.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { expect, jest } from '@jest/globals'
|
||||
|
||||
import { getDOM } from '../helpers/e2etest.js'
|
||||
|
||||
describe('rendering the home page(s)', () => {
|
||||
jest.setTimeout(5 * 60 * 1000)
|
||||
|
||||
test('homepage has product links', async () => {
|
||||
const $ = await getDOM('/en')
|
||||
const products = $('[data-testid=product]')
|
||||
expect(products.length).toBe(1)
|
||||
})
|
||||
|
||||
test('homepage in non-default language has product links', async () => {
|
||||
const $ = await getDOM('/ja')
|
||||
const products = $('[data-testid=product]')
|
||||
expect(products.length).toBe(1)
|
||||
})
|
||||
|
||||
test('homepage in non-default product', async () => {
|
||||
const $ = await getDOM('/en/enterprise-cloud@latest')
|
||||
const products = $('[data-testid=product]')
|
||||
expect(products.length).toBe(1)
|
||||
})
|
||||
|
||||
test('homepage in non-default product in non-default language', async () => {
|
||||
const $ = await getDOM('/ja/enterprise-cloud@latest')
|
||||
const products = $('[data-testid=product]')
|
||||
expect(products.length).toBe(1)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user