From 70b9eeaa915915027ea1ee13c5b10800e05ee183 Mon Sep 17 00:00:00 2001 From: Anan Zhuang Date: Wed, 4 Oct 2023 22:30:44 -0700 Subject: [PATCH 1/2] [Tests-refactor] Remove angular code from plugin_functional and update tests (#5221) * remove angular-based view from DocViewsPlugin * remove the test case that validates the display and content of the angular doc view Issue Resolve https://github.com/opensearch-project/OpenSearch-Dashboards/issues/5020 Signed-off-by: ananzh --- CHANGELOG.md | 1 + .../doc_views_plugin/public/plugin.tsx | 20 ------------------- .../test_suites/doc_views/doc_views.ts | 9 --------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86874fd9d83a..54751beda36d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -110,6 +110,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### 🔩 Tests - [Tests] Add BWC tests for 2.9 and 2.10 ([#4762](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4762)) +- [Tests-refactor] Remove angular code from plugin_functional and update tests ([#5221](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5221)) ## [1.3.12 - 2023-08-10](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.12) diff --git a/test/plugin_functional/plugins/doc_views_plugin/public/plugin.tsx b/test/plugin_functional/plugins/doc_views_plugin/public/plugin.tsx index 42bd59c39a81..00bc66566eef 100644 --- a/test/plugin_functional/plugins/doc_views_plugin/public/plugin.tsx +++ b/test/plugin_functional/plugins/doc_views_plugin/public/plugin.tsx @@ -28,36 +28,16 @@ * under the License. */ -import angular from 'angular'; import React from 'react'; import { Plugin, CoreSetup } from 'opensearch-dashboards/public'; import { DiscoverSetup } from '../../../../../src/plugins/discover/public'; -angular.module('myDocView', []).directive('myHit', () => ({ - restrict: 'E', - scope: { - hit: '=hit', - }, - template: '

{{hit._index}}

', -})); - function MyHit(props: { index: string }) { return

{props.index}

; } export class DocViewsPlugin implements Plugin { public setup(core: CoreSetup, { discover }: { discover: DiscoverSetup }) { - discover.docViews.addDocView({ - directive: { - controller: function MyController($injector: any) { - $injector.loadNewModules(['myDocView']); - }, - template: ``, - }, - order: 1, - title: 'Angular doc view', - }); - discover.docViews.addDocView({ component: (props) => { return ; diff --git a/test/plugin_functional/test_suites/doc_views/doc_views.ts b/test/plugin_functional/test_suites/doc_views/doc_views.ts index dff782dc6a78..4a25bed25256 100644 --- a/test/plugin_functional/test_suites/doc_views/doc_views.ts +++ b/test/plugin_functional/test_suites/doc_views/doc_views.ts @@ -44,19 +44,10 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('should show custom doc views', async () => { await testSubjects.click('docTableExpandToggleColumn'); - const angularTab = await find.byButtonText('Angular doc view'); const reactTab = await find.byButtonText('React doc view'); - expect(await angularTab.isDisplayed()).to.be(true); expect(await reactTab.isDisplayed()).to.be(true); }); - it('should render angular doc view', async () => { - const angularTab = await find.byButtonText('Angular doc view'); - await angularTab.click(); - const angularContent = await testSubjects.find('angular-docview'); - expect(await angularContent.getVisibleText()).to.be('logstash-2015.09.22'); - }); - it('should render react doc view', async () => { const reactTab = await find.byButtonText('React doc view'); await reactTab.click(); From 62687944ee0225452871735ca1ee213d7795597d Mon Sep 17 00:00:00 2001 From: Leo Deng <105402895+Leo7Deng@users.noreply.github.com> Date: Thu, 5 Oct 2023 12:25:36 -0400 Subject: [PATCH 2/2] [OSCI] Remove ftr test from PR template (#5217) * removed ftr test step from PR template Signed-off-by: Leo Deng * change changelog Signed-off-by: Leo Deng * Update CHANGELOG.md Co-authored-by: Josh Romero Signed-off-by: Leo Deng <105402895+Leo7Deng@users.noreply.github.com> --------- Signed-off-by: Leo Deng Signed-off-by: Leo Deng <105402895+Leo7Deng@users.noreply.github.com> Co-authored-by: Josh Romero --- .github/pull_request_template.md | 1 - CHANGELOG.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2a9e814b5fe3..3cb6f172b119 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -24,7 +24,6 @@ - [ ] All tests pass - [ ] `yarn test:jest` - [ ] `yarn test:jest_integration` - - [ ] `yarn test:ftr` - [ ] New functionality includes testing. - [ ] New functionality has been documented. - [ ] Update [CHANGELOG.md](./../CHANGELOG.md) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54751beda36d..936c28613952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Doc] Add COMMUNICATIONS.md with info about Slack, forum, office hours ([#3837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3837)) - Add plugin development section in DEVELOPER_GUIDE.md ([#3989](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3989)) - [Vis Augmenter] Add documentation to `vis_augmenter` plugin ([#4527](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4527)) +- Remove ftr test step from PR template ([#5217](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5217)) ### 🛠 Maintenance