Skip to content

Commit

Permalink
Add reject enrollment test.
Browse files Browse the repository at this point in the history
Issue #1050: Add more integration tests #1050
  • Loading branch information
Frank Duncan committed Sep 7, 2018
1 parent 6831ab5 commit 603bd87
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
</button>
<a
href="${ctx}/agent/enrollment/rejectTicket?id=${id}"
class="greyBtn"
class="rejectBtn greyBtn"
>
Reject
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public void i_approve_the_enrollment() {
enrollmentSteps.approveEnrollment();
}

@Given("^I Reject the Enrollment$")
public void i_reject_the_enrollment() {
enrollmentSteps.rejectEnrollment();
}

@When("^I view the Reviewed Enrollment$")
public void i_view_the_reviewed_enrollment() {
enrollmentSteps.navigateToMostRecentEnrollment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public void approveEnrollment() {
enrollmentReviewPage.approve();
}

@Step
public void rejectEnrollment() {
approvedEnrollmentId = enrollmentReviewPage.getEnrollmentId();
enrollmentReviewPage.reject();
}

@Step
public void navigateToMostRecentEnrollment() {
assertThat(approvedEnrollmentId).isNotNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ public void approve() {
new Checkbox($("[name=notInDmfVerified]")).setChecked(true);
$(".approveBtn").click();
}

public void reject() {
$(".rejectBtn").click();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@reject
Feature: Enrollment Reject Workflow
Users wish to execute reject workflow functions

Scenario: Provider Create Individual Workflow Enrollment
Given I have started an enrollment
And I am on the individual provider statement page
And I enter my individual provider statement
And I submit the enrollment
Then I should have no errors

Scenario: Admin Reject Individual Enrollment
Given I am logged in as an admin
And I am on the admin Pending page
When I am on the Review Enrollment Page for '0000000006'
And I Reject the Enrollment
And I view the Reviewed Enrollment
Then I should have no errors
And The Enrollment should be in the 'Denied' state
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Feature: Enrollment Renew Workflow
Users wish to execute workflow functions

Scenario: Provider Create Individual Workflow Enrollment
Scenario: Provider Create Individual Workflow Enrollment For Review
Given I have started an enrollment
And I am on the individual provider statement page
And I enter my individual provider statement
And I submit the enrollment
Then I should have no errors

Scenario: Provider Create Organization Workflow Enrollment
Scenario: Provider Create Organization Workflow Enrollment For Review
Given I have started an enrollment
And I am on the organization provider statement page
And I enter my organization provider statement
And I submit the enrollment
Then I should have no errors

Scenario: Admin Approve Organizational Workflow Enrollment
Scenario: Admin Approve Organizational Enrollment For Review
Given I am logged in as an admin
And I am on the admin Pending page
When I am on the Review Enrollment Page for '1234567893'
Expand All @@ -24,7 +24,7 @@ Feature: Enrollment Renew Workflow
Then I should have no errors
And The Enrollment should be in the 'Approved' state

Scenario: Admin Approve Individual Workflow Enrollment
Scenario: Admin Approve Individual Enrollment For Review
Given I am logged in as an admin
And I am on the admin Pending page
When I am on the Review Enrollment Page for '0000000006'
Expand All @@ -40,7 +40,7 @@ Feature: Enrollment Renew Workflow
Then I should have no errors
And The Enrollment should be in the 'Pending' state

Scenario: Admin Approve Updated Individual Enrollment
Scenario: Admin Approve Individual Reviewed Enrollment
Given I am logged in as an admin
And I am on the admin Pending page
When I am on the Review Enrollment Page for '0000000006'
Expand All @@ -56,7 +56,7 @@ Feature: Enrollment Renew Workflow
Then I should have no errors
And The Enrollment should be in the 'Pending' state

Scenario: Admin Approve Updated Organizational Enrollment
Scenario: Admin Approve Organizational Reviewed Enrollment
Given I am logged in as an admin
And I am on the admin Pending page
When I am on the Review Enrollment Page for '1234567893'
Expand Down

0 comments on commit 603bd87

Please sign in to comment.