medic / cht-conf-test-harness

A test harness for configurations of Community Health Toolkit applications
6 stars 3 forks source link

Error when filling questions of type time #249

Closed freddieptf closed 7 months ago

freddieptf commented 8 months ago

Describe the bug I can't successfully fill a time question using the test harness

To Reproduce Steps to reproduce the behavior:

Form for reproducing test.xlsx

it('successfully submitted', async() => {
    const result = await harness.fillForm("test", [ "10:00"]);
    expect(result.errors).to.be.empty;
});

What happened?

Error: Evaluation failed: Error: Elements of type datetime expect input in format: "2022-12-31 13:21"
    at fillQuestion (webpack://cht-conf-test-harness/./src/form-host/form-filler.js?:176:15)
    at fillPage (webpack://cht-conf-test-harness/./src/form-host/form-filler.js?:110:5)
    at fillForm (webpack://cht-conf-test-harness/./src/form-host/form-filler.js?:59:26)
    at FormFiller.fillForm (webpack://cht-conf-test-harness/./src/form-host/form-filler.js?:30:42)
    at untransformedFillAndSave (webpack://cht-conf-test-harness/./src/form-host/index.js?:22:53)
    at window.fillAndSave (webpack://cht-conf-test-harness/./src/form-host/index.js?:53:78)
    at __puppeteer_evaluation_script__:1:36
    at ExecutionContext._evaluateInternal (node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async doFillPage (node_modules/cht-conf-test-harness/src/harness.js:760:22)
    at async Harness.fillForm (node_modules/cht-conf-test-harness/src/harness.js:316:24)
    at async Context.<anonymous> (test/forms/cebs_cha_signal_reporting_verification.spec.js:25:20)

What did you expect? No errors

Environment:

jkuester commented 7 months ago

This does seem to be a regression. Filling out time questions works as expected for me on cht-conf-test-harness 2.4.3. However, when I upgrade to 3.0.14, I see this error.

kennsippell commented 7 months ago

Published as cht-conf-test-harness@3.0.15