Skip to content

Commit

Permalink
Add left-to-right filter coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
josiah-roberts committed Nov 25, 2023
1 parent d38830f commit f823c84
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 15 additions & 1 deletion test/cypress/e2e/gallery.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand All @@ -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('<no face>').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('<no face>').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');
Expand Down

0 comments on commit f823c84

Please sign in to comment.