Clean up test nits

This commit is contained in:
Ryan Gossiaux
2022-06-15 16:52:39 -07:00
parent 96aadb98c7
commit f431f89127
3 changed files with 14 additions and 14 deletions

View File

@@ -129,7 +129,7 @@ describe("Rendering", () => {
<button id="trigger" on:click={() => isOpen = !isOpen}>
Trigger
</button>
<Dialog open={true} on:close={console.log} static>
<Dialog open on:close={console.log} static>
<p>Contents</p>
<div tabindex={0} on:focus={focusCounter} />
</Dialog>
@@ -312,7 +312,7 @@ describe("Rendering", () => {
'DialogTitle should have slot props',
suppressConsoleLogs(async () => {
render(svelte`
<Dialog open={true} on:close={console.log}>
<Dialog open on:close={console.log}>
<DialogTitle let:open>{JSON.stringify({ open })}</DialogTitle>
<TestTabSentinel />
</Dialog>
@@ -335,7 +335,7 @@ describe("Rendering", () => {
'DialogDescription should have slot props',
suppressConsoleLogs(async () => {
render(svelte`
<Dialog open={true} on:close={console.log}>
<Dialog open on:close={console.log}>
<DialogDescription let:open>{JSON.stringify({ open })}</DialogDescription>
<TestTabSentinel />
</Dialog>
@@ -359,7 +359,7 @@ describe('Composition', () => {
'should be possible to open the Dialog via a Transition component',
suppressConsoleLogs(async () => {
render(svelte`
<Transition show={true}>
<Transition show>
<Dialog on:close={console.log}>
<DialogDescription>Description</DialogDescription>
<TestTabSentinel />
@@ -598,7 +598,7 @@ describe('Mouse interactions', () => {
let wrapperFn = jest.fn()
render(svelte`
<div on:click={wrapperFn}>
<ManagedDialog initialOpen={true}>
<ManagedDialog initialOpen>
Contents
<DialogOverlay />
<TestTabSentinel />
@@ -628,7 +628,7 @@ describe('Mouse interactions', () => {
suppressConsoleLogs(async () => {
let submitFn = jest.fn()
render(svelte`
<ManagedDialog initialOpen={true}>
<ManagedDialog initialOpen>
<form on:submit={submitFn}>
<input type="hidden" value="abc">
<button type="submit">Submit</button>
@@ -654,7 +654,7 @@ describe('Mouse interactions', () => {
let wrapperFn = jest.fn()
render(svelte`
<div on:click={wrapperFn}>
<ManagedDialog initialOpen={true} buttonInside={true} buttonText="Inside">
<ManagedDialog initialOpen buttonInside buttonText="Inside">
Contents
<TestTabSentinel />
</ManagedDialog>

View File

@@ -309,7 +309,7 @@ describe("Rendering", () => {
render(svelte`
<Disclosure>
<DisclosureButton>Trigger</DisclosureButton>
<DisclosurePanel static="true">Contents</DisclosurePanel>
<DisclosurePanel static>Contents</DisclosurePanel>
</Disclosure>
`)
@@ -498,7 +498,7 @@ describe('Keyboard interactions', () => {
suppressConsoleLogs(async () => {
render(svelte`
<Disclosure>
<DisclosureButton disabled={true}>Trigger</DisclosureButton>
<DisclosureButton disabled>Trigger</DisclosureButton>
<DisclosurePanel>Contents</DisclosurePanel>
</Disclosure>
`)
@@ -600,7 +600,7 @@ describe('Keyboard interactions', () => {
suppressConsoleLogs(async () => {
render(svelte`
<Disclosure>
<DisclosureButton disabled={true}>Trigger</DisclosureButton>
<DisclosureButton disabled>Trigger</DisclosureButton>
<DisclosurePanel>Contents</DisclosurePanel>
</Disclosure>
`)
@@ -728,7 +728,7 @@ describe('Mouse interactions', () => {
suppressConsoleLogs(async () => {
render(svelte`
<Disclosure>
<DisclosureButton disabled={true}>Trigger</DisclosureButton>
<DisclosureButton disabled>Trigger</DisclosureButton>
<DisclosurePanel>Contents</DisclosurePanel>
</Disclosure>
`)

View File

@@ -145,7 +145,7 @@ describe('Rendering', () => {
'should be possible to disable a Listbox',
suppressConsoleLogs(async () => {
render(svelte`
<Listbox value={undefined} on:change={console.log} disabled={true}>
<Listbox value={undefined} on:change={console.log} disabled>
<ListboxButton>Trigger</ListboxButton>
<ListboxOptions>
<ListboxOption value="a">Option A</ListboxOption>
@@ -416,7 +416,7 @@ describe('Rendering', () => {
render(svelte`
<Listbox value={undefined} on:change={console.log}>
<ListboxButton>Trigger</ListboxButton>
<ListboxOptions static={true}>
<ListboxOptions static>
<ListboxOption value="a">Option A</ListboxOption>
<ListboxOption value="b">Option B</ListboxOption>
<ListboxOption value="c">Option C</ListboxOption>
@@ -747,7 +747,7 @@ describe('Keyboard interactions', () => {
'should not be possible to open the listbox with Enter when the button is disabled',
suppressConsoleLogs(async () => {
render(svelte`
<Listbox value={undefined} on:change={console.log} disabled={true}>
<Listbox value={undefined} on:change={console.log} disabled>
<ListboxButton>Trigger</ListboxButton>
<ListboxOptions>
<ListboxOption value="a">Option A</ListboxOption>