{"size": 620, "ext": "js", "max_stars_repo_path": "cypress/support/constants.js", "max_stars_repo_name": "pedrohnsc/desafio-ci-t-cypress-", "max_stars_repo_stars_event_min_datetime": "2020-09-05T17:34:36.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-06T15:32:40.000Z", "max_issues_repo_path": "cypress/support/constants.js", "max_issues_repo_name": "pedrohnsc/desafio-ci-t-cypress-", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "cypress/support/constants.js", "max_forks_repo_name": "pedrohnsc/desafio-ci-t-cypress-", "max_forks_repo_forks_event_min_datetime": "2021-02-13T12:22:39.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-13T12:22:39.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 26.9565217391, "max_line_length": 71, "alphanum_fraction": 0.6677419355}
const constants = {
    fillFieldWithTextAndPressEnter(htmlElement, text) {
        cy.get(htmlElement).should('be.visible').type(text + '{enter}')
    },

    fillFieldWithText(htmlElement, text){
        cy.get(htmlElement).should('be.visible').type(text)
    },

    clickWhenClickable(htmlElement) {
        cy.get(htmlElement).should('be.visible').click()
    },

    waitElementToBeVisible(htmlElement) {
        cy.get(htmlElement).should('be.visible')
    },

    assertThat(htmlElement, assertion, textToValidate) {
        cy.get(htmlElement).should(assertion, textToValidate)
    }
}

export default constants