-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: fixes #1124, clear the disk cache whenever launching the browser
- Loading branch information
1 parent
4af9c98
commit e38ada8
Showing
7 changed files
with
77 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
.../server/test/support/fixtures/projects/e2e/cypress/integration/cache_clearing_spec.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
req = (win) -> | ||
new Promise (resolve, reject) -> | ||
rand = Math.random() | ||
|
||
xhr = new win.XMLHttpRequest() | ||
xhr.open("GET", "http://localhost:1515/cached/") | ||
xhr.onload = -> resolve(win) | ||
xhr.onerror = reject | ||
xhr.send() | ||
|
||
it "makes cached request", -> | ||
cy | ||
.visit("http://localhost:1515") | ||
.then(req) ## this creates the disk cache | ||
.then(req) ## this should not hit our server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters