mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 12:12:15 +01:00
fix scroll & jumping issues with task dropdown, fixes ST-395
This commit is contained in:
committed by
Constantin Graf
parent
19cc05140a
commit
b391f47d1b
@@ -50,4 +50,34 @@ test('test that creating and deleting a new client via the modal works', async (
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('test that archiving and unarchiving clients works', async ({ page }) => {
|
||||||
|
const newClientName = 'New Client ' + Math.floor(1 + Math.random() * 10000);
|
||||||
|
await goToProjectsOverview(page);
|
||||||
|
await page.getByRole('button', { name: 'Create Client' }).click();
|
||||||
|
await page.getByLabel('Client Name').fill(newClientName);
|
||||||
|
|
||||||
|
await page.getByRole('button', { name: 'Create Client' }).nth(1).click();
|
||||||
|
await expect(page.getByText(newClientName)).toBeVisible();
|
||||||
|
|
||||||
|
await page.getByRole('row').first().getByRole('button').click();
|
||||||
|
await Promise.all([
|
||||||
|
page.getByRole('button').getByText('Archive').first().click(),
|
||||||
|
expect(page.getByText(newClientName)).not.toBeVisible(),
|
||||||
|
]);
|
||||||
|
await Promise.all([
|
||||||
|
page.getByRole('tab', { name: 'Archived' }).click(),
|
||||||
|
expect(page.getByText(newClientName)).toBeVisible(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
await page.getByRole('row').first().getByRole('button').click();
|
||||||
|
await Promise.all([
|
||||||
|
page.getByRole('button').getByText('Unarchive').first().click(),
|
||||||
|
expect(page.getByText(newClientName)).not.toBeVisible(),
|
||||||
|
]);
|
||||||
|
await Promise.all([
|
||||||
|
page.getByRole('tab', { name: 'Active' }).click(),
|
||||||
|
expect(page.getByText(newClientName)).toBeVisible(),
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
// TODO: Add Name Update Test
|
// TODO: Add Name Update Test
|
||||||
|
|||||||
@@ -62,19 +62,21 @@ const { floatingStyles } = useFloating(reference, floating, {
|
|||||||
placement: props.align,
|
placement: props.align,
|
||||||
whileElementsMounted: autoUpdate,
|
whileElementsMounted: autoUpdate,
|
||||||
middleware: [
|
middleware: [
|
||||||
flip(),
|
|
||||||
offset(10),
|
offset(10),
|
||||||
shift({
|
shift({
|
||||||
limiter: limitShift({
|
limiter: limitShift({
|
||||||
offset: 5,
|
offset: 5,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
flip({
|
||||||
|
fallbackAxisSideDirection: 'start',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="min-w-0">
|
<div class="min-w-0 isolate">
|
||||||
<div @click.prevent="toggleOpen" ref="reference" class="min-w-0">
|
<div @click.prevent="toggleOpen" ref="reference" class="min-w-0">
|
||||||
<slot name="trigger" />
|
<slot name="trigger" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ watch(open, (isOpen) => {
|
|||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
initializeHighlightedItem();
|
initializeHighlightedItem();
|
||||||
searchInput.value?.focus();
|
searchInput.value?.focus({ preventScroll: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user