packages/snapshot-tests/src/scenarios/element/scenarios.events.ts
import {cucumber} from '../../transformer/gherkin'; import type {TestEnv} from '../scenarios.env'; Similar blocks of code found in 2 locations. Consider refactoring.cucumber.defineRule('click element', async ({elements}: TestEnv) => { if (!elements.length) throw new Error('E2E: No elements found'); await elements[0].click();}); Similar blocks of code found in 2 locations. Consider refactoring.cucumber.defineRule('hover element', async ({elements}: TestEnv) => { if (!elements.length) throw new Error('E2E: No elements found'); await elements[0].hover();});