From 254be7004c78f9da146df1234a32aeb69fac62c9 Mon Sep 17 00:00:00 2001 From: Eddie Antonio Santos Date: Mon, 14 Jun 2021 15:54:16 -0600 Subject: [PATCH] =?UTF-8?q?test(cy):=20ensure=20ninip=C3=A2naw=20and=20nin?= =?UTF-8?q?ip=C3=A2n=C3=A2naw=20appear=20on=20separate=20rows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cypress/integration/paradigm.spec.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/cypress/integration/paradigm.spec.js b/cypress/integration/paradigm.spec.js index 1583b1b80..ef8e529f2 100644 --- a/cypress/integration/paradigm.spec.js +++ b/cypress/integration/paradigm.spec.js @@ -82,7 +82,6 @@ describe('I want to search for a Cree word and see its inflectional paradigm', ( }) }) - describe('I want to know if a form is observed inside a paradigm table', () => { // TODO: this test should be re-enabled in linguist mode! it.skip('shows inflection frequency as digits in brackets', ()=>{ @@ -214,3 +213,30 @@ describe('Paradigm labels', () => { .contains('th[scope=row]', linguisticLabel) }) }) + +describe('I want to see multiple variants of the same inflection on multiple rows', () => { + // See: https://github.com/UAlbertaALTLab/cree-intelligent-dictionary/issues/507 + it('should display two rows for nipâw+V+AI+Ind+12Pl', () => { + const forms = ['kinipânaw', 'kinipânânaw'] + let rowA = null + let rowB = null + cy.visitLemma('nipâw') + + // get the first row + cy.get('[data-cy=paradigm]') + .contains('tr', forms[0]) + .then($form => { rowA = $form.get(0) }) + + // get the second row + cy.get('[data-cy=paradigm]') + .contains('tr', forms[1]) + .then($form => { rowB = $form.get(0) }) + .then(() => { + expect(rowA).not.to.be.null + expect(rowB).not.to.be.null + + // they should not be the same row! + expect(rowA).not.to.equal(rowB) + }) + }) +})