Skip to content

Commit

Permalink
fix radio group component tests for new checkmark implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lzeiml committed Feb 26, 2025
1 parent 7b02135 commit 014dd7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/core/src/components/radio-group/test/radio-group.ct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test('initial checked', async ({ mount, page }) => {
await expect(radioOption2).toHaveClass(/hydrated/);
await expect(radioOption3).toHaveClass(/hydrated/);

await expect(radioOption2.locator('.checkmark')).toBeAttached();
await expect(radioOption2.locator('.checkmark')).toBeVisible();
});

test('change checked', async ({ mount, page }) => {
Expand All @@ -68,14 +68,14 @@ test('change checked', async ({ mount, page }) => {
await expect(radioGroupElement).toHaveClass(/hydrated/);
await expect(radioOption1).toHaveClass(/hydrated/);
await expect(radioOption2).toHaveClass(/hydrated/);
await expect(radioOption2.locator('.checkmark')).toBeAttached();
await expect(radioOption2.locator('.checkmark')).toBeVisible();
await expect(radioOption3).toHaveClass(/hydrated/);

await radioOption3.click();

await expect(radioOption2).not.toHaveAttribute('checked');
await expect(radioOption2.locator('.checkmark')).not.toBeAttached();
await expect(radioOption3.locator('.checkmark')).toBeAttached();
await expect(radioOption2.locator('.checkmark')).not.toBeVisible();
await expect(radioOption3.locator('.checkmark')).toBeVisible();
await expect(radioOption3).toHaveAttribute('checked');
});

Expand Down Expand Up @@ -119,5 +119,5 @@ test('disabled', async ({ mount, page }) => {
);
const radioOption3 = page.locator('ix-radio').nth(2);
await expect(radioOption3).not.toBeEnabled();
await expect(radioOption3.locator('.checkmark')).not.toBeAttached();
await expect(radioOption3.locator('.checkmark')).not.toBeVisible();
});

0 comments on commit 014dd7d

Please sign in to comment.