Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Updated snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Ria Jha committed Aug 20, 2018
1 parent 96d86f1 commit 50660ca
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 25 deletions.
302 changes: 286 additions & 16 deletions game_frontend/src/components/GameMenu/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,14 +1,284 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<ExitButton /> renders correctly 1`] = `
<styled.nav>
<Styled(WithStyles(IconButton))
aria-label="Close"
href="/aimmo"
>
<CloseIcon />
</Styled(WithStyles(IconButton))>
</styled.nav>
.c0 {
position: relative;
float: right;
right: 16px;
top: 16px;
}
<WithStyles(IconButton)
className="c0"
theme={
Object {
"additionalVariables": Object {
"typography": Object {
"code": Object {
"fontFamily": "'Source Code Pro', monospace",
"fontSize": "1rem",
},
},
},
"breakpoints": Object {
"between": [Function],
"down": [Function],
"keys": Array [
"xs",
"sm",
"md",
"lg",
"xl",
],
"only": [Function],
"up": [Function],
"values": Object {
"lg": 1280,
"md": 960,
"sm": 600,
"xl": 1920,
"xs": 0,
},
"width": [Function],
},
"direction": "ltr",
"mixins": Object {
"gutters": [Function],
"toolbar": Object {
"@media (min-width:0px) and (orientation: landscape)": Object {
"minHeight": 48,
},
"@media (min-width:600px)": Object {
"minHeight": 64,
},
"minHeight": 56,
},
},
"overrides": Object {},
"palette": Object {
"action": Object {
"active": "#fff",
"disabled": "rgba(255, 255, 255, 0.3)",
"disabledBackground": "rgba(255, 255, 255, 0.12)",
"hover": "rgba(255, 255, 255, 0.1)",
"hoverOpacity": 0.1,
"selected": "rgba(255, 255, 255, 0.2)",
},
"augmentColor": [Function],
"background": Object {
"default": "#303030",
"paper": "#424242",
},
"common": Object {
"black": "#000",
"white": "#fff",
},
"contrastThreshold": 3,
"divider": "rgba(255, 255, 255, 0.12)",
"error": Object {
"contrastText": "#fff",
"dark": "#d32f2f",
"light": "#e57373",
"main": "#f44336",
},
"getContrastText": [Function],
"grey": Object {
"100": "#f5f5f5",
"200": "#eeeeee",
"300": "#e0e0e0",
"400": "#bdbdbd",
"50": "#fafafa",
"500": "#9e9e9e",
"600": "#757575",
"700": "#616161",
"800": "#424242",
"900": "#212121",
"A100": "#d5d5d5",
"A200": "#aaaaaa",
"A400": "#303030",
"A700": "#616161",
},
"primary": Object {
"contrastText": "rgba(0, 0, 0, 0.87)",
"dark": "rgb(178, 178, 178)",
"light": "rgb(255, 255, 255)",
"main": "#FFFFFF",
},
"secondary": Object {
"contrastText": "rgba(0, 0, 0, 0.87)",
"dark": "rgb(144, 143, 137)",
"light": "rgb(216, 215, 208)",
"main": "#CFCDC5",
},
"text": Object {
"disabled": "rgba(255, 255, 255, 0.5)",
"hint": "rgba(255, 255, 255, 0.5)",
"icon": "rgba(255, 255, 255, 0.5)",
"primary": "#fff",
"secondary": "rgba(255, 255, 255, 0.7)",
},
"tonalOffset": 0.2,
"type": "dark",
},
"props": Object {},
"shadows": Array [
"none",
"0px 1px 3px 0px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 2px 1px -1px rgba(0, 0, 0, 0.12)",
"0px 1px 5px 0px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 3px 1px -2px rgba(0, 0, 0, 0.12)",
"0px 1px 8px 0px rgba(0, 0, 0, 0.2),0px 3px 4px 0px rgba(0, 0, 0, 0.14),0px 3px 3px -2px rgba(0, 0, 0, 0.12)",
"0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0, 0, 0, 0.12)",
"0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 5px 8px 0px rgba(0, 0, 0, 0.14),0px 1px 14px 0px rgba(0, 0, 0, 0.12)",
"0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0, 0, 0, 0.12)",
"0px 4px 5px -2px rgba(0, 0, 0, 0.2),0px 7px 10px 1px rgba(0, 0, 0, 0.14),0px 2px 16px 1px rgba(0, 0, 0, 0.12)",
"0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0, 0, 0, 0.12)",
"0px 5px 6px -3px rgba(0, 0, 0, 0.2),0px 9px 12px 1px rgba(0, 0, 0, 0.14),0px 3px 16px 2px rgba(0, 0, 0, 0.12)",
"0px 6px 6px -3px rgba(0, 0, 0, 0.2),0px 10px 14px 1px rgba(0, 0, 0, 0.14),0px 4px 18px 3px rgba(0, 0, 0, 0.12)",
"0px 6px 7px -4px rgba(0, 0, 0, 0.2),0px 11px 15px 1px rgba(0, 0, 0, 0.14),0px 4px 20px 3px rgba(0, 0, 0, 0.12)",
"0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0, 0, 0, 0.12)",
"0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 13px 19px 2px rgba(0, 0, 0, 0.14),0px 5px 24px 4px rgba(0, 0, 0, 0.12)",
"0px 7px 9px -4px rgba(0, 0, 0, 0.2),0px 14px 21px 2px rgba(0, 0, 0, 0.14),0px 5px 26px 4px rgba(0, 0, 0, 0.12)",
"0px 8px 9px -5px rgba(0, 0, 0, 0.2),0px 15px 22px 2px rgba(0, 0, 0, 0.14),0px 6px 28px 5px rgba(0, 0, 0, 0.12)",
"0px 8px 10px -5px rgba(0, 0, 0, 0.2),0px 16px 24px 2px rgba(0, 0, 0, 0.14),0px 6px 30px 5px rgba(0, 0, 0, 0.12)",
"0px 8px 11px -5px rgba(0, 0, 0, 0.2),0px 17px 26px 2px rgba(0, 0, 0, 0.14),0px 6px 32px 5px rgba(0, 0, 0, 0.12)",
"0px 9px 11px -5px rgba(0, 0, 0, 0.2),0px 18px 28px 2px rgba(0, 0, 0, 0.14),0px 7px 34px 6px rgba(0, 0, 0, 0.12)",
"0px 9px 12px -6px rgba(0, 0, 0, 0.2),0px 19px 29px 2px rgba(0, 0, 0, 0.14),0px 7px 36px 6px rgba(0, 0, 0, 0.12)",
"0px 10px 13px -6px rgba(0, 0, 0, 0.2),0px 20px 31px 3px rgba(0, 0, 0, 0.14),0px 8px 38px 7px rgba(0, 0, 0, 0.12)",
"0px 10px 13px -6px rgba(0, 0, 0, 0.2),0px 21px 33px 3px rgba(0, 0, 0, 0.14),0px 8px 40px 7px rgba(0, 0, 0, 0.12)",
"0px 10px 14px -6px rgba(0, 0, 0, 0.2),0px 22px 35px 3px rgba(0, 0, 0, 0.14),0px 8px 42px 7px rgba(0, 0, 0, 0.12)",
"0px 11px 14px -7px rgba(0, 0, 0, 0.2),0px 23px 36px 3px rgba(0, 0, 0, 0.14),0px 9px 44px 8px rgba(0, 0, 0, 0.12)",
"0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0, 0, 0, 0.12)",
],
"shape": Object {
"borderRadius": "24px",
},
"spacing": Object {
"unit": 8,
},
"text": Object {
"secondary": "#FFFFFF",
},
"transitions": Object {
"create": [Function],
"duration": Object {
"complex": 375,
"enteringScreen": 225,
"leavingScreen": 195,
"short": 250,
"shorter": 200,
"shortest": 150,
"standard": 300,
},
"easing": Object {
"easeIn": "cubic-bezier(0.4, 0, 1, 1)",
"easeInOut": "cubic-bezier(0.4, 0, 0.2, 1)",
"easeOut": "cubic-bezier(0.0, 0, 0.2, 1)",
"sharp": "cubic-bezier(0.4, 0, 0.6, 1)",
},
"getAutoHeightDuration": [Function],
},
"typography": Object {
"body1": Object {
"color": "#fff",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "0.875rem",
"fontWeight": 500,
"lineHeight": "1.46429em",
},
"body2": Object {
"color": "#fff",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "0.875rem",
"fontWeight": 500,
"lineHeight": "1.71429em",
},
"button": Object {
"color": "#fff",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "0.875rem",
"fontWeight": 500,
"textTransform": "capitalize",
},
"caption": Object {
"color": "rgba(255, 255, 255, 0.7)",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "0.75rem",
"fontStyle": "italic",
"fontWeight": 500,
"lineHeight": "1.375em",
},
"display1": Object {
"color": "rgba(255, 255, 255, 0.7)",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "2.125rem",
"fontWeight": 700,
"lineHeight": "1.20588em",
},
"display2": Object {
"color": "rgba(255, 255, 255, 0.7)",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "2.8125rem",
"fontWeight": 700,
"lineHeight": "1.13333em",
"marginLeft": "-.02em",
},
"display3": Object {
"color": "rgba(255, 255, 255, 0.7)",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "3.5rem",
"fontWeight": 900,
"letterSpacing": "-.02em",
"lineHeight": "1.30357em",
"marginLeft": "-.02em",
},
"display4": Object {
"color": "rgba(255, 255, 255, 0.7)",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "7rem",
"fontWeight": 900,
"letterSpacing": "-.04em",
"lineHeight": "1.14286em",
"marginLeft": "-.04em",
},
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": 14,
"fontWeightLight": 300,
"fontWeightMedium": 500,
"fontWeightRegular": 400,
"headline": Object {
"color": "#fff",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "1.5rem",
"fontWeight": 400,
"lineHeight": "1.35417em",
},
"pxToRem": [Function],
"round": [Function],
"subheading": Object {
"color": "#fff",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "1rem",
"fontWeight": 400,
"lineHeight": "1.5em",
},
"title": Object {
"color": "#fff",
"fontFamily": "museo-sans,Source Code Pro",
"fontSize": "1.3125rem",
"fontWeight": 500,
"lineHeight": "1.16667em",
},
},
"zIndex": Object {
"appBar": 1100,
"drawer": 1200,
"mobileStepper": 1000,
"modal": 1300,
"snackbar": 1400,
"tooltip": 1500,
},
}
}
/>
`;

exports[`<GameMenu /> renders correctly 1`] = `
Expand All @@ -23,12 +293,12 @@ exports[`<GameMenu /> renders correctly 1`] = `
`;

