From 5792d9c2c3b5ae6e01d246e8ddde56149be45dff Mon Sep 17 00:00:00 2001 From: Duong Pham Date: Thu, 16 Jul 2020 14:11:19 +0700 Subject: [PATCH] fix: #1920 element next jest test config --- packages/elements-next/doczrc.js | 1 + packages/elements-next/jest.config.js | 4 +-- .../src/components/headings/headings.mdx | 3 +- .../__snapshots__/modal.test.tsx.snap | 33 +++++++++++++++++++ .../src/components/modal/index.ts | 2 +- scripts/release/utils.js | 4 +++ 6 files changed, 43 insertions(+), 4 deletions(-) diff --git a/packages/elements-next/doczrc.js b/packages/elements-next/doczrc.js index 4fd3986f9c..1e7a03c5cd 100644 --- a/packages/elements-next/doczrc.js +++ b/packages/elements-next/doczrc.js @@ -1,5 +1,6 @@ // TODO - a start on theming - needs some work - ideally, should look like Elements itself export default { + dest: '/public/dist', typescript: true, showDarkModeSwitch: false, themeConfig: { diff --git a/packages/elements-next/jest.config.js b/packages/elements-next/jest.config.js index 4eca8ec0b8..7637475c14 100644 --- a/packages/elements-next/jest.config.js +++ b/packages/elements-next/jest.config.js @@ -2,13 +2,13 @@ const baseConfig = require('../../scripts/jest/jest.config') module.exports = { ...baseConfig, - testPathIgnorePatterns: ['/src/tests/'], + testPathIgnorePatterns: ['/src/tests/', 'dist', '.docz', 'config'], collectCoverageFrom: [ "src/**/*.{js,jsx,ts,tsx}", "!src/**/*.d.ts" ], coveragePathIgnorePatterns: [ - '[/\\\\](node_modules|src/tests)[/\\\\]', + '[/\\\\](node_modules|src/tests|dist|.docz|config)[/\\\\]', 'src/index.tsx', 'index.ts' ], diff --git a/packages/elements-next/src/components/headings/headings.mdx b/packages/elements-next/src/components/headings/headings.mdx index 267e953741..88bead517d 100644 --- a/packages/elements-next/src/components/headings/headings.mdx +++ b/packages/elements-next/src/components/headings/headings.mdx @@ -8,9 +8,10 @@ import { Heading } from './headings' import { DocsWrapper } from '@/utils/docs-wrapper' # Heading - +## Document +## Usage Heading Main diff --git a/packages/elements-next/src/components/modal/__tests__/__snapshots__/modal.test.tsx.snap b/packages/elements-next/src/components/modal/__tests__/__snapshots__/modal.test.tsx.snap index db216d1247..a93dc44690 100644 --- a/packages/elements-next/src/components/modal/__tests__/__snapshots__/modal.test.tsx.snap +++ b/packages/elements-next/src/components/modal/__tests__/__snapshots__/modal.test.tsx.snap @@ -2,7 +2,18 @@ exports[`modal Modal should match snapshot 1`] = ` @@ -14,7 +25,18 @@ exports[`modal Modal should match snapshot 1`] = ` exports[`modal Modal should match snapshot when isCentered 1`] = ` @@ -26,7 +48,18 @@ exports[`modal Modal should match snapshot when isCentered 1`] = ` exports[`modal Modal should match snapshot when not show modal 1`] = ` diff --git a/packages/elements-next/src/components/modal/index.ts b/packages/elements-next/src/components/modal/index.ts index de33b70b7c..9273cf5690 100644 --- a/packages/elements-next/src/components/modal/index.ts +++ b/packages/elements-next/src/components/modal/index.ts @@ -1,2 +1,2 @@ export { default } from './modal' -export { ModalProps } from './modal' \ No newline at end of file +export { ModalProps } from './modal' diff --git a/scripts/release/utils.js b/scripts/release/utils.js index caca55b25f..2dcdbe3d91 100644 --- a/scripts/release/utils.js +++ b/scripts/release/utils.js @@ -278,6 +278,7 @@ const BUCKET_NAMES = { 'site-builder': 'reapit-site-builder-prod', 'smb-onboarder': 'reapit-smb-prod', 'web-components': 'reapit-web-components-prod', + 'elements-next': 'reapit-elements-next-prod', }, development: { 'admin-portal': 'reapit-admin-portal-dev', @@ -292,6 +293,7 @@ const BUCKET_NAMES = { 'site-builder': 'reapit-site-builder-dev', 'smb-onboarder': 'reapit-smb-prod', 'web-components': 'reapit-web-components', + 'elements-next': 'reapit-elements-next-dev', }, } @@ -308,6 +310,7 @@ const WEB_APPS = [ 'site-builder', 'smb-onboarder', 'web-components', + 'elements-next', ] const WEB_COMPONENTS_SERVERLESS_APPS = ['search-widget', 'appointment-planner-component'] @@ -327,6 +330,7 @@ const NPM_APPS = [ 'foundations-ts-definitions', 'react-app-scaffolder', 'web-components', + 'elements-next', ] module.exports = {