diff --git a/CHANGELOG.md b/CHANGELOG.md index a9210c679f17..5644654e111f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,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();