Skip to content

Commit

Permalink
New math features (Doenet#1949)
Browse files Browse the repository at this point in the history
This brings in changes from the math expressions library for commits between ab71641e5e1171c352af0941eaaf2624cea77216 and dd6c3b286cb1f78e897b0b3baa363374913e08d2

Summary of changes in new version of math expressions:

-  enable numerical comparison of vecs                  
-  add line segments
-  set containment with equality
-  begin support for integrals 
-  introduce a few units 
-  angle as operator, normalize arg order when compare 
-  parallel operator 
-  perp operator and lone symbol 
-  altvector with langle/rangle notation 
-  binom, vec, angle, floor, ceil exponents of non trig function are not moved outside
-  latex operatorname, nCr, nPr
-  evaluate log_b(a) 
-  function raised to -1 don't become reciprocal 
-  remove "\\," from latex output of factors
  • Loading branch information
dqnykamp authored Feb 28, 2023
1 parent 8f5418e commit 22bc934
Show file tree
Hide file tree
Showing 30 changed files with 7,205 additions and 936 deletions.
40 changes: 40 additions & 0 deletions cypress/e2e/DoenetML/answerValidation/matchpartial.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4437,6 +4437,26 @@ describe('Match partial validation tests', function () {
expect(text.trim().toLowerCase()).equal('50% correct')
})

cy.log("Submit first as altvector")
cy.get('#\\/mi textarea').type("{ctrl+home}{shift+end}{backspace}\\langle 1,2\\rangle{enter}", { force: true, delay: 0 })
cy.get('#\\/ans1_submit').click();
cy.get('#\\/ans2_submit').click();

cy.get('#\\/ans1_partial').invoke('text').then((text) => {
expect(text.trim().toLowerCase()).equal('50% correct')
})
cy.get('#\\/ans2_partial').invoke('text').then((text) => {
expect(text.trim().toLowerCase()).equal('50% correct')
})


cy.log("Submit both as alt vectors")
cy.get('#\\/mi textarea').type("{end},\\langle 3,4\\rangle{enter}", { force: true, delay: 0 })
cy.get('#\\/ans1_submit').click();
cy.get('#\\/ans2_submit').click();

cy.get('#\\/ans1_correct').should('be.visible')
cy.get('#\\/ans2_correct').should('be.visible')


});
Expand Down Expand Up @@ -4502,7 +4522,27 @@ describe('Match partial validation tests', function () {
expect(text.trim().toLowerCase()).equal('50% correct')
})

cy.log("Submit first as altvector")
cy.get('#\\/mi textarea').type("{ctrl+home}{shift+end}{backspace}\\langle 1,2\\rangle{enter}", { force: true, delay: 0 })
cy.get('#\\/ans1_submit').click();
cy.get('#\\/ans2_submit').click();

cy.get('#\\/ans1_partial').invoke('text').then((text) => {
expect(text.trim().toLowerCase()).equal('50% correct')
})
cy.get('#\\/ans2_partial').invoke('text').then((text) => {
expect(text.trim().toLowerCase()).equal('50% correct')
})



cy.log("Submit both as altvectors")
cy.get('#\\/mi textarea').type("{end},\\langle 3,4\\rangle{enter}", { force: true, delay: 0 })
cy.get('#\\/ans1_submit').click();
cy.get('#\\/ans2_submit').click();

cy.get('#\\/ans1_correct').should('be.visible')
cy.get('#\\/ans2_correct').should('be.visible')

});

Expand Down
Loading

0 comments on commit 22bc934

Please sign in to comment.