From 21a3ca916fd32c318b73f93a55197e183b6147bc Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 4 Dec 2022 19:56:46 -0500 Subject: [PATCH] feat(actions): add "When I reload the page" --- src/actions/index.ts | 1 + src/actions/reload.ts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/actions/reload.ts diff --git a/src/actions/index.ts b/src/actions/index.ts index 29ea38eda..53c7815ac 100644 --- a/src/actions/index.ts +++ b/src/actions/index.ts @@ -1,2 +1,3 @@ export * from './click'; +export * from './reload'; export * from './visit'; diff --git a/src/actions/reload.ts b/src/actions/reload.ts new file mode 100644 index 000000000..21132601c --- /dev/null +++ b/src/actions/reload.ts @@ -0,0 +1,20 @@ +import { When } from '@badeball/cypress-cucumber-preprocessor'; + +/** + * When I reload the page: + * + * ```gherkin + * When I reload the page + * ``` + * + * @example + * + * ```gherkin + * When I reload the page + * ``` + */ +export function When_I_reload_the_page() { + cy.reload(); +} + +When('I reload the page', When_I_reload_the_page);