exports[`<GameMenuLayout /> renders correctly 1`] = `
<styled.nav>
<Styled(WithStyles(IconButton))
aria-label="Close"
href="/aimmo"
>
<CloseIcon />
</Styled(WithStyles(IconButton))>
</styled.nav>
.c0 {
background-color: #303030;
grid-area: game-menu;
}
<nav
className="c0"
/>
`;
2 changes: 1 addition & 1 deletion game_frontend/src/components/GameMenu/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env jest */
import React from 'react'
import { GameMenu, GameMenuLayout, ExitButton } from 'components/GameMenu'
import GameMenu, {GameMenuLayout, ExitButton } from 'components/GameMenu'
import createShallowWithTheme from 'testHelpers/createShallow'

describe('<GameMenu />', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ exports[`<GameView /> matches snapshot 1`] = `
`;

exports[`<GameViewLayout /> matches snapshot 1`] = `
<styled.div>
<Unity
loader="/static/unity/Build/UnityLoader.js"
onProgress={[Function]}
src="/static/unity/Build/unity.json"
/>
</styled.div>
.c0 {
grid-area: game-view;
}
<div
className="c0"
/>
`;
2 changes: 1 addition & 1 deletion game_frontend/src/components/GameView/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env jest */
import React from 'react'
import { GameView, GameViewLayout } from 'components/GameView'
import GameView, { GameViewLayout } from 'components/GameView'
import { shallow } from 'enzyme/build/index'

describe('<GameView />', () => {
Expand Down

0 comments on commit 50660ca

Please sign in to comment.