Skip to content

Commit

Permalink
fix: failing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalee committed Nov 6, 2024
1 parent 8864844 commit e367155
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,30 @@ describe('ExtractionTable', () => {
});
});

it('should remove the filter if the delete button is clicked', () => {
it.only('should remove the filter if the delete button is clicked', () => {
let studysetYear = '';
// ARRANGE
cy.wait('@studysetFixture').then((studysetFixture) => {
const studyset = studysetFixture?.response?.body as StudysetReturn;
const studysetStudies = studyset.studies as StudyReturn[];
studysetYear = studysetStudies[0].year?.toString() || "";
cy.get('input').eq(0).click();
cy.get(`input`)
.eq(0)
.type(studysetStudies[0].year?.toString() || '');
});
cy.get('tbody > tr').should('have.length', 1);
cy.get('[data-testid="CancelIcon"]').should('exist');

// ACT
cy.get('[data-testid="CancelIcon"]').click();
cy.contains(
`Filtering YEAR: ${studysetYear}`
).parent().find('[data-testid="CancelIcon"]').click();

// ASSERT
cy.get('tbody > tr').should('have.length', 3);
cy.get(`[data-testid="CancelIcon"]`).should('not.exist');
cy.contains(
`Filtering YEAR: ${studysetYear}`
).should('not.exist')
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ describe('DoSleuthImport', () => {

it('should select MKDA and create an MKDA meta analysis', () => {
cy.contains('button', 'Yes').click();
cy.get('[type="radio"]').eq(1).click();
cy.get('[type="radio"]').eq(1).click({ force: true });
cy.contains('button', 'create')
.click()
.wait('@specificationPostFixture')
Expand Down

0 comments on commit e367155

Please sign in to comment.