mozilla/mcom-tests — pull request #75 by casschin (2012-08-14 05:31:06+00:00)
Title: Fix for download link tests from passing when it shouldn't have been

So I think I figured out the issue that we were talking about in chat earlier.

First, a definite issue was the CSS selectors for the Windows and Linux links were missing periods, which designates that as a class. Without the period, it couldn't find the links on the page and it would cause the test to fail after I made the change as described below.

The other issue was that the tests were passing when we weren't expecting them to. This might not be an issue, depending on what is the intention of download link test. If we want to check to see if the download link is visible for the respective OS the test is running from, than this commit should fix that. The test was passing with the invalid Windows/Linux CSS selectors because the OS X link was always present on the page and since it was returning all three values with an OR operator, it would always return true.

If the intention of the test is to check if these links are present, you would just need to change the operator on the function to AND.