mirror of
				https://github.com/kevinveenbirkenbach/homepage.veen.world.git
				synced 2025-11-03 00:47:59 +00:00 
			
		
		
		
	Added test for log
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,4 +1,5 @@
 | 
				
			|||||||
app/config.yaml
 | 
					app/config.yaml
 | 
				
			||||||
*__pycache__*
 | 
					*__pycache__*
 | 
				
			||||||
app/static/cache/*
 | 
					app/static/cache/*
 | 
				
			||||||
.env
 | 
					.env
 | 
				
			||||||
 | 
					app/cypress/screenshots/*
 | 
				
			||||||
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							@@ -75,8 +75,8 @@ browse:
 | 
				
			|||||||
	# Open the application in the browser at http://localhost:$(PORT)
 | 
						# Open the application in the browser at http://localhost:$(PORT)
 | 
				
			||||||
	chromium http://localhost:$(PORT)
 | 
						chromium http://localhost:$(PORT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Cypress tests\ nCYPRESS_DIR := app
 | 
					npm-install:
 | 
				
			||||||
.PHONY: test
 | 
						cd app && npm install
 | 
				
			||||||
test: down prod
 | 
					
 | 
				
			||||||
	# Run end-to-end tests with Cypress.
 | 
					test: npm-install
 | 
				
			||||||
	cd app && npx cypress run --spec "cypress/e2e/**/*.spec.js"
 | 
						cd app && npx cypress run --spec "cypress/e2e/**/*.spec.js"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										32
									
								
								app/cypress/e2e/navbar_logo_visibility.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								app/cypress/e2e/navbar_logo_visibility.spec.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
				
			|||||||
 | 
					describe('Navbar Logo Visibility', () => {
 | 
				
			||||||
 | 
					  beforeEach(() => {
 | 
				
			||||||
 | 
					    cy.visit('/');
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  it('should have #navbar_logo present in the DOM', () => {
 | 
				
			||||||
 | 
					    cy.get('#navbar_logo').should('exist');
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  it('should be invisible (opacity 0) by default', () => {
 | 
				
			||||||
 | 
					    cy.get('#navbar_logo')
 | 
				
			||||||
 | 
					      .should('exist')
 | 
				
			||||||
 | 
					      .and('have.css', 'opacity', '0');
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  it('should become visible (opacity 1) after entering fullscreen', () => {
 | 
				
			||||||
 | 
					    cy.window().then(win => {
 | 
				
			||||||
 | 
					      win.fullscreen();
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    cy.get('#navbar_logo', { timeout: 4000 })
 | 
				
			||||||
 | 
					      .should('have.css', 'opacity', '1');
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  it('should become invisible again (opacity 0) after exiting fullscreen', () => {
 | 
				
			||||||
 | 
					    cy.window().then(win => {
 | 
				
			||||||
 | 
					      win.fullscreen();
 | 
				
			||||||
 | 
					      win.exitFullscreen();
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    cy.get('#navbar_logo', { timeout: 4000 })
 | 
				
			||||||
 | 
					      .should('have.css', 'opacity', '0');
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
		Reference in New Issue
	
	Block a user