Commit 62b00bf88a47231cc44a5148a01ed8770e9c1483
1 parent
38b0fd54
Exists in
master
Adicionando teste para existência da fonte
Showing
3 changed files
with
15 additions
and
1 deletions
Show diff stats
test/app.js
... | ... | @@ -22,6 +22,11 @@ app.get('/jquery.js', function (req, res) |
22 | 22 | res.render('jquery'); |
23 | 23 | }); |
24 | 24 | |
25 | +app.get('/static/opensans-bold.woff', function (req, res) | |
26 | +{ | |
27 | + res.render('opensansbold'); | |
28 | +}); | |
29 | + | |
25 | 30 | // instead of starting the application here, export the app so that it can |
26 | 31 | // be loaded differently based on the use case (running the app vs testing) |
27 | 32 | module.exports = app; | ... | ... |
test/zombie-test.js
... | ... | @@ -6,8 +6,9 @@ var expect = require("chai").expect, |
6 | 6 | app = require("./app"); |
7 | 7 | |
8 | 8 | describe("Testes de conteúdo de HTML da barra", function() { |
9 | - var server, browser, barraUrl; | |
9 | + var server, browser, barraUrl, barraFonte; | |
10 | 10 | barraUrl = "http://localhost:3000/"; |
11 | + barraFonte = "http://localhost:3000/static/opensans-bold.woff"; | |
11 | 12 | before(function() { |
12 | 13 | server = app.listen(3000); |
13 | 14 | }); |
... | ... | @@ -38,6 +39,13 @@ describe("Testes de conteúdo de HTML da barra", function() { |
38 | 39 | }); |
39 | 40 | }); |
40 | 41 | |
42 | + it("A fonte deve estar respondendo", function(done) { | |
43 | + browser.visit(barraFonte, function() { | |
44 | + expect(browser.response.status).to.equal(200); | |
45 | + done(); | |
46 | + }); | |
47 | + }); | |
48 | + | |
41 | 49 | it("a barra deve ter o css correto para visualizacao maior que 960px"); |
42 | 50 | |
43 | 51 | it("a barra deve ter o css correto para visualização menor que 960px"); | ... | ... |
... | ... | @@ -0,0 +1 @@ |
1 | +<% include ../app/static/opensans-bold.woff %> | ... | ... |