-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
360 changed files
with
12,119 additions
and
1,012 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ storybook-static/ | |
.turbo | ||
**/.storybook/jest-results.json | ||
**/bundle-report.html | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# .kodiak.toml | ||
version = 1 | ||
|
||
merge.require_automerge_label = false | ||
merge.method = "squash" | ||
|
||
[merge.automerge_dependencies] | ||
# only auto merge "minor" and "patch" version upgrades. | ||
# do not automerge "major" version upgrades. | ||
versions = ["minor", "patch"] | ||
usernames = ["dependabot", "renovate"] | ||
|
||
|
||
[merge.message] | ||
title = "pull_request_title" | ||
body = "empty" | ||
include_coauthors=true | ||
|
||
merge.blocking_labels = ["wip"] | ||
|
||
merge.prioritize_ready_to_merge = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 33 additions & 2 deletions
35
packages/fuselage/src/components/CheckBox/CheckBox.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,44 @@ | ||
import { composeStories } from '@storybook/testing-react'; | ||
import { render } from '@testing-library/react'; | ||
import { fireEvent, getByRole, render } from '@testing-library/react'; | ||
import React from 'react'; | ||
|
||
import * as stories from './CheckBox.stories'; | ||
|
||
const { Default } = composeStories(stories); | ||
const { Default, Indeterminate, Disabled, DefaultChecked } = | ||
composeStories(stories); | ||
|
||
describe('[CheckBox Component]', () => { | ||
it('renders without crashing', () => { | ||
render(<Default />); | ||
}); | ||
it('changes style of element as checkbox is checked', () => { | ||
const { container } = render(<Default />); | ||
const checkbox = getByRole(container, 'checkbox') as HTMLInputElement; | ||
fireEvent.click(checkbox); | ||
expect(checkbox.checked).toEqual(true); | ||
}); | ||
it('changes style of element as checkbox is checked/unchecked', () => { | ||
const { container } = render(<Default />); | ||
const checkbox = getByRole(container, 'checkbox') as HTMLInputElement; | ||
fireEvent.click(checkbox); | ||
fireEvent.click(checkbox); | ||
expect(checkbox.checked).toEqual(false); | ||
}); | ||
it('displays checkbox indeterminate correctly', () => { | ||
const { container } = render(<Indeterminate />); | ||
const checkbox = getByRole(container, 'checkbox') as HTMLInputElement; | ||
expect(checkbox.indeterminate).toEqual(true); | ||
}); | ||
|
||
it('displays checkbox with defaultChecked value correctly', () => { | ||
const { container } = render(<DefaultChecked />); | ||
const checkbox = getByRole(container, 'checkbox') as HTMLInputElement; | ||
expect(checkbox.defaultChecked).toEqual(true); | ||
}); | ||
|
||
it('displays checkbox disabled correctly', () => { | ||
const { container } = render(<Disabled />); | ||
const checkbox = getByRole(container, 'checkbox') as HTMLInputElement; | ||
expect(checkbox.disabled).toEqual(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.