-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revise add classifications approach (#2488)
* seed database with common core and mn math standards * combine classification browsing and searching on the backend * new classifications settings panel
- Loading branch information
Showing
14 changed files
with
6,824 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.