Skip to content

Commit

Permalink
Styling tweaks / e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjmaclean committed Nov 12, 2024
1 parent ea3e227 commit b3cdc83
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
14 changes: 12 additions & 2 deletions projects/sandbox/cypress/e2e/debias.cy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
context('Sandbox', () => {
describe('Debias', () => {
const force = { force: true };
const selCsvDownload = '.csv-download';
const selDebiasLink = 'li .debias-link';
const txtNoDetections = 'No Biases Found';
const pollInterval = 2000;
const urlEmptyReport = '/dataset/28';

it('should toggle the info', () => {
cy.visit('/dataset/3');
Expand Down Expand Up @@ -37,7 +39,7 @@ context('Sandbox', () => {
});

it('should show an empty report', () => {
cy.visit('/dataset/28');
cy.visit(urlEmptyReport);
cy.wait(pollInterval);
cy.get(selDebiasLink)
.last()
Expand All @@ -63,9 +65,17 @@ context('Sandbox', () => {
cy.get(selDebiasLink)
.first()
.click(force);
cy.get('.csv-download')
cy.get(selCsvDownload)
.filter(':visible')
.should('exist');
});

it('should not show the download link when there is no data', () => {
cy.visit(urlEmptyReport);
cy.get(selDebiasLink)
.first()
.click(force);
cy.get(selCsvDownload).should('not.exist');
});
});
});
3 changes: 1 addition & 2 deletions projects/sandbox/cypress/e2e/problem-patterns.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ context('Sandbox', () => {

it('should not show the arrows if (record) viewer is not scrollable', () => {
cy.visit('/dataset/1?recordId=1&view=problems');
cy.get('.skip-arrows')
.should('not.exist');
cy.get('.skip-arrows').should('not.exist');
});

it('should show the arrows if the (record) viewer is scrollable', () => {
Expand Down
2 changes: 1 addition & 1 deletion projects/sandbox/src/app/debias/debias.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<a class="open-info" (click)="toggleDebiasInfo($event)" title="Debias Tool Information"></a>

<a
*ngIf="debiasReport.state === DebiasState.COMPLETED"
*ngIf="debiasReport.state === DebiasState.COMPLETED && debiasReport.detections.length"
#downloadAnchor
class="csv-download"
(click)="csvDownload()"
Expand Down
1 change: 0 additions & 1 deletion projects/sandbox/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

/* Metis (Shared) */
@import 'shared-styles/assets/sass/pandora/settings/metis-variables-layout';
@import 'shared-styles/assets/sass/pandora/settings/metis-variables-modal';
@import 'shared-styles/assets/sass/pandora/components/dashboard-header';
@import 'shared-styles/assets/sass/pandora/components/modal';
@import 'shared-styles/assets/sass/pandora/components/status-bullet';
Expand Down
2 changes: 2 additions & 0 deletions shared-styles/assets/sass/pandora/components/_modal.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../settings/metis-variables-modal';

body.modal-open {
height: 100vh;
overflow-y: hidden;
Expand Down

0 comments on commit b3cdc83

Please sign in to comment.