Orbit-based conditional tests. A link between permutations and Markov bases