Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing WA tests #1659

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions functional-test/e2e/supplementary.response.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,38 @@ test.describe.serial('WA - Action Unprocessed Correspondence CTSC task initiatio

let caseId : string;

test.beforeAll("Create case and allocate to CTSC Admin", async ({ supplementaryResponseSteps }) => {
test.beforeAll('Create case', async () => {
caseId = await createCaseBasedOnCaseType('PIP');
});

test('As a CTSC allocator, allocate case to CTSC Admin', async ({
supplementaryResponseSteps }) => {

await supplementaryResponseSteps.allocateCaseToCtscUser(caseId);
});

test("As a DWP user, provide supplementary response", async ({
test('As a DWP user, provide supplementary response', async ({
supplementaryResponseSteps }) => {

test.slow();
await supplementaryResponseSteps.performSupplementaryResponse(caseId);
});

test("CTSC Admin as allocated case worker, views the Action Unprocessed Correspondence task", async ({
test('CTSC Admin as allocated case worker, views the Action Unprocessed Correspondence task', async ({
supplementaryResponseSteps }) => {

test.slow();
await supplementaryResponseSteps.verifyCtscAdminAsAllocatedCaseWorkerCanViewTheAutomaticallyAssignedActionUnprocessedCorrespondenceTask(caseId);
});

test("CTSC Admin as allocated case worker, completes the Action Unprocessed Correspondence task", async ({
test('CTSC Admin as allocated case worker, completes the Action Unprocessed Correspondence task', async ({
supplementaryResponseSteps }) => {

test.slow();
await supplementaryResponseSteps.verifyCtscAdminAsAllocatedCaseWorkerCanCompleteTheAssignedActionUnprocessedCorrespondenceTask(caseId);
});

test.afterAll("Case has to be set to Dormant", async () => {
test.afterAll('Set case state to Dormant', async () => {
await performAppealDormantOnCase(caseId);
});
});
Expand All @@ -46,19 +51,38 @@ test.describe('WA - Action Unprocessed Correspondence CTSC task cancellation', {

let caseId : string;

test.beforeAll("Create case and allocate to CTSC Admin", async ({ supplementaryResponseSteps }) => {
test.beforeAll('Create case', async () => {
caseId = await createCaseBasedOnCaseType('PIP');
});

test('As a CTSC allocator, allocate case to CTSC Admin', async ({
supplementaryResponseSteps }) => {

await supplementaryResponseSteps.allocateCaseToCtscUser(caseId);
});

test("CTSC Admin as allocated case worker, cancels the Action Unprocessed Correspondence CTSC task manually", async ({
test('As a DWP user, provide supplementary response', async ({
supplementaryResponseSteps }) => {

test.slow();
await supplementaryResponseSteps.performSupplementaryResponse(caseId);
});

test('CTSC Admin as allocated case worker, views the Action Unprocessed Correspondence task', async ({
supplementaryResponseSteps }) => {

test.slow();
await supplementaryResponseSteps.verifyCtscAdminAsAllocatedCaseWorkerCanViewTheAutomaticallyAssignedActionUnprocessedCorrespondenceTask(caseId);
});

test('CTSC Admin as allocated case worker, cancels the Action Unprocessed Correspondence CTSC task manually', async ({
supplementaryResponseSteps}) => {

test.slow();
await supplementaryResponseSteps.verifyActionUnprocessedCorrespondenceTaskCanBeCancelledManuallyByAllocatedCtscAdmin(caseId);
});

test.afterAll("Case has to be set to Dormant", async () => {
test.afterAll('Set case state to Dormant', async () => {
await performAppealDormantOnCase(caseId);
});
});
75 changes: 49 additions & 26 deletions functional-test/e2e/upload.document.further.evidence.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from "../lib/steps.factory";
import createCaseBasedOnCaseType from "../api/client/sscs/factory/appeal.type.factory";
import performAppealDormantOnCase from "../api/client/sscs/appeal.event";
import { test } from '../lib/steps.factory';
import createCaseBasedOnCaseType from '../api/client/sscs/factory/appeal.type.factory';
import performAppealDormantOnCase from '../api/client/sscs/appeal.event';


test.describe.serial('WA - Action Unprocessed Correspondence CTSC task initiation and completion tests', {
Expand All @@ -9,33 +9,38 @@ test.describe.serial('WA - Action Unprocessed Correspondence CTSC task initiatio

let caseId : string;

test.beforeAll("Create case and allocate to CTSC Admin", async ({ uploadDocumentFurtherEvidenceSteps }) => {
test.beforeAll('Create case', async () => {
caseId = await createCaseBasedOnCaseType('PIP');
});

test('As a CTSC Case allocator, allocate task to CTSC Admin', async ({
uploadDocumentFurtherEvidenceSteps }) => {

await uploadDocumentFurtherEvidenceSteps.allocateCaseToCtscUser(caseId);
});

test("As a CTSC Admin, upload document further evidence", async ({
test('As a CTSC Admin, upload document further evidence', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.performUploadDocumentFurtherEvidence(caseId);
});

test("CTSC Admin as allocated case worker, views the Action Unprocessed Correspondence CTSC task", async ({
test('CTSC Admin as allocated case worker, views the Action Unprocessed Correspondence CTSC task', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyCtscAdminAsAllocatedCaseWorkerCanViewTheAutomaticallyAssignedActionUnprocessedCorrespondenceTask(caseId);
});

test("CTSC Admin as allocated case worker, completes the Action Unprocessed Correspondence CTSC task", async ({
test('CTSC Admin as allocated case worker, completes the Action Unprocessed Correspondence CTSC task', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyCtscAdminAsAllocatedCaseWorkerCanCompleteTheAssignedActionUnprocessedCorrespondenceTask(caseId);
});

test.afterAll("Case has to be set to Dormant", async () => {
test.afterAll('Case has to be set to Dormant', async () => {
await performAppealDormantOnCase(caseId);
});
});
Expand All @@ -47,20 +52,33 @@ test.describe('WA - Action Unprocessed Correspondence CTSC task cancellation', {

let caseId : string;

test.beforeAll("Create case", async ( { uploadDocumentFurtherEvidenceSteps }) => {
test.beforeAll('Create case', async () => {
test.slow();
caseId = await createCaseBasedOnCaseType('PIP');
});

test('As a CTSC Admin, upload document further evidence', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.performUploadDocumentFurtherEvidence(caseId);
});

test("CTSC Admin cancels the unassigned Action Unprocessed Correspondence CTSC task manually", async ({
test('CTSC Admin as allocated case worker, views the Action Unprocessed Correspondence CTSC task', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyCtscAdminAsAllocatedCaseWorkerCanViewTheAutomaticallyAssignedActionUnprocessedCorrespondenceTask(caseId);
});

test('CTSC Admin cancels the unassigned Action Unprocessed Correspondence CTSC task manually', async ({
uploadDocumentFurtherEvidenceSteps}) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyUnassignedActionUnprocessedCorrespondenceTaskCanBeCancelledManuallyByCtscAdmin(caseId);
});

test.afterAll("Case has to be set to Dormant", async () => {
test.afterAll('Case has to be set to Dormant', async () => {
await performAppealDormantOnCase(caseId);
});
});
Expand All @@ -72,38 +90,41 @@ test.describe.serial('WA - Review Bi-Lingual Document CTSC task initiation and c

let caseId : string;

test.beforeAll("Create case, allocate to CTSC Admin and update language preference to Welsh", async ({
test.beforeAll('Create case', async () => {
caseId = await createCaseBasedOnCaseType('PIP');
});

test('Allocate case to CTSC Admin and update language preference to Welsh', async ({
uploadDocumentFurtherEvidenceSteps,
updateLanguagePreferenceSteps }) => {

test.slow();
caseId = await createCaseBasedOnCaseType('PIP');
await uploadDocumentFurtherEvidenceSteps.allocateCaseToCtscUser(caseId);
await updateLanguagePreferenceSteps.performUpdateLanguagePreference(caseId, false);
});

test("As a CTSC Admin, upload document further evidence", async ({
test('As a CTSC Admin, upload document further evidence', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.performUploadDocumentFurtherEvidence(caseId);
});

test("As a CTSC Admin, view the Review Bi-Lingual Document CTSC task", async ({
test('As a CTSC Admin, view the Review Bi-Lingual Document CTSC task', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyCtscAdminAsAllocatedCaseWorkerCanViewTheAutomaticallyAssignedReviewBilingualDocumentTask(caseId);
});

test("CTSC Admin as allocated case worker, completes the Review Bi-Lingual Document CTSC task", async ({
test('CTSC Admin as allocated case worker, completes the Review Bi-Lingual Document CTSC task', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyCtscAdminAsAllocatedCaseWorkerCanCompleteTheAssignedReviewBilingualDocumentTask(caseId);
});

test.afterAll("Case has to be set to Dormant", async () => {
test.afterAll('Case has to be set to Dormant', async () => {
await performAppealDormantOnCase(caseId);
});
});
Expand All @@ -115,36 +136,38 @@ test.describe.serial('WA - Review Bi-Lingual Document CTSC task cancellation tes

let caseId : string;

test.beforeAll("Create case and update language preference to Welsh", async ({
test.beforeAll('Create case', async () => {
caseId = await createCaseBasedOnCaseType('PIP');
});

test('As a CTSC Admin, update language preference to Welsh', async ({
updateLanguagePreferenceSteps }) => {

test.slow();
caseId = await createCaseBasedOnCaseType('PIP');
await updateLanguagePreferenceSteps.performUpdateLanguagePreference(caseId);
await updateLanguagePreferenceSteps.performUpdateLanguagePreference(caseId, true);
});

test("As a CTSC Admin, upload document further evidence", async ({
test('As a CTSC Admin, upload document further evidence', async ({
uploadDocumentFurtherEvidenceSteps }) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.performUploadDocumentFurtherEvidence(caseId);
});

test("CTSC Admin cancels the unassigned Review Bi-Lingual Document CTSC task manually", async ({
test('CTSC Admin views Review Bi-Lingual Document CTSC task and cancels Welsh translations', async ({
uploadDocumentFurtherEvidenceSteps}) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyUnassignedReviewBilingualDocumentTaskIsCancelledWhenTranslationsAreCancelledByCtscAdmin(caseId);
await uploadDocumentFurtherEvidenceSteps.verifyCtscAdminCanViewBilingualDocumentTaskAndCancelWelshTranslations(caseId);
});

test("CTSC Admin verifies Review Bi-Lingual Document CTSC task is removed from the tasks list", async ({
test('CTSC Admin verifies Review Bi-Lingual Document CTSC task is removed from the tasks list', async ({
uploadDocumentFurtherEvidenceSteps}) => {

test.slow();
await uploadDocumentFurtherEvidenceSteps.verifyUnassignedReviewBilingualDocumentTaskIsRemovedFromTheTasksList(caseId);
});

test.afterAll("Case has to be set to Dormant", async () => {
test.afterAll('Case has to be set to Dormant', async () => {
await performAppealDormantOnCase(caseId);
});
});
9 changes: 6 additions & 3 deletions functional-test/fixtures/steps/supplementary.response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export class SupplementaryResponse extends BaseStep {
await this.loginUserWithCaseId(credentials.amCaseWorker, false, caseId);
await this.homePage.navigateToTab('Tasks');
await this.tasksTab.verifyTaskIsDisplayed(task.name);

// CTSC Admin verifies assigned task details
await this.tasksTab.verifyPriortiy(task.name, task.priority);
await this.tasksTab.verifyPageContentByKeyValue(task.name, 'Assigned to', task.assignedTo);
await this.tasksTab.verifyManageOptions(task.name, task.assignedManageOptions);
await this.tasksTab.verifyNextStepsOptions(task.name, task.nextStepsOptions);
}

async verifyCtscAdminAsAllocatedCaseWorkerCanCompleteTheAssignedActionUnprocessedCorrespondenceTask(caseId: string) {
Expand Down Expand Up @@ -87,9 +93,6 @@ export class SupplementaryResponse extends BaseStep {

async verifyActionUnprocessedCorrespondenceTaskCanBeCancelledManuallyByAllocatedCtscAdmin(caseId: string) {

// Dwp user performs Supplementary response event
await this.performSupplementaryResponse(caseId);

// Verify CTSC Admin as allocated caseworker can view the automatically assigned Action Unprocessed Correspondence task
await this.loginUserWithCaseId(credentials.amCaseWorker, true, caseId);
await this.homePage.navigateToTab('Tasks')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class UploadDocumentFurtherEvidence extends BaseStep {
await this.tasksTab.verifyTaskIsHidden(aucTask.name);
}

async verifyUnassignedReviewBilingualDocumentTaskIsCancelledWhenTranslationsAreCancelledByCtscAdmin(caseId: string) {
async verifyCtscAdminCanViewBilingualDocumentTaskAndCancelWelshTranslations(caseId: string) {

// Verify CTSC Admin can view the unassigned Review Bi-Lingual Document task
await this.loginUserWithCaseId(credentials.amCaseWorker, true, caseId);
Expand Down