Skip to content

Commit

Permalink
revise add classifications approach (#2488)
Browse files Browse the repository at this point in the history
* seed database with common core and mn math standards
* combine classification browsing and searching on the backend
* new classifications settings panel
  • Loading branch information
dqnykamp authored Dec 17, 2024
1 parent 1673dd6 commit 3aa49ba
Show file tree
Hide file tree
Showing 14 changed files with 6,824 additions and 464 deletions.
93 changes: 93 additions & 0 deletions client/cypress/e2e/SettingsPanel/classifications.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
describe("Classifications test", function () {
it("add classifications to activity", () => {
cy.loginAsTestUser();

cy.createActivity("Hello!", "Initial content").then((activityId) => {
cy.visit(`/activityEditor/${activityId}`);

cy.get('[data-test="Settings Button"]').click();

cy.get('[data-test="Classifications"]').click();

cy.get('[data-test="Classifications"]').should(
"have.text",
"Classifications (0)",
);

cy.get('[data-test="Search Terms"]').type("factor quadratic{enter}");

cy.get('[data-test="Add 9.2.4.1"]').click();
cy.get('[data-test="Add A.REI.4 b."]').click();

cy.get('[data-test="Classifications"]').should(
"have.text",
"Classifications (2)",
);

cy.get('[data-test="Existing Classification 1"]').should(
"have.text",
"A.REI.4 b.",
);
cy.get('[data-test="Existing Classification 2"]').should(
"have.text",
"9.2.4.1",
);

cy.get('[data-test="Remove A.REI.4 b."]').click();
cy.get('[data-test="Classifications"]').should(
"have.text",
"Classifications (1)",
);
cy.get('[data-test="Existing Classification 1"]').should(
"have.text",
"9.2.4.1",
);

cy.get('[data-test="Filter By System').select("Common Core");
cy.get('[data-test="Add A.REI.4 b."]').should("be.visible");

cy.get('[data-test="Filter By Category').select("Grade 6");
cy.get('[data-test="Add A.REI.4 b."]').should("not.exist");

cy.get('[data-test="Filter By Subcategory').select(2);
cy.get('[data-test="Matching Classifications').should(
"contain.text",
"No matching classifications",
);

cy.get('[data-test="Stop Filter By Subcategory').click();

cy.get('[data-test="Add 6.EE.2 b."]').click();
cy.get('[data-test="Classifications"]').should(
"have.text",
"Classifications (2)",
);
cy.get('[data-test="Existing Classification 1"]').should(
"have.text",
"6.EE.2 b.",
);
cy.get('[data-test="Existing Classification 2"]').should(
"have.text",
"9.2.4.1",
);

cy.get('[data-test="Remove Existing 6.EE.2 b."]').click();
cy.get('[data-test="Classifications"]').should(
"have.text",
"Classifications (1)",
);
cy.get('[data-test="Existing Classification 1"]').should(
"have.text",
"9.2.4.1",
);

cy.get('[data-test="Add A.REI.4 b."]').should("not.exist");
cy.get('[data-test="Stop Filter By Category').click();
cy.get('[data-test="Add A.REI.4 b."]').should("be.visible");

cy.get('[data-test="Add 9.2.3.3"]').should("not.exist");
cy.get('[data-test="Stop Filter By System').click();
cy.get('[data-test="Add 9.2.3.3"]').should("be.visible");
});
});
});
Loading

0 comments on commit 3aa49ba

Please sign in to comment.