Skip to content

Commit

Permalink
Footer elements test
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocruz committed Sep 21, 2016
1 parent 6f99c94 commit 10fe265
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/portfolio.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,28 @@ describe('The webpage', () => {
const el = footer.querySelector('.container');
assert.isOk(el, 'We need a `.container` element inside our `footer`.');
});
});

describe('footer-elements', () => {
let footer;
beforeEach(() => footer = doc.querySelector('.footer'));

it('should exist @footer-elements', () => {
assert.isOk(footer, 'We need a `.footer` element.');
});

it('should have a non-empty `<h3>` title @footer-elements', () => {
let el = footer.querySelector('.container h3');
const el = footer && footer.querySelector('.container h3');
assert.isOk(el, 'Our footer needs an `h3` element.');
assert.isOk(el.textContent.trim() !== '', 'Our footer\'s `h3` element cannot be empty');
});

it('should have a non-empty `<p>` tag @footer-elements', () => {
let el = footer.querySelector('.container p');
const el = footer && footer.querySelector('.container p');
assert.isOk(el, 'Our footer needs a `p` element.');
assert.isOk(el.textContent.trim() !== '', 'Our footer\'s `p` element cannot be empty');
});
});
})

/**
* STEP 5: ELEMENTS THAT SHOULD BE REMOVED
Expand Down

0 comments on commit 10fe265

Please sign in to comment.