mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-07 03:46:38 +00:00
Merge remote-tracking branch 'origin/master' into deploy/prod-tooltip-wrap-2391
This commit is contained in:
@@ -119,7 +119,7 @@ function TooltipContent({
|
||||
data-slot="tooltip-content"
|
||||
sideOffset={sideOffset}
|
||||
className={cn(
|
||||
'bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',
|
||||
'bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -16,6 +16,7 @@ const tooltipPath = path.join(
|
||||
root,
|
||||
'src/app/home/components/workspace-quota/WorkspaceQuotaTooltip.tsx',
|
||||
);
|
||||
const baseTooltipPath = path.join(root, 'src/components/ui/tooltip.tsx');
|
||||
const addExtensionPath = path.join(root, 'src/app/home/add-extension/page.tsx');
|
||||
const marketPath = path.join(
|
||||
root,
|
||||
@@ -55,6 +56,7 @@ test('workspace quota hook exposes reached states for every creatable resource',
|
||||
test('sidebar quota-disables create controls and renders a tooltip', () => {
|
||||
const source = fs.readFileSync(sidebarPath, 'utf8');
|
||||
const tooltip = fs.readFileSync(tooltipPath, 'utf8');
|
||||
const baseTooltip = fs.readFileSync(baseTooltipPath, 'utf8');
|
||||
assert.match(source, /useWorkspaceQuotaStatus/);
|
||||
assert.match(source, /quota\.disabled/);
|
||||
assert.match(source, /disabled=\{quota\.disabled\}/);
|
||||
@@ -65,6 +67,7 @@ test('sidebar quota-disables create controls and renders a tooltip', () => {
|
||||
assert.match(tooltip, /tabIndex=\{0\}/);
|
||||
assert.match(tooltip, /max-w-72 text-left/);
|
||||
assert.doesNotMatch(tooltip, /text-center/);
|
||||
assert.doesNotMatch(baseTooltip, /text-balance/);
|
||||
assert.match(source, /config\.id === 'add-extension'/);
|
||||
assert.doesNotMatch(
|
||||
source,
|
||||
|
||||
Reference in New Issue
Block a user