chore(build): add Firefox to CI
This commit is contained in:
		
							parent
							
								
									49997ca932
								
							
						
					
					
						commit
						1c9be9b5aa
					
				| @ -92,3 +92,8 @@ export function stringifyElement(el): string { | ||||
| export function supportsIntlApi(): boolean { | ||||
|   return DOM.getUserAgent().indexOf('Chrome') > -1 && DOM.getUserAgent().indexOf('Edge') == -1; | ||||
| } | ||||
| 
 | ||||
| // TODO(mlaval): extract all browser detection checks from all tests
 | ||||
| export function isFirefox(): boolean { | ||||
|   return DOM.getUserAgent().indexOf("Firefox") > -1; | ||||
| } | ||||
|  | ||||
| @ -14,7 +14,8 @@ import { | ||||
|   it, | ||||
|   inject, | ||||
|   iit, | ||||
|   xit | ||||
|   xit, | ||||
|   isFirefox | ||||
| } from 'angular2/test_lib'; | ||||
| 
 | ||||
| import {DOM} from 'angular2/src/dom/dom_adapter'; | ||||
| @ -737,6 +738,13 @@ export function main() { | ||||
|                   rootTC.componentInstance.form = form; | ||||
|                   rootTC.detectChanges(); | ||||
| 
 | ||||
|                   // In Firefox, effective text selection in the real DOM requires an actual focus
 | ||||
|                   // of the field. This is not an issue in a new HTML document.
 | ||||
|                   if (isFirefox()) { | ||||
|                     var fakeDoc = DOM.createHtmlDocument(); | ||||
|                     DOM.appendChild(fakeDoc.body, rootTC.nativeElement); | ||||
|                   } | ||||
| 
 | ||||
|                   var input = rootTC.query(By.css("input")).nativeElement; | ||||
|                   input.value = "aa"; | ||||
|                   input.selectionStart = 1; | ||||
|  | ||||
| @ -125,7 +125,7 @@ var aliases = { | ||||
|   'SAFARI': ['SL_SAFARI7', 'SL_SAFARI8'], | ||||
|   'BETA': ['SL_CHROMEBETA', 'SL_FIREFOXBETA'], | ||||
|   'DEV': ['SL_CHROMEDEV', 'SL_FIREFOXDEV'], | ||||
|   'CI': ['SL_CHROME', 'SL_ANDROID5.1', 'SL_SAFARI8', 'SL_IOS8'] | ||||
|   'CI': ['SL_CHROME', 'SL_ANDROID5.1', 'SL_SAFARI8', 'SL_IOS8', 'SL_FIREFOX'] | ||||
| }; | ||||
| 
 | ||||
| module.exports = { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user