fix(deps): update minor and patch (#1722)

* fix(deps): update minor and patch

* chore: lower threshold

* chore: try new locator

* chore: try new locator

* chore: try new locator

* chore: try new locator

* chore: try new locator

* chore: try new locator

* chore: try new locator

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: caele <tsm@qlik.com>
This commit is contained in:
renovate[bot]
2025-04-25 11:12:54 +02:00
committed by GitHub
parent 5f08509d3b
commit b1146c6639
9 changed files with 121 additions and 136 deletions

View File

@@ -29,59 +29,55 @@ test.describe('keyboard navigation', () => {
const FILE_NAME = 'listbox_key_scroll.png';
await page.goto(`${url}/listbox/listbox.html?scenario=standard`, { waitUntil: 'networkidle' });
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const locator = page.locator(listboxSelector);
await locator.waitFor();
await page.hover(listboxSelector);
await page.press(listboxSelector, 'ArrowDown');
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('simple list move down up and select C', async () => {
await page.goto(`${url}/listbox/listbox.html?scenario=standard`, { waitUntil: 'networkidle' });
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const locator = page.locator(listboxSelector);
await locator.waitFor();
// Move focus from A to C.
const firstRow = await page.waitForSelector('[data-testid="listbox.item"]:first-child .value');
await firstRow.focus();
await page.keyboard.press('ArrowDown'); // At B
await page.keyboard.press('ArrowDown'); // At C
const focusCImage = await selector.screenshot({ caret: 'hide' });
expect(focusCImage).toMatchSnapshot(`${filePrefix}-C.png`);
await expect(locator).toHaveScreenshot(`${filePrefix}-C.png`, { caret: 'hide' });
// Select and move focus up one step.
await page.keyboard.press('Space'); // Select C
await page.keyboard.press('ArrowUp'); // At B
const focusBAndSelectedCImage = await selector.screenshot({ caret: 'hide' });
expect(focusBAndSelectedCImage).toMatchSnapshot(`${filePrefix}-B-select-C.png`);
await expect(locator).toHaveScreenshot(`${filePrefix}-B-select-C.png`, { caret: 'hide' });
// Tab to confirm button.
await page.keyboard.press('Tab'); // At confirm button
const focusConfirm = await selector.screenshot({ caret: 'hide' });
expect(focusConfirm).toMatchSnapshot(`${filePrefix}-confirm.png`);
await expect(locator).toHaveScreenshot(`${filePrefix}-confirm.png`, { caret: 'hide' });
// Tab into search field.
await page.keyboard.press('Tab'); // At confirm button
const focusSearch = await selector.screenshot({ caret: 'hide' });
expect(focusSearch).toMatchSnapshot(`${filePrefix}-search.png`);
await expect(locator).toHaveScreenshot(`${filePrefix}-search.png`, { caret: 'hide' });
// Tab back into last focused row.
await page.keyboard.press('Tab'); // At a row again
const focusRow = await selector.screenshot({ caret: 'hide' });
expect(focusRow).toMatchSnapshot(`${filePrefix}-row-again.png`);
await expect(locator).toHaveScreenshot(`${filePrefix}-row-again.png`, { caret: 'hide' });
// Press Enter to confirm selections.
await page.keyboard.press('Enter');
const stillFocusingRow = await selector.screenshot({ caret: 'hide' });
expect(stillFocusingRow).toMatchSnapshot(`${filePrefix}-row-after-confirm.png`);
await expect(locator).toHaveScreenshot(`${filePrefix}-row-after-confirm.png`, { caret: 'hide' });
});
test('grid mode with column view and navigating in all directions with arrow keys and select "Baked goods".', async () => {
await page.goto(`${url}/listbox/listbox.html?fixture=./__fixtures__/multi_scenario_grid_column_7.js`, {
waitUntil: 'networkidle',
});
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const locator = page.locator(listboxSelector);
await locator.waitFor();
// Tab into search field.
await page.keyboard.press('Tab');
@@ -95,8 +91,7 @@ test.describe('keyboard navigation', () => {
await page.keyboard.press('ArrowLeft');
await page.keyboard.press('Space');
await page.keyboard.press('Enter');
const listbox = await selector.screenshot({ caret: 'hide' });
expect(listbox).toMatchSnapshot(`${filePrefix}-grid-row-select-baked-goods.png`);
await expect(locator).toHaveScreenshot(`${filePrefix}-grid-row-select-baked-goods.png`, { caret: 'hide' });
});
test('(keyboardNavigation = false) grid mode with cyclic dimension and tabbing between components inside listbox', async () => {

View File

@@ -40,17 +40,17 @@ test.describe('listbox mashup rendering test', () => {
const FILE_NAME = 'listbox_basic.png';
await page.goto(`${url}/listbox/listbox.html?scenario=standard`, { waitUntil: 'networkidle' });
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
const locator = page.locator(listboxSelector);
await locator.waitFor();
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('selecting two values should result in two green rows', async () => {
const FILE_NAME = 'listbox_select_EH.png';
await page.goto(`${url}/listbox/listbox.html?scenario=standard`, { waitUntil: 'networkidle' });
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const locator = page.locator(listboxSelector);
await locator.waitFor();
const selectNumbers = [4, 7];
const action = async (nbr) => {
@@ -59,15 +59,15 @@ test.describe('listbox mashup rendering test', () => {
};
await execSequence(selectNumbers, action);
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('selecting two values in dense listbox should result in two green rows', async () => {
const FILE_NAME = 'listbox_dense_select.png';
await page.goto(`${url}/listbox/listbox.html?scenario=dense`, { waitUntil: 'networkidle' });
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const locator = page.locator(listboxSelector);
await locator.waitFor();
const selectNumbers = [4, 7];
const action = async (nbr) => {
@@ -76,15 +76,16 @@ test.describe('listbox mashup rendering test', () => {
};
await execSequence(selectNumbers, action);
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('selecting values should not show the selections toolbar when autoConfirm is true', async () => {
const FILE_NAME = 'listbox_select_EH_auto_confirm.png';
await page.goto(`${url}/listbox/listbox.html?scenario=autoConfirm`, { waitUntil: 'networkidle' });
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const locator = page.locator(listboxSelector);
await locator.waitFor();
const selectNumbers = [4, 7];
const action = async (nbr) => {
@@ -93,8 +94,7 @@ test.describe('listbox mashup rendering test', () => {
};
await execSequence(selectNumbers, action);
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('listbox search', async () => {
@@ -107,9 +107,9 @@ test.describe('listbox mashup rendering test', () => {
await search.click();
await search.fill('B');
const selector = await page.locator(listboxSelector);
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
const locator = page.locator(listboxSelector);
await locator.waitFor();
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('listbox search dark', async () => {
@@ -122,9 +122,9 @@ test.describe('listbox mashup rendering test', () => {
await search.click();
await search.fill('B');
const selector = await page.locator(listboxSelector);
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
const locator = page.locator(listboxSelector);
await locator.waitFor();
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('hide toolbar', async () => {
@@ -132,16 +132,17 @@ test.describe('listbox mashup rendering test', () => {
await page.goto(`${url}/listbox/listbox.html?scenario=noToolbar`, { waitUntil: 'networkidle' });
const selector = await page.locator(listboxSelector);
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
const locator = page.locator(listboxSelector);
await locator.waitFor();
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('long title should detach toolbar', async () => {
const FILE_NAME = 'listbox_detached_toolbar.png';
await page.goto(`${url}/listbox/listbox.html?scenario=longTitle`, { waitUntil: 'networkidle' });
const selector = await page.waitForSelector(listboxSelector, { visible: true });
const locator = page.locator(listboxSelector);
await locator.waitFor();
act(async () => {
await page.click(listboxSelector);
@@ -154,8 +155,7 @@ test.describe('listbox mashup rendering test', () => {
}, 500);
});
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
return expect(locator).toHaveScreenshot(FILE_NAME);
});
test.describe('fixtures', () => {
@@ -171,14 +171,10 @@ test.describe('listbox mashup rendering test', () => {
await page.goto(renderUrl, { waitUntil: 'networkidle' });
const element = await page.waitForSelector(listboxSelector, {
visible: true,
timeout: 10000,
});
const locator = page.locator(listboxSelector);
await locator.waitFor();
const screenshot = await page.screenshot({ clip: await element.boundingBox() });
expect(screenshot).toMatchSnapshot(`${name}.png`);
return expect(locator).toHaveScreenshot(`${name}.png`, { caret: 'hide' });
});
});
});

View File

@@ -24,17 +24,17 @@ test.describe('sheet mashup rendering test', () => {
const FILE_NAME = 'sheet_basic.png';
await page.goto(`${url}/sheet/sheet.html?target=sheet`);
const selector = await page.waitForSelector(object, { visible: true });
const image = await selector.screenshot();
return expect(image).toMatchSnapshot(FILE_NAME);
const locator = page.locator(object);
await locator.waitFor();
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
test('sheet bound Less test', async () => {
const FILE_NAME = 'sheet_bound_less.png';
await page.goto(`${url}/sheet/sheet.html?target=boundLessSheet`);
const selector = await page.waitForSelector(object, { visible: true });
const image = await selector.screenshot();
return expect(image).toMatchSnapshot(FILE_NAME);
const locator = page.locator(object);
await locator.waitFor();
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
});

View File

@@ -27,9 +27,8 @@ test.describe('snapper rendering test', () => {
await page.goto(`${url}/snaps/snapper.html`);
const selector = await page.waitForSelector(barSelector, { visible: true });
const image = await selector.screenshot({ caret: 'hide' });
return expect(image).toMatchSnapshot(FILE_NAME);
const locator = page.locator(barSelector);
await locator.waitFor();
return expect(locator).toHaveScreenshot(FILE_NAME, { caret: 'hide' });
});
});