- Add GitHub Actions CI workflow with lint, type-check, test, build, and e2e jobs - Configure Jest for unit and integration tests with coverage reporting - Create unit tests for BaseAgent, PlantLineageAgent, and AgentOrchestrator - Add blockchain PlantChain unit tests - Create API integration tests for plants endpoints - Configure Cypress for E2E testing with support files and custom commands - Add E2E tests for home, plant registration, transparency, and vertical farm pages - Set up Prettier for code formatting with configuration - Configure Husky pre-commit hooks with lint-staged - Add commitlint for conventional commit message enforcement - Update package.json with new scripts and dev dependencies This implements Agent 5 (Testing & CI/CD) from the deployment plan.
32 lines
699 B
TypeScript
32 lines
699 B
TypeScript
/**
|
|
* Home Page E2E Tests
|
|
*/
|
|
|
|
describe('Home Page', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/');
|
|
cy.waitForPageLoad();
|
|
});
|
|
|
|
it('should load the home page', () => {
|
|
cy.url().should('eq', `${Cypress.config('baseUrl')}/`);
|
|
});
|
|
|
|
it('should display the main navigation', () => {
|
|
cy.get('nav').should('be.visible');
|
|
});
|
|
|
|
it('should have proper page title', () => {
|
|
cy.title().should('not.be.empty');
|
|
});
|
|
|
|
it('should be responsive on mobile viewport', () => {
|
|
cy.viewport('iphone-x');
|
|
cy.get('nav').should('be.visible');
|
|
});
|
|
|
|
it('should be responsive on tablet viewport', () => {
|
|
cy.viewport('ipad-2');
|
|
cy.get('nav').should('be.visible');
|
|
});
|
|
});
|