Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ui testing: Moving tests into a single file #778

Merged
merged 2 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/End_To_End_Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
#build: npm run build
#start: npm start
spec: cypress/integration/map_filter.spec.js,cypress/integration/email.spec.js
spec: cypress/integration/e2e_tests.spec.js
wait-on: http://dev.311-data.org/
record: true
working-directory: e2e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,42 @@ describe('311 Data', () => {
})
})

const serverId = '';

const testEmail = `fake\@email.com`

context('Contact Us', () => {
it('Contact Us: Sending Email', () => {

cy.server()
cy.route({
method:'POST',
url: Cypress.env('devApiUrl') +'/feedback',
response: [{"success": true}],
onResponse(xhr) {
expect(xhr.status).to.eq(200);
}
}).as('feedbackJSON')

cy.visit('/')
cy.get('.navbar-end > :nth-child(4)').click()
cy.get('#contact-firstname').type('Test')
cy.get('#contact-lastname').type('User')
cy.get('#contact-email').type(testEmail)
cy.get('#contact-message').type('email test')
cy.get('#btn-contact-submit').click()
cy.wait('@feedbackJSON')

cy.get('.contact-success-popup').should('exist')
})

it.skip('Contact Us: Checking email', () => {
cy.mailosaurGetMessage(serverId, {
sentTo: testEmail
}).then(email => {
expect(email.subject).to.equal('Thanks for your feedback');
})
})
})

})
42 changes: 0 additions & 42 deletions e2e/cypress/integration/email.spec.js

This file was deleted.