mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Place catalog publish action before toggle
This commit is contained in:
@@ -772,13 +772,6 @@ export function PersonaShareDialog({
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex shrink-0 items-center gap-2">
|
||||
<Switch
|
||||
checked={isCatalogVisible}
|
||||
data-testid="persona-share-show-in-catalog"
|
||||
disabled={isPending}
|
||||
id={switchId}
|
||||
onCheckedChange={onCatalogVisibilityChange}
|
||||
/>
|
||||
{isCatalogVisible && hasCatalogUpdates ? (
|
||||
<Button
|
||||
data-testid="persona-share-publish-catalog-updates"
|
||||
@@ -790,6 +783,13 @@ export function PersonaShareDialog({
|
||||
Publish updates
|
||||
</Button>
|
||||
) : null}
|
||||
<Switch
|
||||
checked={isCatalogVisible}
|
||||
data-testid="persona-share-show-in-catalog"
|
||||
disabled={isPending}
|
||||
id={switchId}
|
||||
onCheckedChange={onCatalogVisibilityChange}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
@@ -1407,9 +1407,10 @@ This deliberately long fenced-code example must not establish the minimum width
|
||||
catalogToggle.boundingBox(),
|
||||
publishCatalogUpdatesButton.boundingBox(),
|
||||
]);
|
||||
expect(publishCatalogUpdatesButtonBox?.x ?? 0).toBeGreaterThan(
|
||||
(catalogToggleBox?.x ?? 0) + (catalogToggleBox?.width ?? 0),
|
||||
);
|
||||
expect(
|
||||
(publishCatalogUpdatesButtonBox?.x ?? 0) +
|
||||
(publishCatalogUpdatesButtonBox?.width ?? 0),
|
||||
).toBeLessThan(catalogToggleBox?.x ?? 0);
|
||||
await publishCatalogUpdatesButton.click();
|
||||
await expect(publishCatalogUpdatesButton).toHaveCount(0);
|
||||
await expect(catalogToggle).toHaveAttribute("aria-checked", "true");
|
||||
|
||||
Reference in New Issue
Block a user