From 5c44194ac970b863a5da5e161a407dd6e675d3d3 Mon Sep 17 00:00:00 2001 From: Devin Fee Date: Wed, 19 Dec 2018 13:13:54 -0800 Subject: [PATCH] added propTypes for layaout --- .../__snapshots__/index.test.ts.snap | 148 ++++++++++++++++++ src/layout/footer/__tests__/footer.test.tsx | 7 +- src/layout/footer/footer.tsx | 28 ++-- src/layout/hero/__tests__/hero-body.test.tsx | 7 +- src/layout/hero/__tests__/hero-foot.test.tsx | 7 +- src/layout/hero/__tests__/hero-head.test.tsx | 7 +- src/layout/hero/__tests__/hero.test.tsx | 15 +- src/layout/hero/hero-body.tsx | 28 ++-- src/layout/hero/hero-foot.tsx | 28 ++-- src/layout/hero/hero-head.tsx | 28 ++-- src/layout/hero/hero.tsx | 19 ++- src/layout/section/__tests__/section.test.tsx | 12 +- src/layout/section/section.tsx | 35 +++-- 13 files changed, 305 insertions(+), 64 deletions(-) diff --git a/src/__tests__/__snapshots__/index.test.ts.snap b/src/__tests__/__snapshots__/index.test.ts.snap index 8dc7196e..680f648b 100644 --- a/src/__tests__/__snapshots__/index.test.ts.snap +++ b/src/__tests__/__snapshots__/index.test.ts.snap @@ -883,6 +883,30 @@ Object { "defaultProps": Object { "as": "div", }, + "propTypes": Object { + "as": [Function], + "backgroundColor": [Function], + "className": [Function], + "clearfix": [Function], + "clipped": [Function], + "hidden": [Function], + "invisible": [Function], + "italic": [Function], + "marginless": [Function], + "overlay": [Function], + "paddingless": [Function], + "pull": [Function], + "radiusless": [Function], + "responsive": [Function], + "shadowless": [Function], + "srOnly": [Function], + "textAlignment": [Function], + "textColor": [Function], + "textSize": [Function], + "textTransform": [Function], + "textWeight": [Function], + "unselectable": [Function], + }, "render": [Function], }, "Generic": Object { @@ -986,6 +1010,30 @@ Object { "defaultProps": Object { "as": "div", }, + "propTypes": Object { + "as": [Function], + "backgroundColor": [Function], + "className": [Function], + "clearfix": [Function], + "clipped": [Function], + "hidden": [Function], + "invisible": [Function], + "italic": [Function], + "marginless": [Function], + "overlay": [Function], + "paddingless": [Function], + "pull": [Function], + "radiusless": [Function], + "responsive": [Function], + "shadowless": [Function], + "srOnly": [Function], + "textAlignment": [Function], + "textColor": [Function], + "textSize": [Function], + "textTransform": [Function], + "textWeight": [Function], + "unselectable": [Function], + }, "render": [Function], }, "Foot": Object { @@ -993,6 +1041,30 @@ Object { "defaultProps": Object { "as": "div", }, + "propTypes": Object { + "as": [Function], + "backgroundColor": [Function], + "className": [Function], + "clearfix": [Function], + "clipped": [Function], + "hidden": [Function], + "invisible": [Function], + "italic": [Function], + "marginless": [Function], + "overlay": [Function], + "paddingless": [Function], + "pull": [Function], + "radiusless": [Function], + "responsive": [Function], + "shadowless": [Function], + "srOnly": [Function], + "textAlignment": [Function], + "textColor": [Function], + "textSize": [Function], + "textTransform": [Function], + "textWeight": [Function], + "unselectable": [Function], + }, "render": [Function], }, "Head": Object { @@ -1000,11 +1072,62 @@ Object { "defaultProps": Object { "as": "div", }, + "propTypes": Object { + "as": [Function], + "backgroundColor": [Function], + "className": [Function], + "clearfix": [Function], + "clipped": [Function], + "hidden": [Function], + "invisible": [Function], + "italic": [Function], + "marginless": [Function], + "overlay": [Function], + "paddingless": [Function], + "pull": [Function], + "radiusless": [Function], + "responsive": [Function], + "shadowless": [Function], + "srOnly": [Function], + "textAlignment": [Function], + "textColor": [Function], + "textSize": [Function], + "textTransform": [Function], + "textWeight": [Function], + "unselectable": [Function], + }, "render": [Function], }, "defaultProps": Object { "as": "section", }, + "propTypes": Object { + "as": [Function], + "backgroundColor": [Function], + "className": [Function], + "clearfix": [Function], + "clipped": [Function], + "color": [Function], + "gradient": [Function], + "hidden": [Function], + "invisible": [Function], + "italic": [Function], + "marginless": [Function], + "overlay": [Function], + "paddingless": [Function], + "pull": [Function], + "radiusless": [Function], + "responsive": [Function], + "shadowless": [Function], + "size": [Function], + "srOnly": [Function], + "textAlignment": [Function], + "textColor": [Function], + "textSize": [Function], + "textTransform": [Function], + "textWeight": [Function], + "unselectable": [Function], + }, "render": [Function], }, "Highlight": Object { @@ -1725,6 +1848,31 @@ Object { "defaultProps": Object { "as": "section", }, + "propTypes": Object { + "as": [Function], + "backgroundColor": [Function], + "className": [Function], + "clearfix": [Function], + "clipped": [Function], + "hidden": [Function], + "invisible": [Function], + "italic": [Function], + "marginless": [Function], + "overlay": [Function], + "paddingless": [Function], + "pull": [Function], + "radiusless": [Function], + "responsive": [Function], + "shadowless": [Function], + "size": [Function], + "srOnly": [Function], + "textAlignment": [Function], + "textColor": [Function], + "textSize": [Function], + "textTransform": [Function], + "textWeight": [Function], + "unselectable": [Function], + }, "render": [Function], }, "Select": Object { diff --git a/src/layout/footer/__tests__/footer.test.tsx b/src/layout/footer/__tests__/footer.test.tsx index 6fbeca8d..8b80398f 100644 --- a/src/layout/footer/__tests__/footer.test.tsx +++ b/src/layout/footer/__tests__/footer.test.tsx @@ -3,7 +3,7 @@ import React from "react"; import { Footer } from "../footer"; -import { hasProperties } from "@/__tests__/testing"; +import { hasProperties, testGenericPropTypes } from "@/__tests__/testing"; describe("Footer component", () => { hasProperties(Footer, { @@ -46,4 +46,9 @@ describe("Footer component", () => { const wrapper = Enzyme.shallow(