nixosTests.musescore: adapt test to 4.6.0 and beyond

This commit is contained in:
Doron Behar
2025-10-05 23:40:35 +03:00
parent 6e30a256ae
commit 21008a6b52

View File

@@ -5,9 +5,15 @@ let
customMuseScoreConfig = hostPkgs.writeText "MuseScore4.ini" '' customMuseScoreConfig = hostPkgs.writeText "MuseScore4.ini" ''
[application] [application]
hasCompletedFirstLaunchSetup=true hasCompletedFirstLaunchSetup=true
welcomeDialogLastShownIndex=0
welcomeDialogLastShownVersion=${hostPkgs.musescore.version}
welcomeDialogShowOnStartup=false
[project] [project]
preferredScoreCreationMode=1 preferredScoreCreationMode=1
[tours]
lastShownTours=",project_opened/input-by-duration"
''; '';
in in
{ {
@@ -66,7 +72,7 @@ in
machine.sleep(2) machine.sleep(2)
machine.send_key("tab") machine.send_key("right")
# Type the beginning of https://de.wikipedia.org/wiki/Alle_meine_Entchen # Type the beginning of https://de.wikipedia.org/wiki/Alle_meine_Entchen
machine.send_chars("cdef6gg5aaaa7g") machine.send_chars("cdef6gg5aaaa7g")
machine.sleep(1) machine.sleep(1)
@@ -79,15 +85,14 @@ in
# Wait until the Print dialogue appears. # Wait until the Print dialogue appears.
machine.wait_for_window("Print") machine.wait_for_window("Print")
machine.screenshot("MuseScore4") machine.screenshot("MuseScore3")
machine.send_key("alt-p") machine.send_key("alt-p")
machine.sleep(1)
machine.screenshot("MuseScore5")
# Wait until PDF is exported # Wait until PDF is exported
machine.wait_for_file('"/root/Untitled score.pdf"') machine.wait_for_file('"/root/Untitled score.pdf"')
machine.screenshot("MuseScore4")
## Check that it contains the title of the score ## Check that it contains the title of the score
machine.succeed('pdfgrep "Untitled score" "/root/Untitled score.pdf"') machine.succeed('pdfgrep "Untitled score" "/root/Untitled score.pdf"')
machine.copy_from_vm("/root/Untitled score.pdf") machine.copy_from_vm("/root/Untitled score.pdf")