Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/button #136

Merged
merged 17 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 44 additions & 36 deletions .storybook/__snapshots__/storybook_snapshot.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Array [
className="li"
>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "20px",
Expand All @@ -46,7 +46,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "20px",
Expand Down Expand Up @@ -83,7 +83,7 @@ Array [
className="li"
>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "20px",
Expand All @@ -92,7 +92,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "20px",
Expand Down Expand Up @@ -129,7 +129,7 @@ Array [
className="li"
>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "20px",
Expand All @@ -138,7 +138,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "20px",
Expand Down Expand Up @@ -186,18 +186,23 @@ Array [
<h1>
Buttons
</h1>
<button
className="button background--teachers-primary variant--rounded"
<a
aria-label="Button rounded"
background="teachers-primary"
className="button primary small leadingIcon"
href="/"
onClick={[Function]}
onKeyDown={[Function]}
onMouseEnter={[Function]}
role="button"
title="Button rounded"
>
<span
className="button-label"
className="labelSpan"
>
Button rounded
</span>
</button>
</a>
</div>
</div>,
";",
Expand All @@ -211,22 +216,22 @@ Array [
<h1>
Buttons
</h1>
<button
className="button background--pupils-secondary variant--rounded"
<a
aria-label="Button"
background="teachers-primary"
className="button secondary small leadingIcon"
href="/"
onClick={[Function]}
onKeyDown={[Function]}
onMouseEnter={[Function]}
role="button"
title="Button"
>
<span
className="button-label"
>
Button
</span>
<span
className="button-icon-wrapper"
className="iconWrapper"
>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "16px",
Expand All @@ -235,7 +240,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "16px",
Expand Down Expand Up @@ -270,7 +275,12 @@ Array [
</span>
</span>
</span>
</button>
<span
className="labelSpan"
>
Button
</span>
</a>
</div>
</div>,
";",
Expand Down Expand Up @@ -302,7 +312,7 @@ Array [
Icon Example
</h1>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "100px",
Expand All @@ -311,7 +321,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "100px",
Expand Down Expand Up @@ -340,7 +350,7 @@ Array [
Available Icons
</h2>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "24px",
Expand All @@ -349,7 +359,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "24px",
Expand All @@ -375,7 +385,7 @@ Array [
</span>
</span>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "24px",
Expand All @@ -384,7 +394,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "24px",
Expand Down Expand Up @@ -419,7 +429,7 @@ Array [
</span>
</span>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "24px",
Expand All @@ -428,7 +438,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "24px",
Expand Down Expand Up @@ -463,7 +473,7 @@ Array [
</span>
</span>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "24px",
Expand All @@ -472,7 +482,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "24px",
Expand Down Expand Up @@ -522,7 +532,7 @@ Array [
</span>
</span>
<span
className="outer-wrapper"
className="outerWrapper"
style={
Object {
"height": "24px",
Expand All @@ -531,7 +541,7 @@ Array [
}
>
<span
className="inner-wrapper"
className="innerWrapper"
style={
Object {
"height": "24px",
Expand All @@ -541,9 +551,7 @@ Array [
>
<svg
fill="currentColor"
height="24px"
viewBox="0 0 24 24"
width="24px"
viewBox="2 2 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"test": "jest --watch --collectCoverage=false",
"test:ci": "jest",
"test:storybook": "jest --config=jest.storybook.config.js",
"test:storybook:update": "npm run test:storybook -- -u",
"test:storybook:ci": "start-server-and-test storybook:static-serve http://localhost:6006 test:storybook"
},
"dependencies": {
Expand Down
8 changes: 8 additions & 0 deletions src/__tests__/__helpers__/MockedAuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ export const defaultMockedAuthProviderValue = {
export type MockedAuthProviderProps = {
value?: Partial<OakAuth>;
};
export const loggedInAuthProviderProps: MockedAuthProviderProps = {
value: {
user: {
id: "4395834",
email: "2593485932@324359483u534.com",
},
},
};
const MockedAuthProvider: FC<MockedAuthProviderProps> = ({
children,
value,
Expand Down
Loading