'use strict';

const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
const Browser = require('zombie');
const browser = new Browser();
const app = express();
const PORT = 7777;
const server = `http://localhost:${PORT}/portfolio.html`;

app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static(path.join(__dirname, '../../../')));
app.listen(PORT, () => console.log(`Running on http://localhost:${PORT}`));

describe('Portfolio', function(){
  beforeEach(function(done) {
    browser.visit(server, done);
  });

  it('should have basic layout', function(done){
    browser.assert.elements('head', 1);
    browser.assert.elements('head > title', 1);
    browser.assert.elements('body', 1);
    browser.assert.elements('nav', 1);
    browser.assert.elements('main', 1);
    done();
  });

  it('should have basic layout for nav tag', function(done){
    browser.assert.elements('nav > header', 1);
    browser.assert.elements('nav > ul', 1);
    browser.assert.elements('nav > ul > li', { atLeast: 2 });
    browser.assert.elements('nav > ul > li > a', { atLeast: 2 });
    done();
  });

  it('should have basic layout for main tag', function(done){
    browser.assert.elements('main > div.content', 1);
    browser.assert.elements('main > div.content > h1', 1);
    browser.assert.elements('main > div.content > ul#portfolio', 1);
    done();
  });
});

@@ -659,24 +659,138 @@
 ts('head', 1
+, '%3Chead%3E tag should exist');%0A    browser.assert.elements('title', 1, '%3Ctitle%3E tag should exist inside %3Chead%3E tag'
 );%0A    brows
@@ -821,24 +821,67 @@
  %3E title', 1
+, '%3Ctitle%3E tag should be inside %3Chead%3E tag'
 );%0A    brows
@@ -904,24 +904,51 @@
 ts('body', 1
+, '%3Cbody%3E tag should exist'
 );%0A    brows
@@ -970,24 +970,50 @@
 nts('nav', 1
+, '%3Cnav%3E tag should exist'
 );%0A    brows
@@ -1036,24 +1036,51 @@
 ts('main', 1
+, '%3Cmain%3E tag should exist'
 );%0A    done(

add messages for tests