mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: tests for code snippet
This commit is contained in:
@@ -25,7 +25,9 @@
|
||||
</script>
|
||||
|
||||
<section class="box u-overflow-hidden u-min-height-100">
|
||||
<div class="u-position-absolute u-inset-inline-end-8 u-inset-block-start-8 u-flex u-gap-8">
|
||||
<div
|
||||
data-testid="controls"
|
||||
class="u-position-absolute u-inset-inline-end-8 u-inset-block-start-8 u-flex u-gap-8">
|
||||
{#if label}
|
||||
<Pill>{label}</Pill>
|
||||
{/if}
|
||||
|
||||
@@ -4,12 +4,12 @@ import { vi } from 'vitest';
|
||||
import { Code } from '../../../src/lib/components';
|
||||
|
||||
test('default props', async () => {
|
||||
const { container } = render(Code, {
|
||||
const { getByTestId } = render(Code, {
|
||||
code: 'console.log("test");',
|
||||
language: 'js'
|
||||
});
|
||||
|
||||
expect(container.querySelector('.controls').children.length).toEqual(0);
|
||||
expect(getByTestId('controls').children.length).toEqual(0);
|
||||
});
|
||||
|
||||
test('shows label', async () => {
|
||||
|
||||
Reference in New Issue
Block a user