diff --git a/.changeset/rich-teams-push.md b/.changeset/rich-teams-push.md new file mode 100644 index 000000000..98cb4d92e --- /dev/null +++ b/.changeset/rich-teams-push.md @@ -0,0 +1,6 @@ +--- +'@getodk/xforms-engine': patch +'@getodk/web-forms': patch +--- + +Fixed bug where computed image urls blocked form loading diff --git a/packages/common/src/fixtures/select/7-images-choice-computed.xml b/packages/common/src/fixtures/select/7-images-choice-computed.xml new file mode 100644 index 000000000..3a155396f --- /dev/null +++ b/packages/common/src/fixtures/select/7-images-choice-computed.xml @@ -0,0 +1,59 @@ + + + + images-choice + + + + + Reference image + jr://images/ + + + + + + + + + + + + + + + + animals-0 + tiger + tiger.jpg + + + animals-1 + camel + camel.jpg + + + + + + + + + + + + + + + + + diff --git a/packages/scenario/test/label-media.test.ts b/packages/scenario/test/label-media.test.ts new file mode 100644 index 000000000..8130747ce --- /dev/null +++ b/packages/scenario/test/label-media.test.ts @@ -0,0 +1,108 @@ +import type { JRResourceURL } from '@getodk/common/jr-resources/JRResourceURL.ts'; +import { UnreachableError } from '@getodk/common/lib/error/UnreachableError.ts'; +import { + bind, + body, + head, + html, + input, + mainInstance, + model, + t, + title, +} from '@getodk/common/test-utils/xform-dsl/index.ts'; +import type { XFormsElement } from '@getodk/common/test-utils/xform-dsl/XFormsElement.ts'; +import type { TextRange } from '@getodk/xforms-engine'; +import { describe, expect, it } from 'vitest'; +import { Scenario } from '../src/jr/Scenario.ts'; + +describe('`