Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
describe('Fetch Movies', () => { | |
it('should contain all the expected attributes', () => { | |
cy.fetchFilm(1).as('firstMovie'); | |
const toTest = [ | |
{ target: 'body.title', value: 'A New Hope', should: 'contain' }, | |
{ target: 'body.director', value: 'George Lucas', should: 'contain' }, | |
// Check for at least 1 producer | |
{ target: 'body.producer', value: 'Rick McCallum', should: 'contain' }, | |
// We can also check for any assertion that Mocha/Chai provides |
// cypress/support/commands.js | |
Cypress.Commands.add('fetchFilm', movieIndex => { | |
cy.request('GET', `https://swapi.co/api/films/${movieIndex}/`); | |
}); | |
// integration/api/fetchMovies.js | |
describe('API Requests', () => { | |
it('should get successful response', () => { | |
cy.fetchFilm(1).as('firstMovie'); | |
describe('API Requests', () => { | |
it('should get successful response', () => { | |
cy.request('GET', 'https://swapi.co/api/films/1/') | |
.its('body.title').should('contain', 'A New Hope'); | |
}); | |
it('should get successful response', () => { | |
cy.request('GET', 'https://swapi.co/api/films/1/') | |
.then(response => { | |
response.body.planets.forEach(planet => |
describe('Fetch Movies', () => { | |
it('should contain all the expected attributes', () => { | |
cy.request('GET', 'https://swapi.co/api/films/1/').its('body.title').should('contain', 'A New Hope'); | |
cy.request('GET', 'https://swapi.co/api/films/1/').its('body.director').should('contain', 'George Lucas'); | |
// ... check more attributes | |
}); | |
}); |
{ | |
"legal_entity": { | |
"dob": { | |
"day": "02", | |
"month": "02", | |
"year": "1984" | |
}, | |
"type": "company" | |
}, | |
"account_token": "ct_1BxgU6KkwESpMrRrbwOgK178" |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI