Skip to content

Commit

Permalink
test for styles in getting started case
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Aug 8, 2019
1 parent 67d0db4 commit f6fd9ea
Showing 1 changed file with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const path = require('path');
const TestBed = require('../../test-bed');

describe('Build Greenwood With: ', function() {
const LABEL = 'Custom Workspace based on the Getting Started guide';
const LABEL = 'Custom Workspace based on the Getting Started guide and repo';
let setup;

before(async function() {
Expand Down Expand Up @@ -89,7 +89,19 @@ describe('Build Greenwood With: ', function() {
expect(footer.length).to.be.equal(1);
});

// TODO global styles
it('should have the expected font import', async function() {
const styles = '@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap);';
const styleTags = dom.window.document.querySelectorAll('head style');
let importCount = 0;

styleTags.forEach((tag) => {
if (tag.textContent.indexOf(styles) >= 0) {
importCount += 1;
}
});

expect(importCount).to.equal(1);
});
});

describe('Blog Posts', function() {
Expand Down Expand Up @@ -123,7 +135,19 @@ describe('Build Greenwood With: ', function() {
expect(footer.length).to.be.equal(1);
});

// TODO global styles
it('should have the expected font import', async function() {
const styles = '@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap);';
const styleTags = dom.window.document.querySelectorAll('head style');
let importCount = 0;

styleTags.forEach((tag) => {
if (tag.textContent.indexOf(styles) >= 0) {
importCount += 1;
}
});

expect(importCount).to.equal(1);
});
});

});
Expand Down

0 comments on commit f6fd9ea

Please sign in to comment.