Skip to content

Commit

Permalink
Add component test for singularity switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
surchs committed Jan 18, 2025
1 parent b57dbca commit ec3adf0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cypress/component/GetDataDialog.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,19 @@ describe('GetDataDialog', () => {
cy.get('[data-cy="get-data-dialog-close-button"]').click();
cy.get('@onCloseSpy').should('have.been.called');
});

it('Switches between docker and singularity commands', () => {
cy.mount(<GetDataDialog open={props.open} onClose={props.onClose} />);

cy.get('button').contains('docker').should('exist');
cy.get('button').contains('singularity').should('exist');

cy.get('code').should('contain', 'docker run');

cy.get('button').contains('singularity').click();
cy.get('code').should('contain', 'singularity run');

cy.get('button').contains('docker').click();
cy.get('code').should('contain', 'docker run');
});
});

0 comments on commit ec3adf0

Please sign in to comment.