Skip to content

Commit

Permalink
Use data-testid for locaing button
Browse files Browse the repository at this point in the history
  • Loading branch information
farmaazon committed Feb 23, 2024
1 parent 5171474 commit 66f4251
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/gui2/e2e/componentBrowser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ test('Editing existing nodes', async ({ page }) => {

// Edit again, using "edit" button
await locate.graphNodeIcon(node).click()
await node.locator('.CircularMenu .slot6').click()
await node.getByTestId('edit-button').click()
await expect(locate.componentBrowser(page)).toBeVisible()
await expect(input).toHaveValue(`Data.read ${ADDED_PATH}`)
for (let i = 0; i < ADDED_PATH.length; ++i) await page.keyboard.press('Backspace')
Expand Down
7 changes: 6 additions & 1 deletion app/gui2/src/components/CircularMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ const emit = defineEmits<{
:modelValue="props.isVisualizationVisible"
@update:modelValue="emit('update:isVisualizationVisible', $event)"
/>
<SvgIcon name="edit" class="icon-container button slot6" @click.stop="emit('startEditing')" />
<SvgIcon
name="edit"
class="icon-container button slot6"
data-testid="edit-button"
@click.stop="emit('startEditing')"
/>
<ToggleIcon
:icon="props.isOutputContextEnabledGlobally ? 'no_auto_replay' : 'auto_replay'"
class="icon-container button slot7"
Expand Down

0 comments on commit 66f4251

Please sign in to comment.