Skip to content

Commit 4b5cc93

Browse files
committed
feat(#1365972): correct e2e tests to account for attribute code column
1 parent ad28bc8 commit 4b5cc93

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jest: ## Run jest unit tests
145145
@$(DOCKER_COMP) exec pwa yarn test
146146

147147
e2e: ## Run e2e tests or pass the parameter "f=" to filters tests and "t=" to run only certain tags, example: make e2e f=login t=standard
148+
@echo "\033[33m⚠️ E2E tests expect a clean application state. If you have modified your configuration and the tests fail, run 'make fixtures_load'\033[0m"
148149
@$(eval f ?=)
149150
@$(eval t ?=)
150151
@$(DOCKER_COMP) exec e2e yarn test $(f) $(if $(t),--grep $(t))

front/e2e/src/tests/pages/admin/search/facets.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {test, expect} from '@playwright/test'
1+
import {expect, test} from '@playwright/test'
22
import {Grid} from '../../../../helper/grid'
33
import {Filter, FilterType} from '../../../../helper/filter'
44
import {Dropdown} from '../../../../helper/dropdown'
55
import {login} from '../../../../helper/auth'
66
import {navigateTo} from '../../../../helper/menu'
7-
import {generateTestId, TestId} from "../../../../helper/testIds";
7+
import {TestId, generateTestId} from "../../../../helper/testIds"
88

99
const resourceName = 'FacetConfiguration'
1010

@@ -37,6 +37,7 @@ const texts = {
3737
labelMenuPage: 'Facets',
3838
pageTitle: 'Facets',
3939
gridHeaders: {
40+
defaultCode: 'Attribute code',
4041
defaultLabel: 'Attribute label',
4142
displayMode: 'Display',
4243
coverageRate: 'Coverage',
@@ -74,7 +75,7 @@ const texts = {
7475
const baseURL = process.env.SERVER_BASE_URL || 'https://gally.local'
7576

7677
test('Pages > Search > Facets', {tag: ['@premium', '@standard']}, async ({page}) => {
77-
async function waitForUpdateResponse() {
78+
async function waitForUpdateResponse(): Promise<void> {
7879
await page.waitForResponse(response => {
7980
return response.url().includes(`${baseURL}/api/facet_configurations`) && response.ok()
8081
}, {timeout: 5000})
@@ -96,6 +97,7 @@ test('Pages > Search > Facets', {tag: ['@premium', '@standard']}, async ({page})
9697

9798
await test.step('Verify grid headers and pagination', async () => {
9899
await grid.expectHeadersToBe([
100+
texts.gridHeaders.defaultCode,
99101
texts.gridHeaders.defaultLabel,
100102
texts.gridHeaders.displayMode,
101103
texts.gridHeaders.coverageRate,

0 commit comments

Comments
 (0)