FLabelPageObject: errorIcon() method
Hämtar elementet med etikettens felikon.
Syntax
errorIcon();
Returvärde
HTMLElement
som innehåller etikettens felikon.
Exempel
<template>
<f-validation-form>
<f-text-field v-validation.required v-test="'awesome-label'"> Etikett </f-text-field>
<button type="submit" class="button button--primary">Skicka in</button>
</f-validation-form>
</template>
const awesomeLabel = new FLabelPageObject("[data-test=awesome-label]");
/* error icon is not visible before validation */
awesomeLabel.errorIcon().should("not.exist");
/* trigger validation */
cy.get("button").click();
/* error icon should now be present */
awesomeLabel.errorIcon().should("exist");