From 4cf3ec182fe969a2ba3e70a090e58486d8a4092c Mon Sep 17 00:00:00 2001 From: Aigerim Suleimenova Date: Sun, 2 Apr 2023 13:46:07 +0200 Subject: [PATCH 1/4] kui-refactor Signed-off-by: Aigerim Suleimenova --- .../timeline/public/directives/timeline_help/timeline_help.html | 2 +- test/functional/services/listing_table.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/timeline/public/directives/timeline_help/timeline_help.html b/src/plugins/timeline/public/directives/timeline_help/timeline_help.html index 583edb65a4b8..ac0e43c4a454 100644 --- a/src/plugins/timeline/public/directives/timeline_help/timeline_help.html +++ b/src/plugins/timeline/public/directives/timeline_help/timeline_help.html @@ -421,7 +421,7 @@

. + i18n-default-message="Check out the tutorial" ng-click="setPage(1)" data-test-subj="setFirstPage" osd-accessible-click>.
diff --git a/test/functional/services/listing_table.ts b/test/functional/services/listing_table.ts index 8d94d1d3a69f..5be544f213ec 100644 --- a/test/functional/services/listing_table.ts +++ b/test/functional/services/listing_table.ts @@ -67,7 +67,7 @@ export function ListingTableProvider({ getService, getPageObjects }: FtrProvider private async getAllItemsNamesOnCurrentPage(): Promise { const visualizationNames = []; - const links = await find.allByCssSelector('.kuiLink'); + const links = await find.allByCssSelector('data-test-subj^="setFirstPage"'); for (let i = 0; i < links.length; i++) { visualizationNames.push(await links[i].getVisibleText()); } From 79a99c4605f908e459b05a91832fb24f9b420de3 Mon Sep 17 00:00:00 2001 From: Aigerim Suleimenova Date: Thu, 6 Apr 2023 00:07:50 +0200 Subject: [PATCH 2/4] [TEST]depricated Signed-off-by: Aigerim Suleimenova --- CHANGELOG.md | 4 +-- .../timeline_help/timeline_help.html | 2 +- src/setup_node_env/root/index.js | 2 -- test/functional/services/listing_table.ts | 28 ------------------- 4 files changed, 3 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6178d1836203..1aa60b9453fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -165,7 +165,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Vis Builder] Adds field unit tests ([#3211](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3211)) - [BWC Tests] Add BWC tests for 2.6.0 ([#3356](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3356)) - Prevent primitive linting limitations from being applied to unit tests found under `src/setup_node_env` ([#3403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3403)) - +- Removed functions which are no longer in use([#3766](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3766)) ## [2.x] ### 💥 Breaking Changes @@ -233,6 +233,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Update caniuse to fix failed integration tests ([#2322](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2322)) - Update caniuse to 1.0.30001460 to fix failed integration tests ([#3538](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3538)) - +- Removed functions which are no longer in use([#3766](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3766)) [unreleased]: https://github.com/opensearch-project/OpenSearch-Dashboards/compare/2.3.0...HEAD [2.x]: https://github.com/opensearch-project/OpenSearch-Dashboards/compare/2.3.0...2.x diff --git a/src/plugins/timeline/public/directives/timeline_help/timeline_help.html b/src/plugins/timeline/public/directives/timeline_help/timeline_help.html index ac0e43c4a454..583edb65a4b8 100644 --- a/src/plugins/timeline/public/directives/timeline_help/timeline_help.html +++ b/src/plugins/timeline/public/directives/timeline_help/timeline_help.html @@ -421,7 +421,7 @@

. + i18n-default-message="Check out the tutorial" class="kuiLink" ng-click="setPage(1)" osd-accessible-click>.

diff --git a/src/setup_node_env/root/index.js b/src/setup_node_env/root/index.js index 2ddbff61bc60..ebca28de2843 100644 --- a/src/setup_node_env/root/index.js +++ b/src/setup_node_env/root/index.js @@ -29,10 +29,8 @@ */ var force = require('./force')(process.argv); - var uid = process.getuid && process.getuid(); var isRoot = require('./is_root')(uid); - if (isRoot && !force) { console.error('OpenSearch Dashboards should not be run as root. Use --allow-root to continue.'); process.exit(1); diff --git a/test/functional/services/listing_table.ts b/test/functional/services/listing_table.ts index 5be544f213ec..2c256a8c3551 100644 --- a/test/functional/services/listing_table.ts +++ b/test/functional/services/listing_table.ts @@ -65,34 +65,6 @@ export function ListingTableProvider({ getService, getPageObjects }: FtrProvider await searchFilter.click(); } - private async getAllItemsNamesOnCurrentPage(): Promise { - const visualizationNames = []; - const links = await find.allByCssSelector('data-test-subj^="setFirstPage"'); - for (let i = 0; i < links.length; i++) { - visualizationNames.push(await links[i].getVisibleText()); - } - log.debug(`Found ${visualizationNames.length} visualizations on current page`); - return visualizationNames; - } - - /** - * Navigates through all pages on Landing page and returns array of items names - */ - public async getAllItemsNames(): Promise { - log.debug('ListingTable.getAllItemsNames'); - let morePages = true; - let visualizationNames: string[] = []; - while (morePages) { - visualizationNames = visualizationNames.concat(await this.getAllItemsNamesOnCurrentPage()); - morePages = !((await testSubjects.getAttribute('pagerNextButton', 'disabled')) === 'true'); - if (morePages) { - await testSubjects.click('pagerNextButton'); - await header.waitUntilLoadingHasFinished(); - } - } - return visualizationNames; - } - /** * Returns items count on landing page * @param appName 'visualize' | 'dashboard' From ac76e0e43356de57142f445fb6957604219fb259 Mon Sep 17 00:00:00 2001 From: Aigerim Suleimenova Date: Sun, 16 Apr 2023 00:59:54 +0600 Subject: [PATCH 3/4] empty commit Signed-off-by: Aigerim Suleimenova From 3900b7d7949d91930af0c2760b8e52f4d087ebf4 Mon Sep 17 00:00:00 2001 From: Aigerim Suleimenova Date: Sun, 16 Apr 2023 01:08:01 +0600 Subject: [PATCH 4/4] empty commit Signed-off-by: Aigerim Suleimenova