Skip to content

Commit a3c62bc

Browse files
committed
Merge remote-tracking branch 'origin/main' into benjcooley/matrix-detection-proof
2 parents 39a26b5 + 569e65b commit a3c62bc

4 files changed

Lines changed: 35 additions & 1 deletion

File tree

browser_tests/tests/currentUserPopoverCredits.spec.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import type {
88
import type { WorkspaceTokenResponse } from '@/platform/workspace/stores/workspaceAuthStore'
99
import type { operations } from '@/types/comfyRegistryTypes'
1010
import { comfyPageFixture } from '@e2e/fixtures/ComfyPage'
11+
import { APP_URL, setupCloudApp } from '@e2e/fixtures/utils/cloudAppSetup'
12+
import { workspace } from '@e2e/fixtures/utils/workspaceMocks'
1113

1214
type CustomerBalanceResponse = NonNullable<
1315
operations['GetCustomerBalance']['responses']['200']['content']['application/json']
@@ -164,4 +166,36 @@ test.describe('Current user popover credits row', { tag: '@cloud' }, () => {
164166
const resubscribeRight = resubscribeBox!.x + resubscribeBox!.width
165167
expect(resubscribeRight).toBeLessThanOrEqual(popoverRight)
166168
})
169+
170+
test(
171+
'renders Manage plan as a plain full-width menu row',
172+
{ tag: '@screenshot' },
173+
async ({ page }) => {
174+
test.setTimeout(60_000)
175+
await setupCloudApp(page, {
176+
workspace: workspace('personal', 'owner'),
177+
features: { subscription_required: false }
178+
})
179+
await page.goto(APP_URL)
180+
await page.waitForFunction(() => !!window.app?.extensionManager, null, {
181+
timeout: 45_000
182+
})
183+
await page.getByRole('button', { name: 'Close dialog' }).click()
184+
await expect(page.getByTestId('dialog-overlay')).toBeHidden()
185+
186+
await page.getByRole('button', { name: 'Current user' }).click()
187+
188+
const managePlan = page.getByRole('button', { name: 'Manage plan' })
189+
await expect(managePlan).toBeVisible()
190+
await expect(managePlan).toHaveScreenshot('manage-plan-menu-item.png')
191+
192+
await managePlan.focus()
193+
await page.keyboard.press('Shift+Tab')
194+
await page.keyboard.press('Tab')
195+
await expect(managePlan).toBeFocused()
196+
await expect(managePlan).toHaveScreenshot(
197+
'manage-plan-menu-item-focused.png'
198+
)
199+
}
200+
)
167201
})
1.75 KB
Loading
1.83 KB
Loading

src/platform/workspace/components/CurrentUserPopoverWorkspace.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
<button
147147
v-if="!accountActionsOnly && showManagePlan"
148148
type="button"
149-
class="flex cursor-pointer items-center gap-2 px-4 py-2 hover:bg-secondary-background-hover"
149+
class="flex w-full cursor-pointer appearance-none items-center gap-2 border-0 bg-transparent px-4 py-2 text-left hover:bg-secondary-background-hover focus-visible:bg-secondary-background-hover focus-visible:outline-none"
150150
data-testid="manage-plan-menu-item"
151151
@click="handleOpenPlanAndCreditsSettings"
152152
>

0 commit comments

Comments
 (0)