Skip to content

Commit ab2bd90

Browse files
edwhclaude
andcommitted
Revert selector changes from device test fixes
Revert changes made in commits 3984c3a and 9ea4b69 that attempted to fix device count selectors but didn't solve the issue. Back to original h3:visible selector. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9ea4b69 commit ab2bd90

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

resources/js/components/EventDeviceList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="device-list">
2+
<div>
33
<b-table-simple responsive class="pl-0 pl-md-3 pr-0 pr-md-3 pb-2 mb-2" table-class="m-0 leave-tables-alone">
44
<b-thead>
55
<b-tr>

tests/Integration/utils.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,9 @@ exports.addDevice = async function(page, baseURL, idevents, powered, photo, fixe
187187
var addsel = powered ? '.add-powered-device-desktop' : '.add-unpowered-device-desktop'
188188
log('Using device selector', { addsel, powered })
189189

190-
// Get current device count - count h3 elements within the device-list container
191-
// Use the device-list class we added to EventDeviceList.vue for specificity
190+
// Get current device count.
192191
await page.waitForSelector(addsel)
193-
var current = await page.locator('.device-list h3.noheader').count()
192+
var current = await page.locator('h3:visible').count()
194193
log('Current device count', { current })
195194

196195
// Click the add button.
@@ -243,18 +242,18 @@ exports.addDevice = async function(page, baseURL, idevents, powered, photo, fixe
243242
log('Submitting device creation')
244243
await page.locator('text=Add item >> visible=true').click()
245244

246-
// Wait for device to show - use same specific selector as when counting
245+
// Wait for device to show.
247246
log('Waiting for device to appear in list')
248-
await expect(page.locator('.device-list h3.noheader')).toHaveCount(current + 1)
247+
await expect(page.locator('h3:visible')).toHaveCount(current + 1)
249248

250249
// Check that the photo appears.
251250
log('Opening device for verification')
252251
await page.locator('.edit:visible').last().click()
253252

254253
if (photo) {
255254
log('Verifying photo was uploaded')
256-
// Should see the dropzone and uploaded photo - allow extra time for upload to complete
257-
await expect(page.locator('.device-photos:visible img')).toHaveCount(2, { timeout: 10000 })
255+
// Should see the dropzone and uploaded photo.
256+
await expect(page.locator('.device-photos:visible img')).toHaveCount(2)
258257
} else {
259258
log('Verifying no additional photos present')
260259
// Just dropzone

0 commit comments

Comments
 (0)