-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix 'incorrect screenshot path in report output ' (close #2726) * fix tests - 1 * fix test * fix tests 3 * remove globby
- Loading branch information
1 parent
ddc0204
commit 158695b
Showing
12 changed files
with
88 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { KEY_MAPS } from '../deps/testcafe-core'; | ||
import isLetter from './is-letter'; | ||
|
||
|
||
export default function (char) { | ||
if (isLetter(char)) | ||
return char.toUpperCase().charCodeAt(0); | ||
|
||
var res = KEY_MAPS.shiftMap[char] ? KEY_MAPS.shiftMap[char].charCodeAt(0) : char.charCodeAt(0); | ||
const res = KEY_MAPS.shiftMap[char] ? KEY_MAPS.shiftMap[char].charCodeAt(0) : char.charCodeAt(0); | ||
|
||
return KEY_MAPS.symbolCharCodeToKeyCode[res] || res; | ||
} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import hammerhead from '../deps/hammerhead'; | ||
|
||
var Promise = hammerhead.Promise; | ||
var nativeMethods = hammerhead.nativeMethods; | ||
|
||
const Promise = hammerhead.Promise; | ||
const nativeMethods = hammerhead.nativeMethods; | ||
|
||
export default function () { | ||
return new Promise(resolve => nativeMethods.setTimeout.call(window, resolve, 0)); | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import path from 'path'; | ||
|
||
export default function (paths) { | ||
if (!paths) | ||
return null; | ||
|
||
if (paths.length === 1) | ||
return paths[0]; | ||
|
||
const pathArrs = paths.map(item => item.split(path.sep)); | ||
const isCommonPathFragment = (pathFragment, idx) => pathArrs.every(pathArray => pathArray[idx] === pathFragment); | ||
const firstPathArr = pathArrs[0]; | ||
let commonPathFramgemtnIndex = 0; | ||
|
||
while (commonPathFramgemtnIndex < firstPathArr.length && | ||
isCommonPathFragment(firstPathArr[commonPathFramgemtnIndex], commonPathFramgemtnIndex)) | ||
commonPathFramgemtnIndex++; | ||
|
||
if (!commonPathFramgemtnIndex) | ||
return null; | ||
|
||
const commonPathFragments = firstPathArr.slice(0, commonPathFramgemtnIndex); | ||
|
||
return path.join(...commonPathFragments); | ||
} |
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