Skip to content
Snippets Groups Projects
Unverified Commit bb7d7212 authored by Martin Schoeler's avatar Martin Schoeler Committed by GitHub
Browse files

fix: restore tooltips to units Multiselect (#33174)

parent 6a27d7b2
No related branches found
No related tags found
No related merge requests found
---
"@rocket.chat/meteor": patch
---
Restored tooltips to the unit edit department field selected options
...@@ -228,7 +228,7 @@ const UnitEdit = ({ unitData, unitMonitors, unitDepartments }: UnitEditProps) => ...@@ -228,7 +228,7 @@ const UnitEdit = ({ unitData, unitMonitors, unitDepartments }: UnitEditProps) =>
value={value} value={value}
onChange={onChange} onChange={onChange}
onBlur={onBlur} onBlur={onBlur}
withTitle={false} withTitle
filter={departmentsFilter} filter={departmentsFilter}
setFilter={setDepartmentsFilter} setFilter={setDepartmentsFilter}
options={departmentsOptions} options={departmentsOptions}
......
...@@ -185,11 +185,14 @@ test.describe('OC - Manage Units', () => { ...@@ -185,11 +185,14 @@ test.describe('OC - Manage Units', () => {
await poOmnichannelUnits.btnSave.click(); await poOmnichannelUnits.btnSave.click();
}); });
await test.step('expect department to be in the chosen departments list', async () => { await test.step('expect department to be in the chosen departments list and have title', async () => {
await poOmnichannelUnits.search(unit.name); await poOmnichannelUnits.search(unit.name);
await poOmnichannelUnits.findRowByName(unit.name).click(); await poOmnichannelUnits.findRowByName(unit.name).click();
await expect(poOmnichannelUnits.contextualBar).toBeVisible(); await expect(poOmnichannelUnits.contextualBar).toBeVisible();
await expect(page.getByRole('option', { name: department2.data.name })).toBeVisible(); await expect(poOmnichannelUnits.selectOptionChip(department2.data.name)).toBeVisible();
await poOmnichannelUnits.selectOptionChip(department2.data.name).hover();
await expect(page.getByRole('tooltip', { name: department2.data.name })).toBeVisible();
await poOmnichannelUnits.btnContextualbarClose.click(); await poOmnichannelUnits.btnContextualbarClose.click();
}); });
......
...@@ -43,6 +43,10 @@ export class OmnichannelUnits extends OmnichannelAdministration { ...@@ -43,6 +43,10 @@ export class OmnichannelUnits extends OmnichannelAdministration {
return this.page.locator(`[role=option][value="${name}"]`); return this.page.locator(`[role=option][value="${name}"]`);
} }
public selectOptionChip(name: string) {
return this.page.getByRole('option', { name });
}
async selectDepartment({ name, _id }: { name: string; _id: string }) { async selectDepartment({ name, _id }: { name: string; _id: string }) {
await this.inputDepartments.click(); await this.inputDepartments.click();
await this.inputDepartments.fill(name); await this.inputDepartments.fill(name);
......
...@@ -12,7 +12,7 @@ export const TooltipComponent = ({ title, anchor }: TooltipComponentProps): Reac ...@@ -12,7 +12,7 @@ export const TooltipComponent = ({ title, anchor }: TooltipComponentProps): Reac
return ( return (
<PositionAnimated anchor={ref} placement='top-middle' margin={8} visible={AnimatedVisibility.UNHIDING}> <PositionAnimated anchor={ref} placement='top-middle' margin={8} visible={AnimatedVisibility.UNHIDING}>
<Tooltip>{title}</Tooltip> <Tooltip role='tooltip'>{title}</Tooltip>
</PositionAnimated> </PositionAnimated>
); );
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment