AutomationId for auto testing is not sets
There are properties for INavLink interface automationId: string that do nothing if we use default Office UI Fabric render method

After some investigation in source code I saw this hard code

Maybe we should put there our automationId from props
For example
data-automationid={this.props.automationid ? this.props.automationid : 'splitbuttonprimary'}
Thanks !
@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.
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:
- Which Fabric component and which version of the Fabric component is causing the issue
- What behaviors and attributes are missing or incorrect
- What you expected and what is actually happening
- 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.
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

and get default value in DOM tree

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

-
Which Fabric component and which version of the Fabric component is causing the issue
<Nav />component , Fabric version7.90.0 -
What behaviors and attributes are missing or incorrect property
automationIdin INavLink interface -
What you expected and what is actually happening Expectation: sets
data-automationattribute for link Actual result:data-automationis sets to DOM element -
Confirmation that the problem reproduces in isolation https://codepen.io/Koniksan/pen/KKpQqYJ?editors=1010
@aneeshack4
Gentle ping that this issue needs attention.
@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.
@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.
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!
@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 👍