Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dev/testActivity.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"type": "singleDoc",
"isDescription": false,
"doenetML": "<problem>2+2=<answer>4</answer><selectFromSequence /></problem>",
"version": "0.7.20-dev.332",
"version": "0.7.21",
"numVariants": 10
},
{
Expand All @@ -25,7 +25,7 @@
"type": "singleDoc",
"isDescription": false,
"doenetML": "<problem>1+1=<answer>2</answer><selectFromSequence length='3' /></problem><problem>4+4=<answer>8</answer><selectFromSequence length='4' /></problem>",
"version": "0.7.20-dev.332",
"version": "0.7.21",
"numVariants": 12
}
]
Expand All @@ -41,31 +41,31 @@
"type": "singleDoc",
"isDescription": false,
"doenetML": "<question>Question 1A <graph><point name='P'/></graph><answer><award><when>$P.x > 0</when></award></answer></question>",
"version": "0.7.20-dev.332",
"version": "0.7.21",
"numVariants": 1
},
{
"id": "sel2b",
"type": "singleDoc",
"isDescription": false,
"doenetML": "<question>Question 1B <p>Enter: <select name='a'>a b c</select>. <answer>$a</answer></p></question>",
"version": "0.7.20-dev.332",
"version": "0.7.21",
"numVariants": 3
},
{
"id": "sel2c",
"type": "singleDoc",
"isDescription": false,
"doenetML": "<question>Question 1C <p>Enter: <selectFromSequence name='a' />. <answer>$a</answer></p></question>",
"version": "0.7.20-dev.332",
"version": "0.7.21",
"numVariants": 10
},
{
"id": "sel2d",
"type": "singleDoc",
"isDescription": false,
"doenetML": "<question>Question 1D <p>Enter: <selectFromSequence name='a' length=\"5\" />. <answer>$a</answer></p></question>",
"version": "0.7.20-dev.332",
"version": "0.7.21",
"numVariants": 5
}
]
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@doenet/assignment-viewer",
"private": false,
"description": "View assignments from questions written in DoenetML",
"version": "0.1.0-alpha-15",
"version": "0.1.0-alpha-16",
"license": "AGPL-3.0-or-later",
"homepage": "https://github.com/Doenet/assignment-viewer#readme",
"type": "module",
Expand Down Expand Up @@ -38,7 +38,7 @@
"prettier:check": "prettier --check ."
},
"peerDependencies": {
"@doenet/doenetml-iframe": "^0.7.20-dev.334",
"@doenet/doenetml-iframe": "^0.7.21",
"react": "^19.2.3",
"react-dom": "^19.2.3"
},
Expand All @@ -49,7 +49,7 @@
"seedrandom": "^3.0.5"
},
"devDependencies": {
"@doenet/doenetml-iframe": "0.7.20-dev.334",
"@doenet/doenetml-iframe": "0.7.21",
"@eslint/js": "^9.39.1",
"@types/object-hash": "^3.0.6",
"@types/react": "^19.2.7",
Expand Down
16 changes: 5 additions & 11 deletions test/cypress/component/ActivityViewer.windowed.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import React from "react";
import { ActivityViewer } from "../../../src/activity-viewer";
import type { ActivitySource } from "../../../src/Activity/activityState";
import type { SingleDocSource } from "../../../src/Activity/singleDocState";
import {
WINDOWED_STANDALONE_URL,
WINDOWED_STANDALONE_CSS_URL,
IFRAME_READY_TIMEOUT,
PARK_TIMEOUT,
} from "./helpers";
import { IFRAME_READY_TIMEOUT, PARK_TIMEOUT } from "./helpers";

// Windowed mounting (#35, #36, #37): every item's DoenetViewer is mounted,
// but the wrapper's mountPolicy decides which are booted — memory tracks the
Expand All @@ -20,7 +15,10 @@ function mkDoc(id: string, label: string): SingleDocSource {
type: "singleDoc",
isDescription: false,
doenetML: `<p>${label}: <textInput name="ti" /></p><p>typed: $ti.value</p>`,
version: "0.7.4",
// 0.7.21 is the first version the iframe wrapper gates parking on
// (PARK_MIN_VERSION), so parking works without a host-specified
// standaloneUrl — the bundle/CSS auto-resolve from this version.
version: "0.7.21",
numVariants: 1,
};
}
Expand Down Expand Up @@ -68,8 +66,6 @@ describe("ActivityViewer — windowed mounting", () => {
activityId="windowed-paginated"
flags={{ allowSaveState: true }}
paginate={true}
standaloneUrl={WINDOWED_STANDALONE_URL}
cssUrl={WINDOWED_STANDALONE_CSS_URL}
addVirtualKeyboard={false}
mountPolicy={{ parkDelayMs: 300, flushTimeoutMs: 15_000 }}
/>,
Expand Down Expand Up @@ -122,8 +118,6 @@ describe("ActivityViewer — windowed mounting", () => {
activityId="windowed-scroll"
flags={{ allowSaveState: true }}
paginate={false}
standaloneUrl={WINDOWED_STANDALONE_URL}
cssUrl={WINDOWED_STANDALONE_CSS_URL}
addVirtualKeyboard={false}
mountPolicy={{
maxLiveViewers: 2,
Expand Down
12 changes: 3 additions & 9 deletions test/cypress/component/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ export const STANDALONE_CSS_URL = `${CDN}/style.css`;
// on a cold CDN fetch.
export const IFRAME_READY_TIMEOUT = 20_000;

// The windowed-mounting specs park viewers, which requires a standalone
// bundle that acknowledges `SPLICE.flushState` — true of the bundle
// published alongside the installed doenetml-iframe version (the wrapper
// treats a host-specified standaloneUrl as modern).
export const WINDOWED_STANDALONE_URL = STANDALONE_URL;
export const WINDOWED_STANDALONE_CSS_URL = STANDALONE_CSS_URL;

// Parking additionally waits for the off-screen viewer's realm to boot far
// enough to acknowledge the flush.
// Parking waits for the off-screen viewer's realm to boot far enough to
// acknowledge the flush. The windowed specs use docs at the park-gate
// version (>= 0.7.21), so parking needs no host-specified standaloneUrl.
export const PARK_TIMEOUT = 40_000;