Skip to content

Instantly share code, notes, and snippets.

@jakelacey2012
Created October 26, 2016 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakelacey2012/eaafbd4f63730a0e498a19980ef0a79b to your computer and use it in GitHub Desktop.
Save jakelacey2012/eaafbd4f63730a0e498a19980ef0a79b to your computer and use it in GitHub Desktop.
/**
* contactUs
*/
import { Router } from 'meteor/lib-flow';
if (Meteor.isServer) return;
/**
* Simple Test to check the title of contact us
*/
describe('Contact Us', function () {
beforeEach(function () {
Router.go('contactUs');
// console.log(window.location.href);
// console.log('DID THIS RUN!!');
});
/**
* Correct path test
*/
describe('Contact Us path', function () {
it('Correct location for test http://localhost:3300/contactus', function () {
expect(window.location.href).to.equal('http://localhost:3300/contactus');
});
});
/**
* Test the title of the contact us page.
*/
describe('Check title of Contact Us', function () {
it('Title should be Contact us', function () {
// go to the contact us route.
// Router.go('admin');
// console.log(window.location.href);
// console.log(document.title);
// console.log(Router.current().route.name);
});
});
});
-------------------------------------------------------------------------------------------------
/**
* Admin page tests
*/
import { Router } from 'meteor/lib-flow';
if (Meteor.isServer) return;
/**
* Simple test to assert stuff on third parties
*/
describe('Admin page tests', function () {
/**
* Before each test go to this page
*/
beforeEach(function () {
Router.go('admin');
// console.log(window.location.href);
// console.log('Going to the right place');
});
/**
* Simple test to check we are on the correct path to test.
*/
describe('Admin path', function () {
it('Correct location http://localhost:3300/admin', function () {
expect(window.location.href).to.equal('http://localhost:3300/admin');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment