fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

AutomationId for auto testing is not sets

Open Koniksan opened this issue 6 years ago • 8 comments

There are properties for INavLink interface automationId: string that do nothing if we use default Office UI Fabric render method image

After some investigation in source code I saw this hard code

image

Maybe we should put there our automationId from props For example data-automationid={this.props.automationid ? this.props.automationid : 'splitbuttonprimary'}

Thanks !

Koniksan avatar Mar 10 '20 12:03 Koniksan

@Koniksan Thanks for reaching out to us. Is this a question? Or did you find a bug? It's unclear... which files are you referring to with this screenshots? I tried to find the exact ones in the screenshots but there are a lot of similar ones. Can you be very clear as to what it is you need? Which component is at question, what's the problem exactly, repro steps, codepen, etc...? Please fill out the template - that will help us be actionable.

aneeshack4 avatar Mar 10 '20 18:03 aneeshack4

Thanks for taking the time to enter an issue. However, it seems that there aren't enough details here for this issue to be actionable.

When issues are created, we need details such as:

  1. Which Fabric component and which version of the Fabric component is causing the issue
  2. What behaviors and attributes are missing or incorrect
  3. What you expected and what is actually happening
  4. Confirmation that the problem reproduces in isolation

Without a clear understanding of these details, it's not possible to take clear action on issues. We are unable to meet your expectations, properly address the root cause, and make changes without affecting the expectations of other consumers.

Please provide these additional details as you are able. The default issue template provides an outline of these details and is viewable when creating a new issue. Additionally, if this is an accessibility issue, please see Accessibility Troubleshooting in our wiki for more guidance. If these details cannot be provided, please kindly close the bug.

Thank you for your patience.

msft-github-bot avatar Mar 10 '20 18:03 msft-github-bot

Hello, sorry for not complete bug report Here is my example code according to your documentation https://codepen.io/Koniksan/pen/KKpQqYJ?editors=1010

I am trying to add automationId property to link image

and get default value in DOM tree image

I checked source code BaseButton.tsx and at line 299 saw this : image So I made an assumption that we do nothing with automationId property and should fix this moment for example like this image

  1. Which Fabric component and which version of the Fabric component is causing the issue <Nav /> component , Fabric version 7.90.0

  2. What behaviors and attributes are missing or incorrect property automationId in INavLink interface

  3. What you expected and what is actually happening Expectation: sets data-automation attribute for link Actual result: data-automation is sets to DOM element

  4. Confirmation that the problem reproduces in isolation https://codepen.io/Koniksan/pen/KKpQqYJ?editors=1010

Koniksan avatar Mar 11 '20 14:03 Koniksan

@aneeshack4

Gentle ping that this issue needs attention.

msft-github-bot avatar Mar 25 '20 15:03 msft-github-bot

@Koniksan Thanks for the actionable info and apologies for the delay. The only mention of these props I see in the Nav code is in a snapshot and in the types file, no where in the actual logic (base file) which makes me think this is just the default behavior - I ping'd the component owner to double check and will follow up when I hear back from them.

aneeshack4 avatar Mar 25 '20 22:03 aneeshack4

@jdhuntington the component author made this to unblock you for now @Koniksan https://codepen.io/jdh-msft/pen/mdJQrLZ?editors=0010. AutomationId needs to be deprecated though - further work on Nav is not likely to happen at the moment.

aneeshack4 avatar Mar 25 '20 22:03 aneeshack4

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fabric React!

msft-github-bot avatar Mar 29 '20 23:03 msft-github-bot

@aneeshack4

@jdhuntington the component author made this to unblock you for now @Koniksan https://codepen.io/jdh-msft/pen/mdJQrLZ?editors=0010. AutomationId needs to be deprecated though - further work on Nav is not likely to happen at the moment.

That is how I am doing it right now =) Just hoped to use default props of the component Any way thanks for the replying 👍

Koniksan avatar Apr 02 '20 15:04 Koniksan