describe('Navigation', () => {
    it('Should navigate to the login page', () => {
        cy.visit('http://localhost:3000/')
        cy.get('a[href*="login"]').click()
        cy.url().should('include', '/login')
        cy.get('h1').contains('login')
    })
    it('Should navigate to the register page', () => {
        cy.visit('http://localhost:3000/')
        cy.get('a[href*="register"]').click()
        cy.url().should('include', '/register')
        cy.get('h1').contains('register')
    })
})

describe('CRUD Annonce', () => {
    it('Should create a new annonce', () => {
        cy.visit('http://localhost:3000/login')
        // Add login steps here
        cy.visit('http://localhost:3000/annonces/add')
        // Add form filling steps here
        cy.get('form').submit()
        cy.url().should('include', '/annonces/')
        cy.get('h1').contains('Annonce Details')
    })
})
