Skip to content

Instantly share code, notes, and snippets.

View prescottprue's full-sized avatar

Scott Prue prescottprue

View GitHub Profile
@prescottprue
prescottprue / Account.spec.js
Last active December 1, 2018 09:58
Cypress test for verifying app writes valid data to database
const USER_PROFILE_PATH = `users/${Cypress.env('TEST_UID')}`
describe('Account Page', () => {
beforeEach(() => {
// Login using custom token
cy.login()
// Go to account page
cy.visit('/account')
})
@prescottprue
prescottprue / Projects.spec.js
Last active November 24, 2018 03:44
Cypress test to confirm a Firebase app correctly routes authed/unauthed users.
describe('Projects Page', () => {
describe('when not authenticated', () => {
before(() => {
// Attempt to go to /projects (requires user to be logged in)
cy.visit('/projects')
})
it('Redirects to Home (/)', () => {
cy.url().should('equal', '/')
});
})