{"size": 493, "ext": "js", "max_stars_repo_path": "backstop_data/engine_scripts/puppeteer/utils/submit-form.js", "max_stars_repo_name": "alphagov/datagovuk-visual-regression-tests", "max_stars_repo_stars_event_min_datetime": "2021-03-09T15:20:40.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-09T15:20:40.000Z", "max_issues_repo_path": "backstop_data/engine_scripts/puppeteer/utils/submit-form.js", "max_issues_repo_name": "alphagov/datagovuk-visual-regression-tests", "max_issues_repo_issues_event_min_datetime": "2020-08-19T18:11:51.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-07T11:37:37.000Z", "max_forks_repo_path": "backstop_data/engine_scripts/puppeteer/utils/submit-form.js", "max_forks_repo_name": "alphagov/datagovuk-visual-regression-tests", "max_forks_repo_forks_event_min_datetime": "2020-05-26T09:31:14.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-10T20:13:58.000Z"}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": 4, "avg_line_length": 41.0833333333, "max_line_length": 171, "alphanum_fraction": 0.6328600406}
// Submits a purposefully incomplete form in order to test error views

module.exports = async (page, label) => {
    console.log(`Submitting incomplete form for scenario ${label}...`);
    await Promise.all([
        page.evaluate(() => {
            var submit = document.querySelector('button[type="submit"]') ? document.querySelector('button[type="submit"]') : document.querySelector('input[type="submit"]')
            submit.click()
        }),
        page.waitForNavigation()
    ]);
}