DEV Community

loading...

Discussion on: Cucumber.js with TypeScript

Collapse
domorodec profile image
Martin

Why this shows me error telling that declaration expected after @waitForSpinnerToEnd()

@then(/I wait for spinner to end/)
public static waitForSpinner() {
@waitForSpinnerToEnd()
}

export const waitForSpinnerToEnd = async () => {
await World.page.waitFor(200);
await World.page.waitFor(() => !document.querySelector('.spinner-three-bounce'), {visible: true});
};