# Open by Path (1.5.2): the row under "+ Open PDF" and Ctrl+Shift+O ask for a typed or pasted path.
# Starts with no PDF open and the Recent list on (show_recent=1 in its settings.ini). test/wine/edit_tests.sh
# replaces @R with the run's suffix and puts a copy of test/sample.pdf in a folder with spaces in its name.
wait 1200
echo --- 1. no PDF open: the second row of the left column opens the box, empty
click 100 51
wait 600
state test/out/t26_01_box-@R.txt
shotscreen test/out/t26_01_box-@R.png
echo --- 2. a file that is not there: the box stays open and says so
type Z:\src\test\out\t26-@R\Sample Report\Field - Final\missing.pdf
key enter
wait 400
state test/out/t26_02_missing-@R.txt
shotscreen test/out/t26_02_missing-@R.png
echo --- 3. the folder: the box stays open and says it is a folder
type Z:\src\test\out\t26-@R\Sample Report\Field - Final
key enter
wait 400
state test/out/t26_03_folder-@R.txt
echo --- 4. the file in quotes (Explorer's "Copy as path") with a space in front: it opens
type  "Z:\src\test\out\t26-@R\Sample Report\Field - Final\report 01.pdf"
key enter
wait 1200
state test/out/t26_04_opened-@R.txt
shotscreen test/out/t26_04_opened-@R.png
echo --- 5. Ctrl+Shift+O: the box holds the last path; Enter goes back to that tab, no second copy
key ctrl+shift+o
wait 600
state test/out/t26_05_box_again-@R.txt
key enter
wait 600
state test/out/t26_06_same_tab-@R.txt
echo --- 6. the row (now under one tab): another file typed, then Esc: nothing opens
click 100 85
wait 600
state test/out/t26_07_box_row-@R.txt
type Z:\src\test\out\t26-@R.pdf
key esc
wait 400
state test/out/t26_08_cancelled-@R.txt
echo --- 7. forward slashes: the other file opens in a second tab
key ctrl+shift+o
wait 600
type Z:/src/test/out/t26-@R.pdf
key enter
wait 1200
state test/out/t26_09_slashes-@R.txt
echo --- 8. close both; the Recent rows start one row lower: the second row is the first file
key ctrl+w
key ctrl+w
wait 600
shotscreen test/out/t26_10_recent-@R.png
click 100 166
wait 1200
state test/out/t26_11_from_recent-@R.txt
quit
