Skip to content

Commit bfbe5cd

Browse files
Merge pull request #182 from JesperDramsch/claude/fix-e2e-mobile-test-K4fWG
fix: check title visibility separately for mobile/desktop viewports
2 parents 0ba23f4 + 7872f08 commit bfbe5cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/e2e/specs/search-functionality.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,11 @@ test.describe('Search Functionality', () => {
161161
if (await firstResult.isVisible()) {
162162
// Check for essential conference information
163163
// On mobile viewports, .conf-title is hidden and .conf-title-small is shown instead
164-
const title = firstResult.locator('.conf-title, .conf-title-small, .conference-title, h3, h4');
165-
await expect(title).toBeVisible();
164+
// We need to check each separately since Playwright only checks the first DOM element
165+
const confTitle = firstResult.locator('.conf-title');
166+
const confTitleSmall = firstResult.locator('.conf-title-small');
167+
const hasVisibleTitle = await confTitle.isVisible() || await confTitleSmall.isVisible();
168+
expect(hasVisibleTitle).toBeTruthy();
166169

167170
// Check for deadline or date
168171
const deadline = firstResult.locator('.deadline, .timer, .countdown-display, .date');

0 commit comments

Comments
 (0)