Skip to content

Commit

Permalink
update emails to .gov and remove save click
Browse files Browse the repository at this point in the history
  • Loading branch information
CMurrell148 committed Jan 2, 2025
1 parent 5901cba commit 14573b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ describe("Testing the components of the Trust contacts page", () => {

it(`Checks that when cancelling the edit of a TRM contact that I am taken back to the previous page and that entered data is not saved`, () => {
contactsPage
.editTrustRelationshipManagerWithoutSaving("Should Notbe Seen", "exittest@education.co.uk")
.editTrustRelationshipManagerWithoutSaving("Should Notbe Seen", "exittest@education.gov.uk")
.clickContactUpdateCancelButton()
.checkTrustRelationshipManagerIsNotUpdated("Should Notbe Seen", "exittest@education.co.uk");
.checkTrustRelationshipManagerIsNotUpdated("Should Notbe Seen", "exittest@education.gov.uk");

navigation
.checkCurrentURLIsCorrect(`/trusts/contacts/in-dfe?uid=${uid}`);
});

it(`Checks that when cancelling the edit of a SFSO contact that I am taken back to the previous page and that entered data is not saved`, () => {
contactsPage
.editSfsoLeadWithoutSaving("Should Notbe Seen", "exittest@education.co.uk")
.editSfsoLeadWithoutSaving("Should Notbe Seen", "exittest@education.gov.uk")
.clickContactUpdateCancelButton()
.checkSfsoLeadIsNotUpdated("Should Notbe Seen", "exittest@education.co.uk");
.checkSfsoLeadIsNotUpdated("Should Notbe Seen", "exittest@education.gov.uk");

navigation
.checkCurrentURLIsCorrect(`/trusts/contacts/in-dfe?uid=${uid}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class ContactsPage {
trustRelationshipManager.editLink().click();
editContacts.nameInput().clear().type(name);
editContacts.emailInput().clear().type(email);
editContacts.saveButton().click();
return this;
}

Expand All @@ -103,20 +102,19 @@ class ContactsPage {
}

public editSfsoLead(name: string, email: string): this {
const { schoolsFinancialSupportOversight, editContacts: EditContacts } = this.elements;
const { schoolsFinancialSupportOversight, editContacts } = this.elements;
schoolsFinancialSupportOversight.editLink().click();
EditContacts.nameInput().clear().type(name);
EditContacts.emailInput().clear().type(email);
EditContacts.saveButton().click();
editContacts.nameInput().clear().type(name);
editContacts.emailInput().clear().type(email);
editContacts.saveButton().click();
return this;
}

public editSfsoLeadWithoutSaving(name: string, email: string): this {
const { schoolsFinancialSupportOversight, editContacts: EditContacts } = this.elements;
const { schoolsFinancialSupportOversight, editContacts } = this.elements;
schoolsFinancialSupportOversight.editLink().click();
EditContacts.nameInput().clear().type(name);
EditContacts.emailInput().clear().type(email);
EditContacts.saveButton().click();
editContacts.nameInput().clear().type(name);
editContacts.emailInput().clear().type(email);
return this;
}

Expand Down

0 comments on commit 14573b7

Please sign in to comment.