Skip to content

Commit 04448b5

Browse files
committed
Added test ids for e2e tests
1 parent 27f7a5e commit 04448b5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

redisinsight/ui/src/components/navigation-menu/NavigationMenu.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const NavigationMenu = () => {
161161
</>
162162
)}
163163
>
164-
<div className={styles.popover}>
164+
<div className={styles.popover} data-testid="help-center">
165165
<EuiTitle size="xs">
166166
<span>Help Center</span>
167167
</EuiTitle>
@@ -173,6 +173,7 @@ const NavigationMenu = () => {
173173
className={styles.helpMenuItemLink}
174174
href="https://github.com/RedisInsight/RedisInsight/issues"
175175
target="_blank"
176+
data-testid="submit-bug-btn"
176177
>
177178
<EuiIcon type="flag" size="xl" />
178179
<EuiSpacer size="s" />
@@ -185,6 +186,7 @@ const NavigationMenu = () => {
185186
<EuiFlexItem
186187
className={styles.helpMenuItem}
187188
onClick={() => onKeyboardShortcutClick()}
189+
data-testid="shortcuts-btn"
188190
>
189191
<div className={styles.helpMenuItemLink}>
190192
<EuiIcon type="keyboardShortcut" size="xl" />
@@ -206,6 +208,7 @@ const NavigationMenu = () => {
206208
onClick={onClickReleaseNotes}
207209
href="https://docs.redis.com/staging/release-ri-v2.0/ri/release-notes/"
208210
target="_blank"
211+
data-testid="release-notes-btn"
209212
>
210213
<div className={cx({ [styles.helpMenuItemNotified]: isReleaseNotesViewed === false })}>
211214
<EuiIcon type="package" size="xl" />

redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('ShortcutsFlyout', () => {
3131

3232
SHORTCUTS.forEach((group: ShortcutGroup) => {
3333
expect(
34-
document.querySelector(`[data-test-subj="shortcut-title-${group.name}"]`)
34+
document.querySelector(`[data-test-subj="shortcuts-section-${group.name}"]`)
3535
).toBeInTheDocument()
3636
})
3737
})

redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const ShortcutsFlyout = () => {
3636

3737
const ShortcutsTable = ({ name, items }: ShortcutGroup) => (
3838
<div key={name}>
39-
<EuiTitle size="xxs" data-test-subj={`shortcut-title-${name}`}>
39+
<EuiTitle size="xxs" data-test-subj={`shortcuts-section-${name}`}>
4040
<h6>{name}</h6>
4141
</EuiTitle>
4242
<EuiSpacer size="m" />
@@ -55,9 +55,10 @@ const ShortcutsFlyout = () => {
5555
ownFocus
5656
size="538px"
5757
onClose={() => dispatch(setShortcutsFlyoutState(false))}
58+
data-test-subj="shortcuts-flyout"
5859
>
5960
<EuiFlyoutBody>
60-
<EuiTitle size="s" className={styles.title}>
61+
<EuiTitle size="s" className={styles.title} data-testid="shortcuts-title">
6162
<h4>Shortcuts</h4>
6263
</EuiTitle>
6364
<EuiSpacer size="m" />

0 commit comments

Comments
 (0)