From c0b950955f8b7ed423df4aaa186bd78df99769f9 Mon Sep 17 00:00:00 2001 From: Mohammer5 Date: Thu, 18 Apr 2024 09:33:07 +0800 Subject: [PATCH] chore: make cucumber evaluate local common files --- .cypress-cucumber-preprocessorrc.json | 5 ++++- components/alert/src/alert-bar/features/api/index.js | 1 - components/tooltip/src/features/positions/index.js | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.cypress-cucumber-preprocessorrc.json b/.cypress-cucumber-preprocessorrc.json index fc9870fc56..3f586a22ed 100644 --- a/.cypress-cucumber-preprocessorrc.json +++ b/.cypress-cucumber-preprocessorrc.json @@ -1,6 +1,9 @@ { "nonGlobalStepDefinitions": true, "e2e": { - "stepDefinitions": "[filepath]/*.{js,mjs,ts,tsx}" + "stepDefinitions": [ + "[filepath]/*.{js,mjs,ts,tsx}", + "[filepath]/../common/index.{js,mjs,ts,tsx}" + ] } } diff --git a/components/alert/src/alert-bar/features/api/index.js b/components/alert/src/alert-bar/features/api/index.js index b7efc5f425..69478dc80d 100644 --- a/components/alert/src/alert-bar/features/api/index.js +++ b/components/alert/src/alert-bar/features/api/index.js @@ -1,4 +1,3 @@ -require('../common/index.js') import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor' Given('an AlertBar with onHidden handler is rendered', () => { diff --git a/components/tooltip/src/features/positions/index.js b/components/tooltip/src/features/positions/index.js index 8dc2b4e2dc..718e86436c 100644 --- a/components/tooltip/src/features/positions/index.js +++ b/components/tooltip/src/features/positions/index.js @@ -1,4 +1,3 @@ -require('../common/index.js') import { Given, Then } from '@badeball/cypress-cucumber-preprocessor' const TOOLTIP_OFFSET = 4