E2E Testing
End-to-end testing with moclojer - Cypress, Playwright, and Selenium integration for full user flow testing with mocked backends.
Use moclojer in E2E tests to mock backend APIs while testing user flows.
π― With Cypress
// cypress/e2e/user-flow.cy.js
describe('User Registration Flow', () => {
beforeEach(() => {
// moclojer running on localhost:8000
cy.visit('http://localhost:3000');
});
it('registers a new user', () => {
cy.get('[data-testid="register-button"]').click();
cy.get('[name="email"]').type('[email protected]');
cy.get('[name="password"]').type('password123');
cy.get('[type="submit"]').click();
cy.contains('Registration successful').should('be.visible');
});
});π§ Docker Compose Setup
π See Also
Last updated
Was this helpful?