Skip to content

Conversation

@cniackz
Copy link
Collaborator

@cniackz cniackz commented Feb 17, 2022

Fixes https://github.com/miniohq/engineering/issues/534

I am preparing all CSS selectors for Operator tests.
It is easier to click or text over an element when is easy to find.
In most cases, CSS selector can be created with current attributes like:

document.querySelector("a[href=\"/tenants\"]").click()
Tenant name: #tenant-name
Namespace: #namespace
Storage class: input[name="storage_class"]
Number of servers number of nodes; #nodes
#drivesps <--- Drives per Server
Total Size*: #volume_size / input[name="size_factor"]
input[name="ec_parity"] <-- Erasure Code Parity
#resourcesCPURequest
#resourcesMemoryRequest
input[name="resourcesSpecifyLimit"]

But in other cases, this is just not possible, and I was having my mind in Python/Selenium where Xpath Selectors were used in my other projects, I read a bit on XPATH in TestCafe and found some repos... Nevertheless, since our React architecture allow id additions, then I found this approach easier for now. Later in the future we can re-evaluate and see if we should rather use xpath selectors or keep improving our DOM Attributes.

dvaldivia
dvaldivia previously approved these changes Feb 17, 2022
kaankabalak
kaankabalak previously approved these changes Feb 17, 2022
@cniackz cniackz dismissed stale reviews from kaankabalak and dvaldivia via 7d81ad2 February 18, 2022 17:03
@cniackz cniackz dismissed bexsoft’s stale review February 18, 2022 17:07

I have removed the id from the icons.

@cniackz cniackz requested a review from kaankabalak February 18, 2022 18:35
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bexsoft bexsoft merged commit 28dcd19 into minio:master Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants