Skip to content

Commit a305510

Browse files
committed
test(range): target knob by handle a or b
1 parent ac39d58 commit a305510

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/src/components/range/test/custom/range.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,14 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, config }) => {
199199

200200
const knobABackgroundColor = await range.evaluate((el) => {
201201
const shadowRoot = el.shadowRoot;
202-
const knobA = shadowRoot?.querySelector('.range-knob-a');
202+
const knobA = shadowRoot?.querySelector('.range-knob-handle-a .range-knob');
203203
return knobA ? window.getComputedStyle(knobA).backgroundColor : '';
204204
});
205205
expect(knobABackgroundColor).toBe('rgb(0, 0, 255)');
206206

207207
const knobBBackgroundColor = await range.evaluate((el) => {
208208
const shadowRoot = el.shadowRoot;
209-
const knobB = shadowRoot?.querySelector('.range-knob-b');
209+
const knobB = shadowRoot?.querySelector('.range-knob-handle-b .range-knob');
210210
return knobB ? window.getComputedStyle(knobB).backgroundColor : '';
211211
});
212212
expect(knobBBackgroundColor).toBe('rgb(255, 255, 0)');

0 commit comments

Comments
 (0)