18 lines
457 B
JavaScript
18 lines
457 B
JavaScript
describe('Listing Restaurants', () =>
|
|
{
|
|
it('shows restaurants from the server', () =>
|
|
{
|
|
const sushiPlace = "Sushi Place";
|
|
const pizzaPlace = "Pizza Place";
|
|
|
|
cy.intercept('GET', 'https://api.outsidein.dev/*/restaurants',
|
|
[
|
|
{id: 850, name: sushiPlace},
|
|
{id: 851, name: pizzaPlace}
|
|
]);
|
|
|
|
cy.visit('/');
|
|
cy.contains(sushiPlace);
|
|
cy.contains(pizzaPlace);
|
|
})
|
|
}) |