Fix smoke tests

This commit is contained in:
James Allen 2014-07-08 14:29:06 +01:00
parent d9d1499dae
commit ff7b7cdd20

View file

@ -54,7 +54,7 @@ describe "Opening", ->
expect(error, "smoke test: error in getting project").to.not.exist expect(error, "smoke test: error in getting project").to.not.exist
expect(response.statusCode, "smoke test: response code is not 200 getting project").to.equal(200) expect(response.statusCode, "smoke test: response code is not 200 getting project").to.equal(200)
# Check that the project id is present in the javascript that loads up the project # Check that the project id is present in the javascript that loads up the project
match = !!body.match("\"project_id\":\"#{Settings.smokeTest.projectId}\"") match = !!body.match("window.project_id = \"#{Settings.smokeTest.projectId}\"")
expect(match, "smoke test: project page html does not have project_id").to.equal true expect(match, "smoke test: project page html does not have project_id").to.equal true
done() done()
@ -67,6 +67,6 @@ describe "Opening", ->
expect(error, "smoke test: error returned in getting project list").to.not.exist expect(error, "smoke test: error returned in getting project list").to.not.exist
expect(response.statusCode, "smoke test: response code is not 200 getting project list").to.equal(200) expect(response.statusCode, "smoke test: response code is not 200 getting project list").to.equal(200)
expect(!!body.match("<title>Your Projects - Online LaTeX Editor ShareLaTeX</title>"), "smoke test: body does not have correct title").to.equal true expect(!!body.match("<title>Your Projects - Online LaTeX Editor ShareLaTeX</title>"), "smoke test: body does not have correct title").to.equal true
expect(!!body.match("<h1>Projects</h1>"), "smoke test: body does not have correct h1").to.equal true expect(!!body.match("ProjectPageController"), "smoke test: body does not have correct angular controller").to.equal true
done() done()