wait for window to be focused in openDevTools test
This commit is contained in:
		
					parent
					
						
							
								4b45a5fc6d
							
						
					
				
			
			
				commit
				
					
						ded316cd5e
					
				
			
		
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -264,7 +264,9 @@ describe('webContents module', () => {
 | 
			
		|||
 | 
			
		||||
  describe('openDevTools() API', () => {
 | 
			
		||||
    it('can show window with activation', async () => {
 | 
			
		||||
      const focused = emittedOnce(w, 'focus')
 | 
			
		||||
      w.show()
 | 
			
		||||
      await focused
 | 
			
		||||
      assert.strictEqual(w.isFocused(), true)
 | 
			
		||||
      const devtoolsOpened = emittedOnce(w.webContents, 'devtools-opened')
 | 
			
		||||
      w.webContents.openDevTools({ mode: 'detach', activate: true })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue