Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* 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
You can’t perform that action at this time.