Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Adding more coverage for filters #780

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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