diff --git a/nixos/tests/musescore.nix b/nixos/tests/musescore.nix index 0720631ed284..559c91ed8e55 100644 --- a/nixos/tests/musescore.nix +++ b/nixos/tests/musescore.nix @@ -43,13 +43,10 @@ in ) # Start MuseScore window - machine.execute("DISPLAY=:0.0 mscore >&2 &") + machine.execute("env XDG_RUNTIME_DIR=$PWD DISPLAY=:0.0 mscore >&2 &") # Wait until MuseScore has launched - machine.wait_for_window("MuseScore 4") - - # Wait until the window has completely initialised - machine.wait_for_text("MuseScore 4") + machine.wait_for_window("MuseScore Studio") machine.screenshot("MuseScore0") @@ -75,29 +72,22 @@ in machine.screenshot("MuseScore2") # Go to the export dialogue and create a PDF - machine.send_key("alt-f") - machine.sleep(1) - machine.send_key("e") + machine.send_key("ctrl-p") - # Wait until the export dialogue appears. - machine.wait_for_text("Export") - - machine.screenshot("MuseScore3") - - machine.send_key("shift-tab") - machine.sleep(1) - machine.send_key("ret") - machine.sleep(1) - machine.send_key("ret") + # Wait until the Print dialogue appears. + machine.wait_for_window("Print") machine.screenshot("MuseScore4") - - # Wait until PDF is exported - machine.wait_for_file('"/root/Documents/MuseScore4/Scores/Untitled score.pdf"') - - # Check that it contains the title of the score - machine.succeed('pdfgrep "Untitled score" "/root/Documents/MuseScore4/Scores/Untitled score.pdf"') + machine.send_key("alt-p") + machine.sleep(1) machine.screenshot("MuseScore5") + + # Wait until PDF is exported + machine.wait_for_file('"/root/Untitled score.pdf"') + + ## Check that it contains the title of the score + machine.succeed('pdfgrep "Untitled score" "/root/Untitled score.pdf"') + machine.copy_from_vm("/root/Untitled score.pdf") ''; })