test "Loading and Reloading"
	status active
	description "Load a save-game, perform some actions and load the game again."
	sequence
		# Create/inject the savegame and load it.
		inject "Three Earthly Barges"
		call "Load First Savegame"
		call "Depart"
		assert
			year == 3013
			month == 11
			day == 17
		# Set desired travel plan.
		navigate
			travel "Alpha Centauri"
			travel "Sol"
			travel "Alpha Centauri"
		input
			command jump
		# Wait loop while jumping to Alpha Centuari (with a timeout for if this jump fails).
		watchdog 12000
		label notAlpha1
		branch notAlpha1
			not "flagship system: Alpha Centauri"
		assert
			year == 3013
			month == 11
			day == 18
		call "Open Menu"
		call "Load First Savegame"
		call "Depart"
		assert
			year == 3013
			month == 11
			day == 17


test "Loading and Saving"
	status active
	description "Test saving of snapshots and re-loading of saved snapshots."
	sequence
		# Create/inject the savegame and load it.
		inject "Three Earthly Barges"
		call "Load First Savegame"
		call "Depart"
		assert
			year == 3013
			month == 11
			day == 17
		# Set desired travel plan. Travel is in 2 parts, since we should not set
		# an Earth destination when in the same system as Earth.
		navigate
			travel "Alpha Centauri"
		input
			command jump
		watchdog 12000
		label notAlpha1
		branch notAlpha1
			not "flagship system: Alpha Centauri"
		# Terminate jumping if it still is active.
		input
			command forward
		navigate
			travel "Sol"
			"travel destination" Earth
		input
			command jump
		watchdog 12000
		label notReturned1
		branch notReturned1
			not "flagship planet: Earth"
		assert
			year == 3013
			month == 11
			day == 19
		call "Open Menu"
		call "Save To Default Snapshot"
		call "Depart"
		assert
			year == 3013
			month == 11
			day == 20
		# Set desired travel plan.
		navigate
			travel "Alpha Centauri"
			travel "Sol"
			travel "Alpha Centauri"
		input
			command jump
		# Wait loop while jumping to Alpha Centuari (with a timeout for if this jump fails).
		watchdog 12000
		label notAlpha2
		branch notAlpha2
			not "flagship system: Alpha Centauri"
		assert
			year == 3013
			month == 11
			day == 21
		call "Open Menu"
		call "Load First Savegame"
		call "Depart"
		assert
			year == 3013
			month == 11
			day == 20
