| 
									
										
										
										
											2016-06-01 17:05:46 +02:00
										 |  |  | import ./make-test.nix ({ pkgs, ...} : | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2016-09-20 14:53:36 -05:00
										 |  |  |   name = "kde5"; | 
					
						
							| 
									
										
										
										
											2015-12-11 07:08:07 -06:00
										 |  |  |   meta = with pkgs.stdenv.lib.maintainers; { | 
					
						
							|  |  |  |     maintainers = [ ttuegel ]; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   machine = { lib, ... }: { | 
					
						
							|  |  |  |     imports = [ ./common/user-account.nix ]; | 
					
						
							| 
									
										
										
										
											2016-06-01 17:05:46 +02:00
										 |  |  |     virtualisation.memorySize = 1024; | 
					
						
							| 
									
										
										
										
											2015-12-11 07:08:07 -06:00
										 |  |  |     services.xserver.enable = true; | 
					
						
							|  |  |  |     services.xserver.displayManager.sddm = { | 
					
						
							|  |  |  |       enable = true; | 
					
						
							|  |  |  |       autoLogin = { | 
					
						
							|  |  |  |         enable = true; | 
					
						
							|  |  |  |         user = "alice"; | 
					
						
							|  |  |  |       }; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |     services.xserver.desktopManager.kde5.enable = true; | 
					
						
							| 
									
										
										
										
											2016-12-21 13:32:31 +01:00
										 |  |  |     virtualisation.writableStore = false; # FIXME | 
					
						
							| 
									
										
										
										
											2015-12-11 07:08:07 -06:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-01 17:05:46 +02:00
										 |  |  |   testScript = { nodes, ... }: | 
					
						
							|  |  |  |   let xdo = "${pkgs.xdotool}/bin/xdotool"; in | 
					
						
							| 
									
										
										
										
											2016-09-09 10:09:45 -05:00
										 |  |  |    ''
 | 
					
						
							|  |  |  |     startAll; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $machine->waitForFile("/home/alice/.Xauthority"); | 
					
						
							|  |  |  |     $machine->succeed("xauth merge ~alice/.Xauthority"); | 
					
						
							| 
									
										
										
										
											2016-06-01 17:05:46 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     $machine->waitUntilSucceeds("pgrep plasmashell"); | 
					
						
							| 
									
										
										
										
											2016-09-09 10:09:45 -05:00
										 |  |  |     $machine->waitForWindow("^Desktop "); | 
					
						
							| 
									
										
										
										
											2016-06-01 17:05:46 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Check that logging in has given the user ownership of devices. | 
					
						
							|  |  |  |     $machine->succeed("getfacl /dev/snd/timer | grep -q alice"); | 
					
						
							| 
									
										
										
										
											2016-09-09 10:09:45 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     $machine->execute("su - alice -c 'DISPLAY=:0.0 dolphin &'"); | 
					
						
							|  |  |  |     $machine->waitForWindow(" Dolphin"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $machine->execute("su - alice -c 'DISPLAY=:0.0 konsole &'"); | 
					
						
							|  |  |  |     $machine->waitForWindow("Konsole"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $machine->execute("su - alice -c 'DISPLAY=:0.0 systemsettings5 &'"); | 
					
						
							|  |  |  |     $machine->waitForWindow("Settings"); | 
					
						
							| 
									
										
										
										
											2016-06-01 17:05:46 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     $machine->execute("${xdo} key Alt+F1 sleep 10"); | 
					
						
							|  |  |  |     $machine->screenshot("screen"); | 
					
						
							| 
									
										
										
										
											2015-12-11 07:08:07 -06:00
										 |  |  |   '';
 | 
					
						
							|  |  |  | }) |