mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added checks on error and response status code for smoke tests to make them easier to follow in logs
This commit is contained in:
parent
d20286febd
commit
e7f8d11e45
1 changed files with 7 additions and 3 deletions
|
@ -37,9 +37,11 @@ describe "Opening", ->
|
|||
headers:
|
||||
"X-Forwarded-Proto": "https"
|
||||
}, (error, response, body) ->
|
||||
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)
|
||||
# Check that the project id is present in the javascript that loads up the project
|
||||
match = !!body.match("\"project_id\":\"#{Settings.smokeTest.projectId}\"")
|
||||
expect(match).to.equal true
|
||||
expect(match, "smoke test: project page html does not have project_id").to.equal true
|
||||
done()
|
||||
|
||||
it "the project list", (done) ->
|
||||
|
@ -49,7 +51,9 @@ describe "Opening", ->
|
|||
headers:
|
||||
"X-Forwarded-Proto": "https"
|
||||
}, (error, response, body) ->
|
||||
expect(!!body.match("<title>Your Projects - Online LaTeX Editor ShareLaTeX</title>")).to.equal true
|
||||
expect(!!body.match("<h1>Projects</h1>")).to.equal true
|
||||
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 life").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("<h1>Projects</h1>"), "smoke test: body does not have correct h1").to.equal true
|
||||
done()
|
||||
|
||||
|
|
Loading…
Reference in a new issue