During yesterday’s QA meeting, i shared my experience while working on [RATEST-242] New E2E Test: Conditions Workflow - OpenMRS Issues where i was basically dealing with fixing the ignored scenarios in the conditions test workflow. However the experience was not appealing since currently that test workflow is embedded in All Firefox Tests henceforth having to endure the pain of waiting for all these other tests (30+ minutes) to get executed before i could observe the effect of e.g a small change i made in the conditions.feature file. And in case one of the prior test-work-flows fails , i wont be able to get to the test-flow(conditions) i want or working on.
It is on that background that i suggested the separation of the conditions workflow from the All Firefox Tests. The conditons feature file has 6 scenarios as can be observed here and i think it is fit to stand on its own as a separate/independent workflow.
And it is to that effect that i have been advised to include that work in the ticket here that am currently working on rather than creating a new jira ticket for it.
I second the idea! It will even make work simpler in future when figuring out a test that may fail during build plans.
This would mean writing its own workflow that will trigger the test to run during CI. Take a leaf on some of the existing workflow for example 2.x RefApp refapp-2.x-user-account.yml and you will need to create a customized hook in RunTest file to have something like;
public class RunTest {
public class HOOK {
public static final String SELENIUM = "@selenium";
public static final String CONDITION = "@condition";
public static final String SELENIUM_CONDITION = SELENIUM + " and " + CONDITION ;
}
}
And then invoke the RunTest.HOOK.SELENIUM_CONDITION within the selenium tests on @Before and @After method.
Also ensure the scenario tags in the condition feature file are changed to @selenium and @condition
Well done @mherman22 , To add on @kdaud suggestion, it seem not quite different though. Have this as a separate workflow, Follow the same convention as suggested up by @kdaud and create a new flow, it only requires you to change few things in runTest class, updating feature file, and have conditionSteps class to convey the feature files.
However @kdaud & @sharif you could shed more light on how i can get that badge here GitHub - openmrs/openmrs-contrib-qaframework. Does the badge come when the workflow is created or theres another procedure to follow to get that badge
@mherman22 you need to Copy status budge markdown which is auto-generated by Github. Go to qaframework repo and Click on Actions → Then click on your workflow(check on the left side below the word Workflows) → Then click on Create status budge. This will generate a markdown code which you need to copy and add in the ReadMe.md file. See a sample of RefApp 2.x UserAccount
Edit first inactive condition(Patient's Conditions Managment): Expected condition failed: waiting for org.openmrs.contrib.qaframework.helper.Page$1@501e212f (tried for 120 second(s) with 500 milliseconds interval)(..) for a full report checkout here.
Tests in error:
Edit first active condition(Patient's Conditions Managment): Expected condition failed: waiting for org.openmrs.contrib.qaframework.helper.Page$1@7572ac8b (tried for 120 second(s) with 500 milliseconds interval)(..)
Edit first inactive condition(Patient's Conditions Managment): Expected condition failed: waiting for org.openmrs.contrib.qaframework.helper.Page$1@501e212f (tried for 120 second(s) with 500 milliseconds interval)(..)
It seems like the current set value for EDIT condition is referencing more than one page element which is probably failing the test during its look-up. You need to inspect the page element and get a value that uniquely identifies it.
thanks for pointing me in that direction and after that call where we changed the cssSelector of the two edit elements in the editActive and editInactive funcs, i come baring bad news the blocker is still the same as shown in the full log report here especially line 185 - 287.
so i was able to get rid of one error and am only remaining with this
Tests in error:
Edit first inactive condition(Patient’s Conditions Managment): Expected condition failed: waiting for visibility of element located by By.cssSelector: #INACTIVE i.icon-pencil.edit-action.ng-scope (tried for 120 second(s) with 500 milliseconds interval)(…)
however when i try to add a waiting element to the element by putting this
waiter.until(ExpectedConditions
.elementToBeClickable(EDIT_INACTIVE_CONDITION)); , there’s no change. any advice @kdaud