Skip to content

Commit

Permalink
Updates to tests to check actual word class in search, as a single le…
Browse files Browse the repository at this point in the history
…mma may have multiple entries on different classes
  • Loading branch information
fbanados committed Jun 24, 2024
1 parent 603c140 commit e16dd90
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions cypress/integration/crkeng/paradigm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,31 @@ describe("I want to search for a Cree word and see its inflectional paradigm", (
inflections: ["niwâpin", "kiwâpin", "ê-wâpiyit"],
},
{
pos: "VTI",
pos: "VAI",
lemma: "mîcisow",
inflections: ["nimîcison", "kimîcison", "ê-mîcisoyit"],
},
{
pos: "VTI",
lemma: "kisâkamisam",
inflections: ["nikisâkamisên", "kisâkamisamwak", "ê-kisâkamisamiyit"]
},
{ pos: "VII", lemma: "nîpin", inflections: ["nîpin", "ê-nîpihk"] },
{ pos: "NAD", lemma: "nôhkom", inflections: ["kôhkom", "ohkoma"] },
{ pos: "NID", lemma: "mîpit", inflections: ["nîpit", "kîpit", "wîpit"] },
{ pos: "NDA", lemma: "nôhkom", inflections: ["kôhkom", "ohkoma"] },
{ pos: "NDI", lemma: "mîpit", inflections: ["nîpit", "kîpit", "wîpit"] },
{ pos: "NA", lemma: "minôs", inflections: ["minôsak", "minôsa"] },
{
pos: "NI",
lemma: "nipiy",
inflections: ["nipîhk", "ninipiy", "kinipiy"],
inflections: ["nipîhk", "ninipîm", "kinipîm"],
},
];

// Create test cases for each word above
for (let { pos, lemma, inflections } of testCases) {
it(`should display the paradigm for a word belonging to the ${pos} word class`, () => {
cy.visitSearch(lemma);
cy.get("[data-cy=search-results]").contains("a", lemma).click();
cy.get("[data-cy=search-results]").contains(pos).closest("[data-cy=search-result]").contains("a", lemma).click();

cy.get("[data-cy=paradigm]").as("paradigm");

Expand Down

0 comments on commit e16dd90

Please sign in to comment.