mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:22:45 +00:00 
			
		
		
		
	 e52c30cbd5
			
		
	
	
		e52c30cbd5
		
	
	
	
	
		
			
			We have a 5 second timeout between a user-activated event occurring and an activation-gated API being invoked in order for that API to succeed. This is quite fine in normal circumstances, but the machines used in CI often exceed that limit (we see upwards of 10 seconds passing between generating the user-activated event and the API call running). So instead of generating a user-activated event, add a hook to allow tests to bypass the very next activation check.
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			598 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			598 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <button id="button"></button>
 | |
| <script src="include.js"></script>
 | |
| <script type="text/javascript">
 | |
|     function writeText(onComplete) {
 | |
|         navigator.clipboard.writeText("Well hello friends :^)").then(
 | |
|             () => {
 | |
|                 println("Success");
 | |
|                 onComplete();
 | |
|             },
 | |
|             () => {
 | |
|                 println("Failure");
 | |
|                 onComplete();
 | |
|             }
 | |
|         );
 | |
|     }
 | |
| 
 | |
|     asyncTest((done) => {
 | |
|         writeText(() => {
 | |
|             internals.bypassNextTransientActivationTest = true;
 | |
|             writeText(done);
 | |
|         });
 | |
|     });
 | |
| </script>
 |