opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 893 forks source link

Refactor usage of `.kui*` classes in tests #3387

Open joshuarrrr opened 1 year ago

joshuarrrr commented 1 year ago

The only usage I spotted was in this functional test:

https://github.com/opensearch-project/OpenSearch-Dashboards/blob/5b8a378f38bdcd1223747fddfa9b791ec3071931/test/functional/services/listing_table.ts#L70

It seems like it would be relatively straightforward to add a test id or use another existing class to identify those links.

It may also be worth just migrating/refactoring that test case to https://github.com/opensearch-project/opensearch-dashboards-functional-test as per https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2491

sayuree commented 1 year ago

@joshuarrrr So we need to rename existing class and its occurrences, right? Do we still need to migrate it to https://github.com/opensearch-project/opensearch-dashboards-functional-test?

joshuarrrr commented 1 year ago

So we need to rename existing class and its occurrences, right?

Yeah, although it will need some investigation - you may not even need to rename the class if there's another way to reference those elements. Or a test-id may be a better choice.

Do we still need to migrate it to https://github.com/opensearch-project/opensearch-dashboards-functional-test?

Yes, but let's do that in a separate PR. So the first PR will remove the class and update the existing test, and the second PR will be to migrate/recreate the test in the functional test repository.

Aigerim-ai commented 1 year ago

I spotted kui here as well, but I it has its test ID

Screenshot 2023-04-02 at 13 48 45