diff --git a/cypress/e2e/DoenetML/tagSpecific/point.cy.js b/cypress/e2e/DoenetML/tagSpecific/point.cy.js
index 05b93ea2a6..5fa7e3b454 100644
--- a/cypress/e2e/DoenetML/tagSpecific/point.cy.js
+++ b/cypress/e2e/DoenetML/tagSpecific/point.cy.js
@@ -14336,4 +14336,41 @@ describe('Point Tag Tests', function () {
});
+ it('handle invalid layer', () => {
+ cy.window().then(async (win) => {
+ win.postMessage({
+ doenetML: `
+ a
+
+ (3,4)
+
+
+
+ `}, "*");
+ });
+
+
+ cy.get('#\\/_text1').should('have.text', 'a') //wait for page to load
+
+ cy.get("#\\/l2").should('have.text', '0')
+
+ cy.window().then(async (win) => {
+ let stateVariables = await win.returnAllStateVariables1();
+ expect(stateVariables["/P"].stateValues.layer).eq(0);
+
+ })
+
+
+ cy.get("#\\/l textarea").type("1{enter}", { force: true });
+ cy.get("#\\/l2").should('have.text', '1')
+
+
+ cy.window().then(async (win) => {
+ let stateVariables = await win.returnAllStateVariables1();
+ expect(stateVariables["/P"].stateValues.layer).eq(1);
+
+ })
+
+ });
+
})