Currently, there are certain test cases that I need to run only under specific conditions.
it ('user can successfully log in', function() {
if(siteAllowsLogin) {
.....
}
The problem with the above approach is that even when sitesNotAllowingLogin, this particular test still gets marked as PASS. Although marking the test as PENDING is an option, I would prefer for it not to be displayed at all if it's not applicable.
Ideally, I want to maintain the logic within the test case itself by keeping the conditional block inside it.
If anyone has suggestions on how to skip this test unless the condition is met without displaying it as PENDING or PASSED, your help would be highly appreciated.