If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Mozmill overwrites last test case if Save of New Template

VERIFIED FIXED

Status

Testing Graveyard
Mozmill
--
major
VERIFIED FIXED
9 years ago
a year ago

People

(Reporter: tracy, Unassigned)

Tracking

({dataloss})

Details

(Whiteboard: [verified-mozmill-1.1])

(Reporter)

Description

9 years ago
Seen on Mozmill 1.0.2

STR:
1) Create a sample test case and save it to file as test_Foo.js
2) open Tests > New Test Template
3) File > Save

Tested results:
test_Foo.js is overwritten with the content of the New Test Template

Expected results:
New Test Template should be treated like a New File. File > Save should be greyed out, thus not for use until the New Test Template has been Saved As...
Adam, can you please check this?
OS: Mac OS X → All
Hardware: x86 → All

Comment 2

9 years ago
Not seeing this behavior with trunk, 

I create a new file and save it
generate a new test from boilerplate
file save (nothing happens as this saves the tmp file somewhere in the ether, old file is the same)
file save as the new file, now have two different files.

Is there more to the repro?
(Reporter)

Comment 3

9 years ago
Adam, no, the steps I reported will work every time.  Clint thought this might be fixed on the trunk with the new UI.  Though, I might then be concerned with the new behavior of "Save" sending the file off to no-mans-land.  Shouldn't it open the same dialog as "Save As..." until the file is actually named by the user?  That's how other text editors handle saving new, unnamed files.

Comment 4

9 years ago
Ah yeah I was working with trunk, I think you are right that save should open the save as dialog if it's a file saved in a temp location -- will fix this tomorrow in trunk. Thanks for the clarification.

Comment 5

9 years ago
Save As for a temp file now calls save(), Fixed in trunk.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

9 years ago
What does it do for "Save" of a temp file? (or is that what you meant)
Not fixed. Here some more steps:

1. Open a test file
2. Select new template
3. Run the test

With step 3 the loaded test from step 1 gets overwritten.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

9 years ago
Whiteboard: [mozmill-1.1]

Comment 8

9 years ago
Followed the steps, now running the newly generated test requires that you save it as its own file first.

Comment 9

9 years ago
People didn't like that solution, but I have since re-factored this code, Henrik can you re-validate that this is still a issue.
Adam, I cannot test this because I even get no save as dialog. It looks like the test is saved in the temporary folder with the initial name. :/

Comment 11

9 years ago
The decided upon behavior on IRC last night was that you create a new temp file, running it will automatically save that temp file and run it, if you want to save it as something else, you can do that. Any changes to the contents of files should give them an edited "star", until you save them, and it should go away.
There is something broken in the file overlay. When I chose new from template a new file is created but doesn't get the star. Why the overlay doesn't close automatically? When I click on Close no star is shown. It's only visible when I hit ESC twice.

Comment 13

9 years ago
Great catch, Committed revision 391.
Ok, seems like we are getting forward step by step. :) 

(In reply to comment #11)
> The decided upon behavior on IRC last night was that you create a new temp
> file, running it will automatically save that temp file and run it, if you want
> to save it as something else, you can do that. Any changes to the contents of
> files should give them an edited "star", until you save them, and it should go
> away.

That's not true. I'm not able to save the file under a new file name. It seems like that this menu item is completely broken. Even when I select it inside the file overlay the new template is saved with the temporary file name. There is no way that I can choose another name. So IMO the save as dialog should appear in the following situations:

* When a new file should be executed the first time
* When I hit Cmd+S for an unnamed file
* When I select Save as for an existing file

Comment 15

9 years ago
I just tested this out, it works the way I would expect it.. if I want to save a file with a different name, I goto file, 'save as' and type in a new name. 

 When a new file is executed the first time we have decided that the correct behavior is save it to whatever file it currently is (even if its a temp file) and run it. Hitting cmd+s for a temp file, saves your current test to that temp file, sometimes people want to run and work on a file in its temp state and save it somewhere else only specifically when they are ready to. 

The functionality is currently working as it was described to me by clint and mikeal so that is a design conversation that you can have up with them.
This seems to be working the way I would expect.

Comment 17

9 years ago
This is working as I'd expect too.  CMD + S still saves your template as a template in some undisclosed location, but that isn't too bad.  I'd say the original bug here is fixed, and if there is a tweak for future optimization we can open a new bug for that. I think comment 11 is the right solution and will prevent dataloss, which is the main thrust of this issue.
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → FIXED
Verified with r398.
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.1] → [verified-mozmill-1.1]
(Assignee)

Updated

a year ago
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.