1
0
mirror of synced 2025-12-23 11:54:18 -05:00

only include productGroups in main context on homepage (#31640)

This commit is contained in:
Peter Bengtsson
2022-10-17 22:27:19 +02:00
committed by GitHub
parent dce3db6013
commit d3fe424810
8 changed files with 100 additions and 22 deletions

View 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)
})
})