Skip to content

Commit

Permalink
Fix package.json & specs
Browse files Browse the repository at this point in the history
  • Loading branch information
NevilleS committed Apr 7, 2015
1 parent 8fffef2 commit 40d8a35
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Please Wait",
"name": "PleaseWait",
"module": "pleaseWait",
"author": "Pathgather",
"description": "Display a nice loading screen while your app loads",
Expand Down
11 changes: 10 additions & 1 deletion spec/please-wait.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,19 @@ describe 'PleaseWait', ->
it "removes the loading screen from the body after it transitions out", ->
pleaseWait = window.pleaseWait({logo: 'logo.png', loadingHtml: "<div></div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
loadingHtml = document.body.getElementsByClassName("pg-loading-html")[0]
expect(addedScreen).toBeDefined()

# Animate in
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
loadingHtml.dispatchEvent event

# Animate out
pleaseWait.finish()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event

addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen).not.toBeDefined()
expect(addedScreen).not.toBeDefined()
2 changes: 1 addition & 1 deletion src/please-wait.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,4 @@
new PleaseWait(options)

exports.pleaseWait = pleaseWait
return pleaseWait
return pleaseWait

0 comments on commit 40d8a35

Please sign in to comment.