Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/waits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { When } from '@cucumber/cucumber';
import { getValue, getElement, getValueWait, getConditionWait } from './transformers';
import { getValidation } from '@qavajs/validation';

/**
* Wait for element condition
Expand Down Expand Up @@ -142,19 +141,3 @@ When(
await wait(getValueFn, expectedValue, config.browser.timeout.page);
}
);

/**
* Verify that text of an alert meets expectation
* @param {string} validationType - validation
* @param {string} value - expected text value
* @example I expect text of alert does not contain 'coffee'
*/
When('I wait until text of alert {playwrightValidation} {string}', async function (validationType: string, expectedValue: string) {
let alertText;
page.once('dialog', async (dialog) => {
alertText = dialog.message();
});
const validation = getValidation(validationType);
validation(alertText, expectedValue);
}
);