You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I see link with text "How to install Playwright" should be displayed
Then I see link with text "How to install Playwright" should not be displayed
and step as below
Then( 'I see link with text {string} should( not) be displayed', async ( { page, $step }, text: string ) => {
const negate = /should not/.test( $step.title );
if ( negate ) {
await expect( page.getByRole( 'link', { name: text } ) ).toBeHidden();
} else {
await expect( page.getByRole( 'link', { name: text } ) ).toBeVisible();
}
} );
Cucumber autocomplete only identifies the negation step and fails to identify the positive step and shows as warning
Alternatively, when i use below step
Then( 'I see link with text {string} should(| not) be displayed', async ( { page, $step }, text: string ) => {
const negate = /should not/.test( $step.title );
if ( negate ) {
await expect( page.getByRole( 'link', { name: text } ) ).toBeHidden();
} else {
await expect( page.getByRole( 'link', { name: text } ) ).toBeVisible();
}
} );
Cucumber autocomplete identifies both positive and negative steps, but here bddgen fails to identify one of the steps
Please provide some solutions
The text was updated successfully, but these errors were encountered:
Problem
When I have steps like below:
and step as below
Cucumber autocomplete only identifies the negation step and fails to identify the positive step and shows as warning
Alternatively, when i use below step
Cucumber autocomplete identifies both positive and negative steps, but here bddgen fails to identify one of the steps
Please provide some solutions
The text was updated successfully, but these errors were encountered: