From f823c841576de9cfcc392e878fea00bed7240515 Mon Sep 17 00:00:00 2001 From: Josiah Roberts Date: Fri, 24 Nov 2023 20:16:53 -0500 Subject: [PATCH] Add left-to-right filter coverage --- .gitignore | 4 ++++ test/cypress/e2e/gallery.cy.ts | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 83d9a5ca2..f36a3336b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,13 @@ .idea/ +.angular/ +.nyc_output/ PiGallery2.iml node_modules/ pigallery2.zip src/**/*.js src/**/*.js.map +test/**/*.js +test/**/*.js.map src/frontend/dist test/coverage test/backend/**/*.js diff --git a/test/cypress/e2e/gallery.cy.ts b/test/cypress/e2e/gallery.cy.ts index 335cdd5e3..5185a97be 100644 --- a/test/cypress/e2e/gallery.cy.ts +++ b/test/cypress/e2e/gallery.cy.ts @@ -16,7 +16,8 @@ describe('Gallery', () => { it('Gallery should open', () => { cy.get('.mb-0 > :nth-child(1) > .nav-link').contains('Gallery'); }); - it('Gallery should filter', () => { + + it('Gallery should allow changing filter types, and filter with toggle-only', () => { cy.wait('@getContent'); cy.get('app-gallery-navbar ng-icon[name="ionFunnelOutline"]').click({scrollBehavior: false}); cy.get('app-gallery-navbar #gallery-filter-0').select('City', {force: true}); @@ -35,6 +36,19 @@ describe('Gallery', () => { cy.get('.photo-container > img[alt="IMG_6220.jpg"]').should('not.exist'); }); + it('Gallery should cascade filters left-to-right', () => { + cy.wait('@getContent'); + cy.get('app-gallery-navbar ng-icon[name="ionFunnelOutline"]').click({scrollBehavior: false}); + + cy.get('app-gallery-navbar #gallery-filter-1').siblings('.filter-column').contains('').parent().contains('15'); + cy.get('.photo-container > img[alt="IMG_8751.jpg"]'); + + cy.get('app-gallery-navbar #gallery-filter-0').siblings('.filter-column').contains('USA Road trip').click({scrollBehavior: false, force: true}); + cy.get('app-gallery-navbar #gallery-filter-1').siblings('.filter-column').contains('').parent().contains('7') + + cy.get('.photo-container > img[alt="IMG_8751.jpg"]').should('not.exist'); + }); + it('Gallery should show infobar over photo', () => { cy.wait('@getContent');