Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves refactor and remove .kui* classes in tests #3853

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/setup_node_env/root/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
28 changes: 0 additions & 28 deletions test/functional/services/listing_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,34 +65,6 @@ export function ListingTableProvider({ getService, getPageObjects }: FtrProvider
await searchFilter.click();
}

private async getAllItemsNamesOnCurrentPage(): Promise<string[]> {
const visualizationNames = [];
const links = await find.allByCssSelector('.kuiLink');
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<string[]> {
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'
Expand Down