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

CIV-0000 Basic GA creation #4206

Closed
wants to merge 3 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const I = actor();
class createGAAppSteps {

async askForMoreTimeCourtOrderGA() {
await I.waitForContent('Contact the court to request a change to my case', 60);
await I.click('Contact the court to request a change to my case');
await I.waitForContent('Select application', 60);
await I.click('Ask for more time to do what is required by a court order'); //#option-5
await I.click('Continue');
await I.waitForContent('Have the other parties agreed to this application?', 60);
await I.click('Yes'); //#option
await I.click('Continue');
await I.waitForContent('the application fee is', 60);
await I.click('Start now');
await I.waitForContent('Do you want to ask for your costs back?', 60);
await I.click('Yes'); //#option
await I.click('Continue');
await I.waitForContent('What order do you want the judge to make?', 60);
await I.fillField('#text', 'Test order');
await I.click('Continue');
await I.waitForContent('Why are you requesting this order?', 60);
await I.fillField('#text', 'Test order');
await I.click('Continue');
await I.waitForContent('Do you want to add another application?', 60);
await I.click('No'); //#option-2
await I.click('Continue');
await I.waitForContent('Do you want to upload', 60);
await I.click('No'); //#option-2
await I.click('Continue');
await I.waitForContent('hearing arrangements', 60);
await I.click('Continue');
await I.waitForContent('What type of hearing', 60);
await I.click('In person at the court'); //#option
await I.fillField('#reasonForPreferredHearingType', 'Inperson');
await I.selectOption('#courtLocation', 'Birmingham Civil and Family Justice Centre - Priory Courts, 33 Bull Street - B4 6DS');
await I.click('Continue');
await I.waitForElement('#telephoneNumber');
await I.fillField('#telephoneNumber', '07555655326');
await I.fillField('#emailAddress', '[email protected]');
await I.click('Continue');
await I.waitForContent('any dates when you cannot attend a hearing', 60);
await I.click('Continue');
await I.waitForContent('adustments', 60);
await I.click('Continue');
await I.waitForContent('Paying', 60);
await I.click('Continue');
await I.waitForContent('Check your answers', 60);
await I.click('#signed');
await I.fillField('#name', 'tester name');
await I.click('Submit');
}
}

module.exports = new createGAAppSteps();
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
const steps = require('../../../citizenFeatures/createClaim/steps/createLipvLipClaimSteps');
const config = require('../../../../config');

const createGAAppSteps = require('../../../citizenFeatures/response/steps/createGAAppSteps');

const {createAccount} = require('../../../specClaimHelpers/api/idamHelper');
const LoginSteps = require('../../../commonFeatures/home/steps/login');

let caseRef, selectedHWF;
let caseRef, selectedHWF, caseData, claimNumber;

Feature('Create Lip v Company claim - Individual vs Company @claimCreation').tag('@regression-r2');

Scenario('Create Claim - Individual vs Company - small claims - no interest - no hwf - flightdelay claim', async ({api}) => {
Scenario('Create Claim - Individual vs Company - small claims - no interest - no hwf - flightdelay claim', async ({api, I}) => {
if (['preview', 'demo'].includes(config.runningEnv)) {
selectedHWF = false;
const defaultClaimFee = 455;
const defaultClaimAmount = 9000;
await createAccount(config.claimantCitizenUser.email, config.claimantCitizenUser.password);
await createAccount(config.defendantCitizenUser.email, config.defendantCitizenUser.password);
await LoginSteps.EnterCitizenCredentials(config.claimantCitizenUser.email, config.claimantCitizenUser.password);
await steps.createClaimDraftViaTestingSupport();
//Change defendant to company, and add flightdelay claim
Expand All @@ -24,5 +27,17 @@ Scenario('Create Claim - Individual vs Company - small claims - no interest - n
await steps.clickPayClaimFee();
await steps.verifyAndPayClaimFee(defaultClaimAmount, defaultClaimFee);
await api.waitForFinishedBusinessProcess();
caseData = await api.retrieveCaseData(config.adminUser, caseRef);
claimNumber = await caseData.legacyCaseReference;
await api.assignToLipDefendant(caseRef);
console.log('Creating GA app as claimant');
await I.amOnPage('/dashboard');
await I.click(claimNumber);
await createGAAppSteps.askForMoreTimeCourtOrderGA();
console.log('Creating GA app as claimant');
await LoginSteps.EnterCitizenCredentials(config.defendantCitizenUser.email, config.defendantCitizenUser.password);
await I.amOnPage('/dashboard');
await I.click(claimNumber);
await createGAAppSteps.askForMoreTimeCourtOrderGA();
}
});
Loading