From c5f71e5db61e8f7afd09f4b28037b974042a2735 Mon Sep 17 00:00:00 2001 From: Jennifer Kirsch Date: Tue, 30 May 2023 16:57:24 +0200 Subject: [PATCH 1/2] Additionally export TeslaS as NACS --- README.md | 2 +- __tests__/__snapshots__/main.test.tsx.snap | 260 +++++++++++++++++++++ __tests__/main.test.tsx | 21 ++ src/main.tsx | 2 + 4 files changed, 284 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b91d43..19b025c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The following components are available: * `` * `` * `` -* `` +* ` (also exported as ` All icons are available in solid and light variants as well as with- and without subtitles. diff --git a/__tests__/__snapshots__/main.test.tsx.snap b/__tests__/__snapshots__/main.test.tsx.snap index 55c77e4..c279946 100644 --- a/__tests__/__snapshots__/main.test.tsx.snap +++ b/__tests__/__snapshots__/main.test.tsx.snap @@ -520,6 +520,71 @@ exports[`react-charging-station-connector-icons Can render a light non subtitled } `; +exports[`react-charging-station-connector-icons Can render a light non subtitled NACS icon 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`react-charging-station-connector-icons Can render a light non subtitled TeslaS icon 1`] = ` { "asFragment": [Function], @@ -1105,6 +1170,71 @@ exports[`react-charging-station-connector-icons Can render a light subtitled IEC } `; +exports[`react-charging-station-connector-icons Can render a light subtitled NACS icon 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`react-charging-station-connector-icons Can render a light subtitled TeslaS icon 1`] = ` { "asFragment": [Function], @@ -1690,6 +1820,71 @@ exports[`react-charging-station-connector-icons Can render a solid non subtitled } `; +exports[`react-charging-station-connector-icons Can render a solid non subtitled NACS icon 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`react-charging-station-connector-icons Can render a solid non subtitled TeslaS icon 1`] = ` { "asFragment": [Function], @@ -2275,6 +2470,71 @@ exports[`react-charging-station-connector-icons Can render a solid subtitled IEC } `; +exports[`react-charging-station-connector-icons Can render a solid subtitled NACS icon 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`react-charging-station-connector-icons Can render a solid subtitled TeslaS icon 1`] = ` { "asFragment": [Function], diff --git a/__tests__/main.test.tsx b/__tests__/main.test.tsx index 2c084fa..46a6b5d 100644 --- a/__tests__/main.test.tsx +++ b/__tests__/main.test.tsx @@ -8,6 +8,7 @@ import { IEC62196T1Combo, IEC62196T2, IEC62196T2Combo, + NACS, TeslaS, } from '../src/main'; import {render} from '@testing-library/react'; @@ -193,6 +194,26 @@ describe('react-charging-station-connector-icons', () => { expect(rendered).toMatchSnapshot(); }); + it('Can render a light non subtitled NACS icon', () => { + const rendered = render(); + expect(rendered).toMatchSnapshot(); + }); + + it('Can render a light subtitled NACS icon', () => { + const rendered = render(); + expect(rendered).toMatchSnapshot(); + }); + + it('Can render a solid non subtitled NACS icon', () => { + const rendered = render(); + expect(rendered).toMatchSnapshot(); + }); + + it('Can render a solid subtitled NACS icon', () => { + const rendered = render(); + expect(rendered).toMatchSnapshot(); + }); + it('Throws an error for unknown variants', () => { const spy = jest.spyOn(global.console, 'error').mockImplementation(() => null); const testFunc = () => { diff --git a/src/main.tsx b/src/main.tsx index c2638ff..8af8a0a 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -118,3 +118,5 @@ export const TeslaS = (props: IconProps) => { light: {default: TeslaSLightIcon, subtitled: TeslaSLightSubtitledIcon}, }, props, props.variant, props.subtitled); }; + +export {TeslaS as NACS}; From f094f24305ce37c1bf65aec828e02bb7616ec896 Mon Sep 17 00:00:00 2001 From: Jennifer Kirsch Date: Tue, 30 May 2023 16:57:30 +0200 Subject: [PATCH 2/2] 1.1.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cf71aec..53b44f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-charging-station-connector-icons", - "version": "1.0.3", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-charging-station-connector-icons", - "version": "1.0.3", + "version": "1.1.0", "license": "CC0-1.0", "devDependencies": { "@babel/plugin-transform-runtime": "^7.16.4", diff --git a/package.json b/package.json index 8dadf58..4019e04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-charging-station-connector-icons", - "version": "1.0.3", + "version": "1.1.0", "license": "CC0-1.0", "private": false, "main": "dist/umd/react-charging-station-connector-icons.js",