Skip to content

Commit

Permalink
Merge pull request #2314 from dqnykamp/integrate-viewers
Browse files Browse the repository at this point in the history
Refactor viewers into DoenetML component
  • Loading branch information
dqnykamp authored Aug 15, 2023
2 parents c9d0042 + 4e98463 commit 7d59374
Show file tree
Hide file tree
Showing 149 changed files with 3,538 additions and 4,588 deletions.
678 changes: 321 additions & 357 deletions cypress/e2e/ActivityViewer/activityVariants.cy.js

Large diffs are not rendered by default.

19 changes: 7 additions & 12 deletions cypress/e2e/ActivityViewer/compiledActivity.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ describe("Compiled activity tests", function () {
it("Minimal activity definition", () => {
// Note:
// - missing xmlns attribute on activity document
// - missing behavior attribute on order (sequence is assumed)
cy.window().then(async (win) => {
win.postMessage(
{
activityDefinition: `
doenetML: `
<document type="activity">
<order>
<page>hi</page>
</order>
<page>hi</page>
</document>
`,
Expand All @@ -29,15 +26,13 @@ describe("Compiled activity tests", function () {
cy.get(cesc("#\\/_document1")).should("contain.text", "hi");
});

it("Minimal activity definition, with attributes", () => {
it("Minimal activity definition, with xmlns", () => {
cy.window().then(async (win) => {
win.postMessage(
{
activityDefinition: `
doenetML: `
<document type="activity" xmlns="https://doenet.org/spec/doenetml/v0.1.0">
<order behavior="sequence">
<page>hi</page>
</order>
<page>hi</page>
</document>
`,
Expand All @@ -55,7 +50,7 @@ describe("Compiled activity tests", function () {
cy.window().then(async (win) => {
win.postMessage(
{
activityDefinition: `
doenetML: `
<document type="page">hi</document>
`,
},
Expand All @@ -70,7 +65,7 @@ describe("Compiled activity tests", function () {
cy.window().then(async (win) => {
win.postMessage(
{
activityDefinition: `
doenetML: `
<document type="page" xmlns="https://doenet.org/spec/doenetml/v0.1.0">hi</document>
`,
},
Expand Down
Loading

0 comments on commit 7d59374

Please sign in to comment.