-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix xvfb in travis config, patch safari karma launchers (#5755)
- Loading branch information
1 parent
b27f713
commit 144907f
Showing
5 changed files
with
137 additions
and
32 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
patch-package | ||
--- a/node_modules/karma-safari-launcher/index.js | ||
+++ b/node_modules/karma-safari-launcher/index.js | ||
@@ -13,6 +13,11 @@ var SafariBrowser = function(baseBrowserDecorator) { | ||
var content = data.toString().replace('%URL%', url); | ||
var staticHtmlPath = self._tempDir + '/redirect.html'; | ||
|
||
+ var pathForMojave = path.join(process.env.HOME, 'Library/Containers/com.apple.Safari/Data/redirect.html'); | ||
+ if (fs.existsSync(pathForMojave)) { | ||
+ staticHtmlPath = pathForMojave; | ||
+ } | ||
+ | ||
fs.writeFile(staticHtmlPath, content, function(err) { | ||
self._execCommand(self._getCommand(), [staticHtmlPath]); | ||
}); |
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,18 @@ | ||
patch-package | ||
--- a/node_modules/karma-safaritechpreview-launcher/index.js | ||
+++ b/node_modules/karma-safaritechpreview-launcher/index.js | ||
@@ -25,7 +25,13 @@ const SafariTechPreviewBrowser = function (baseBrowserDecorator) { | ||
throw err; | ||
} | ||
const content = data.toString().replace('%URL%', url); | ||
- const staticHtmlPath = self._tempDir + '/redirect.html'; | ||
+ var staticHtmlPath = self._tempDir + '/redirect.html'; | ||
+ | ||
+ var pathForMojave = path.join(process.env.HOME, 'Library/Containers/com.apple.SafariTechnologyPreview/Data/redirect.html'); | ||
+ if (fs.existsSync(pathForMojave)) { | ||
+ staticHtmlPath = pathForMojave; | ||
+ } | ||
+ | ||
try { | ||
yield fs.writeFile(staticHtmlPath, content); | ||
} catch (err) { |