From 19f730ea6eb81f12fbf9ca5a27d74c2f90ec3340 Mon Sep 17 00:00:00 2001
From: starla huang <35161544+StarlaStarla@users.noreply.github.com>
Date: Tue, 28 Nov 2023 17:28:21 +0800
Subject: [PATCH] Macro: #3598- Fix CI test command and unit tests (#3586)
* fix test command
* fix unit tests
---
package.json | 2 +-
.../src/Editor.test.tsx | 30 -
.../src/__snapshots__/Editor.test.tsx.snap | 1068 -----------------
.../contextMenu/RNAContextMenu.test.tsx | 17 +-
.../menu/__snapshots__/Menu.test.tsx.snap | 34 +-
.../components/modal/Delete/Delete.test.tsx | 6 +-
.../Delete/__snapshots__/Delete.test.tsx.snap | 49 +-
.../src/components/modal/Open/Open.test.tsx | 51 +-
.../OpenOptions/FileDrop/FileDrop.test.tsx | 10 +-
.../__snapshots__/FileDrop.test.tsx.snap | 68 +-
.../Open/OpenOptions/OpenOptions.test.tsx | 12 +-
.../__snapshots__/OpenOptions.test.tsx.snap | 260 ++--
.../Open/__snapshots__/Open.test.tsx.snap | 198 +--
.../src/components/modal/save/Save.test.tsx | 25 +-
.../save/__snapshots__/Save.test.tsx.snap | 212 ++--
.../RnaAccordion/RnaAccordion.test.tsx | 11 +-
.../__snapshots__/RnaAccordion.test.tsx.snap | 150 +--
.../RnaEditorExpanded.test.tsx | 36 +-
.../RnaEditorExpanded.test.tsx.snap | 140 ++-
.../RnaPresetItem/RnaPresetItem.test.tsx | 2 +-
.../__snapshots__/MonomerGroup.test.tsx.snap | 63 +-
.../monomerLibraryItem/MonomerItem.test.tsx | 2 +-
.../__snapshots__/MonomerList.test.tsx.snap | 42 +-
.../components/rna/Switcher/Switcher.test.tsx | 2 +-
.../modal/__snapshots__/Modal.test.tsx.snap | 18 +-
.../src/helpers/getDefaultPresets.test.tsx | 20 +-
.../src/testMockData/monomerPresets.ts | 8 +-
27 files changed, 817 insertions(+), 1719 deletions(-)
delete mode 100644 packages/ketcher-polymer-editor-react/src/Editor.test.tsx
delete mode 100644 packages/ketcher-polymer-editor-react/src/__snapshots__/Editor.test.tsx.snap
diff --git a/package.json b/package.json
index d759661600..07a44e1294 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"build:packages": "npm run build:core && run-p build:standalone build:react && npm run build:polymer-editor",
"build:example": "npm run build -w example",
"build:demo": "npm run build:packages && npm run build -w demo",
- "test": "npm run test --workspace=packages/ketcher-core --workspace=packages/ketcher-react --workspace=packages/ketcher-standalone --workspace=packages/ketcher-standalone",
+ "test": "npm run test --workspace=packages/ketcher-core --workspace=packages/ketcher-react --workspace=packages/ketcher-standalone --workspace=packages/ketcher-polymer-editor-react",
"check:autotests": "cd ketcher-autotests && npm run check:code",
"serve:remote": "cd example && npm run serve:remote",
"serve:standalone": "cd example && npm run serve:standalone",
diff --git a/packages/ketcher-polymer-editor-react/src/Editor.test.tsx b/packages/ketcher-polymer-editor-react/src/Editor.test.tsx
deleted file mode 100644
index cb1d4255d6..0000000000
--- a/packages/ketcher-polymer-editor-react/src/Editor.test.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************************
- * Copyright 2021 EPAM Systems
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***************************************************************************/
-
-import { render, screen } from '@testing-library/react';
-import { Editor } from './Editor';
-
-describe('Editor', () => {
- it('should be rendered correctly', () => {
- expect(render(