-
Notifications
You must be signed in to change notification settings - Fork 1
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
[BI-972] - Testing Automation Framework (TAF) Button ID selectors #97
Conversation
@@ -112,6 +112,8 @@ | |||
@Prop() | |||
private errors!: ValidationError | string | null; | |||
|
|||
private importButtonId: string = "import-button"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to worry about collisions of id names across components? Should there be a naming convention including the component name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's something I was wondering about since I'm a little less familiar with BI. I'm open to establishing a naming convention (beyond going with lowercase and dashes for id names).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, not sure what the best approach is. In some of our old unit tests we were using the vue test utils and had a data-testid. @ctucker3 did most of the work on that and may have some input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah in my research it seemed there were mixed opinions on using id vs some custom attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have much of a preference either way. If we go with id, it makes sense to me to include the component name in some form in the id for the reusable components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that @HMS17 has done a bunch of work using IDs, I'd also vote to include component name in with the id value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added component name to the ids I have so far.
[BI-972] - Testing Automation Framework (TAF) Button ID selectors
Adding IDs to buttons to make TAF testing more robust (as opposed to using xpaths for selectors).
Convention: lowercase, separated by dashes, prefaced with component name, ie: “fileselector-choose-file”
Linked to Breeding-Insight/taf#3 which modifies associated TAF tests