influxdata / influxdata/clockface
Some newer elements are missing the attribute data-testid
- Dominant language
- TypeScript
- Stars
- 46
- Forks
- 18
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
This is a bug for writing automated tests against applications using clockface. There is a well established idiom of using the attribute `data-testid` to locate elements to be manipulated during automated testing. When looking to click through the new compressed navbar to open alerts-history, I discovered that the element ` ` has no `data-testid`. With the word 'trigger' in the class name this is an obvious candidate element for automated testing paths. Furthermore this button is covering the anchor element which does have a `data-testid` attribute, but which does not now trigger the sub menu animation.
**To Reproduce**
Steps to reproduce the behavior:
1. Open influxdata ui
2. Open developer tools console
3. Inspect the bell icon in the navbar
4. The button element contains no `data-testid` attribute
**Expected behavior**
When writing automated tests, I expect to find `data-testid` attributes, especially in elements that are targets for user activity. Data-testids, which should not be liable to change, make automated tests more stable.
**Currently rendered HTML**
```HTML
```
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Browser**
- OS: Ubuntu 20.04
- Browser Chrome
- Version 95
Contributor guide
Research direction
Start by locating the component that renders the cf-tree-nav--sub-menu-trigger button and inspect how its neighboring navigation elements receive data-testid attributes. Add a stable test identifier to the user-activated button, then verify that the rendered compressed navbar exposes it for automated tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100