Closed ShBodden closed 4 years ago
I was able to make it function properly by not visiting the new page within the same test. That feels incorrect. Otherwise it works as expected.
` it('adds a review', () => { cy.visit("/establishment/create"); cy.get('[data-type="reviewer"]').type('Joe Shmo'); cy.get('[data-type="name"]').type('Shmos Tacos'); cy.get('[data-type="address"]').type('123 food blvd'); cy.get('[data-type="description"]').type('Authentic Mexican cusine'); cy.get('[data-type="category"]').type('restaurant'); cy.get('[data-type="slug"]').type('shmos'); cy.get('[data-type="review"]').type('Love the spicy tacos'); cy.get('[data-type="add-review"]').click();
})
it('visit new review', () => { cy.visit("/establishment/shmos") })`
Found a minor typo. Everything now works as expected.
My e2e tests all pass however I'm not seeing the new document added to my Firestore collection nor is it present on my app.
` it('adds a review', () => { cy.visit("/establishment/create"); cy.get('[data-type="reviewer"]').type('Joe Shmo'); cy.get('[data-type="name"]').type('Shmos Tacos'); cy.get('[data-type="address"]').type('123 food blvd'); cy.get('[data-type="description"]').type('Authentic Mexican cusine'); cy.get('[data-type="category"]').type('restaurant'); cy.get('[data-type="slug"]').type('shmos'); cy.get('[data-type="review"]').type('Love the spicy tacos');
}
);`