There's an easy solution to this particular line: just make it check to make sure that the button text equals Strings.OVERWRITE. It still tests the logic of choosing the correct button label.

I thought I would have trouble with the `expect(fields.$dlg.find(".message").text()).toMatch` line that was a few lines down from there, but that also turns out to be okay if I just change it to check that it's Strings.ALREADY_INSTALLED.