mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Improving E2E tests
This commit is contained in:
parent
8d22141e88
commit
78041a1d9c
@ -73,6 +73,9 @@ describe('Gallery', () => {
|
||||
});
|
||||
it('Gallery should auto open lightbox for IMG_5910.jpg', () => {
|
||||
cy.visit('/gallery/?p=IMG_5910.jpg');
|
||||
// at least one photo should be visible
|
||||
cy.get('app-gallery-grid-photo', {timeout: 10000});
|
||||
cy.get('.photo-container > img[alt="IMG_5910.jpg"]', {timeout: 10000}); //the main photo should be visible
|
||||
|
||||
cy.get('app-lightbox-controls > #controllers-container > .controls-caption').contains('Squirrel at berkely');
|
||||
cy.get('app-lightbox-controls .faces-container > .face > .face-name').contains('Alvin the Squirrel');
|
||||
@ -80,6 +83,9 @@ describe('Gallery', () => {
|
||||
});
|
||||
it('Gallery should auto open lightbox for IMG_1252.jpg', () => {
|
||||
cy.visit('/gallery/?p=IMG_1252.jpg');
|
||||
// at least one photo should be visible
|
||||
cy.get('app-gallery-grid-photo', {timeout: 10000});
|
||||
cy.get('.photo-container > img[alt="IMG_1252.jpg"]', {timeout: 10000}); //the main photo should be visible
|
||||
|
||||
cy.get('app-lightbox-controls > #controllers-container > .controls-caption').contains('This is a super long title with special characters -.,űáéúőpóüö');
|
||||
cy.get('app-lightbox-controls .faces-container > .face > .face-name').should('not.exist');
|
||||
@ -100,6 +106,9 @@ describe('Gallery - dont wait for content load', () => {
|
||||
// contains a folder
|
||||
|
||||
cy.visit('/gallery/?p=IMG_5910.jpg');
|
||||
// at least one photo should be visible
|
||||
cy.get('app-gallery-grid-photo', {timeout: 10000});
|
||||
cy.get('.photo-container > img[alt="IMG_5910.jpg"]', {timeout: 10000}); //the main photo should be visible
|
||||
|
||||
cy.get('app-lightbox-controls > #controllers-container > .controls-caption').contains('Squirrel at berkely');
|
||||
cy.get('app-lightbox-controls .faces-container > .face > .face-name').contains('Alvin the Squirrel');
|
||||
@ -118,6 +127,10 @@ describe('Gallery - dont wait for content load', () => {
|
||||
|
||||
cy.visit('/gallery/?p=IMG_1252.jpg');
|
||||
|
||||
// at least one photo should be visible
|
||||
cy.get('app-gallery-grid-photo', {timeout: 10000});
|
||||
cy.get('.photo-container > img[alt="IMG_1252.jpg"]', {timeout: 10000}); //the main photo should be visible
|
||||
|
||||
cy.get('app-lightbox-controls > #controllers-container > .controls-caption').contains('This is a super long title with special characters -.,űáéúőpóüö');
|
||||
cy.get('app-lightbox-controls .faces-container > .face').should('not.exist');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user