From 468a84cc5b6c4e37f754c11d6c5afa41cee1f600 Mon Sep 17 00:00:00 2001 From: Valera Melnikov Date: Mon, 15 May 2023 17:23:24 +0300 Subject: [PATCH] fix: widgets-old package lint errors (#23348) ## Description 1. Fixed lint errors. 2. Removed unnecessary tests and scripts to run them. Agreed with @albinAppsmith #### Type of change - Bug fix (non-breaking change which fixes an issue) - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [x] Manual - [x] Jest - [x] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed Co-authored-by: Valera Melnikov --- .../design-system/widgets-old/package.json | 12 +- .../widgets-old/src/Button/Button.test.tsx | 46 --- .../src/Dropdown/Dropdown.test.tsx | 293 ------------------ .../widgets-old/src/Icon/Icon.test.tsx | 51 --- .../ListSegmentHeader.test.tsx | 22 -- .../widgets-old/src/Tooltip/index.tsx | 6 +- .../design-system/widgets/package.json | 6 +- app/client/packages/storybook/package.json | 4 +- 8 files changed, 9 insertions(+), 431 deletions(-) delete mode 100644 app/client/packages/design-system/widgets-old/src/Button/Button.test.tsx delete mode 100644 app/client/packages/design-system/widgets-old/src/Dropdown/Dropdown.test.tsx delete mode 100644 app/client/packages/design-system/widgets-old/src/Icon/Icon.test.tsx delete mode 100644 app/client/packages/design-system/widgets-old/src/ListSegmentHeader/ListSegmentHeader.test.tsx diff --git a/app/client/packages/design-system/widgets-old/package.json b/app/client/packages/design-system/widgets-old/package.json index 0708a2954a..b044092976 100644 --- a/app/client/packages/design-system/widgets-old/package.json +++ b/app/client/packages/design-system/widgets-old/package.json @@ -6,16 +6,8 @@ "author": "Valera Melnikov , Pawan Kumar ", "license": "Apache-2.0", "scripts": { - "storybook": "start-storybook -p 6006", - "build-storybook": "build-storybook", - "create-story": "./create_story.sh", - "test": "jest", - "test:watch": "jest --watch", - "test-storybook": "test-storybook", - "test-storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && yarn test-storybook\"", - "chromatic": "chromatic --project-token=CHROMATIC_PROJECT_TOKEN", - "lint:ci": "eslint --cache .", - "prettier:ci": "prettier --check ." + "lint": "eslint --cache .", + "prettier": "prettier --check ." }, "devDependencies": { "@svgr/webpack": "5.5.0", diff --git a/app/client/packages/design-system/widgets-old/src/Button/Button.test.tsx b/app/client/packages/design-system/widgets-old/src/Button/Button.test.tsx deleted file mode 100644 index db0dd79888..0000000000 --- a/app/client/packages/design-system/widgets-old/src/Button/Button.test.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import React from "react"; -import "@testing-library/jest-dom"; -import { render, screen } from "@testing-library/react"; -import Button, { Size } from "./index"; -import { create } from "react-test-renderer"; - -describe("