Added sanity checks into grid layout computation
Fixed menu UI tests by specifying primary mouse button