import { Then } from '@cucumber/cucumber'; import { ContourAlert } from '../../elements/contourAlert'; import * as glue from './glue'; Then(/^I expect the contourAlert to match reference "([^"]+)?"$/, async (refFile) => { const contourAlert = new ContourAlert(); await contourAlert.getAlertContainer().compareElementImage(refFile); }); Then( /^I expect the following contourAlert to match following reference on page "([^"]+)?"$/, glue.checkContourAlertFromDataTable ); Then(/^I expect the contourAlert contain the text "([^"]+)?"$/, async (text) => { const contourAlert = new ContourAlert(); await contourAlert.getAlertContainer().checkContainsText(text); });