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

[BI-972] - Testing Automation Framework (TAF) Button ID selectors #97

Merged
merged 7 commits into from
Jul 14, 2021

Conversation

HMS17
Copy link
Contributor

@HMS17 HMS17 commented Jul 6, 2021

Adding IDs to buttons to make TAF testing more robust (as opposed to using xpaths for selectors).

  • Download the Trait Import Template
  • Choose a file…
  • Choose a different file…
  • Import
  • Yes, abort
  • Log out
  • Home
  • Import File
  • Program Management
  • Traits
  • BrAPI
  • Users
  • Programs

Convention: lowercase, separated by dashes, prefaced with component name, ie: “fileselector-choose-file”

Linked to Breeding-Insight/taf#3 which modifies associated TAF tests

@HMS17 HMS17 requested review from a team, timparsons and davedrp and removed request for a team July 6, 2021 19:08
@timparsons timparsons requested review from nickpalladino and removed request for davedrp July 6, 2021 19:32
@@ -112,6 +112,8 @@
@Prop()
private errors!: ValidationError | string | null;

private importButtonId: string = "import-button";
Copy link
Member

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?

Copy link
Contributor Author

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).

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@HMS17 HMS17 marked this pull request as ready for review July 9, 2021 13:48
@HMS17 HMS17 merged commit 555a139 into develop Jul 14, 2021
@HMS17 HMS17 deleted the feature/BI-972 branch July 14, 2021 14:37
timparsons pushed a commit that referenced this pull request Sep 29, 2021
[BI-972] - Testing Automation Framework (TAF) Button ID selectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants