Skip to content

Commit 47343e8

Browse files
committed
Updated Selectors to have same naming format
1 parent e04fd34 commit 47343e8

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/cypress/e2e/ui/manageSubmittedApplication/managedSubmittedECE5YearCertificationAddNewWERefrence.cy.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,19 @@ describe("Managed Submitted ECE5Year Certification Add New WE Refrence", () => {
9999
cy.get(selectors.applicationSubmitted.applicationSummaryButton).should("be.visible").should("contain.text", "Go to application summary");
100100

101101
// Manage Submitted Application
102-
cy.get(selectors.elementType.spanbutton).contains('Home').click();
102+
cy.get(selectors.elementType.span_button).contains('Home').click();
103103
cy.reload();
104-
cy.get(selectors.elementType.spanbutton).contains('Manage Application').click();
104+
cy.get(selectors.elementType.span_button).contains('Manage Application').click();
105105
cy.get(selectors.elementType.text_links).contains('500 hours of work experience with reference').click()
106106
cy.get('body').then($body => {
107107
if ($body.find('p.text-links:contains("WorkReference")').length > 0) {
108108
// Element exists → click it
109109
cy.contains('Unhandled Status').should('be.visible')
110-
cy.get(selectors.elementType.spanbutton).contains('Add reference').click();
110+
cy.get(selectors.elementType.span_button).contains('Add reference').click();
111111
} else {
112112
// Element not found → fallback
113113
cy.reload()
114-
cy.get(selectors.elementType.spanbutton).contains('Add reference').click();
114+
cy.get(selectors.elementType.span_button).contains('Add reference').click();
115115
}
116116
});
117117

@@ -120,7 +120,6 @@ describe("Managed Submitted ECE5Year Certification Add New WE Refrence", () => {
120120
cy.get('[aria-label="Email"]').type("[email protected]");
121121
cy.get('[aria-label="Phone number (optional)"]').type("1234567890");
122122
cy.get('[aria-label="Work experience hours observed by reference"]').type("500");
123-
cy.get(selectors.elementType.spanbutton).contains('Save new reference').click();
124-
123+
cy.get(selectors.elementType.span_button).contains('Save new reference').click();
125124
});
126125
});

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/cypress/e2e/ui/manageSubmittedApplication/managedSubmittedECE5YearPlusITEandSNECertificationAddProgramConfrimation.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ describe("managed Submitted ECE5Year Plus ITE and SNE Certification Add Program
9797
cy.get(selectors.applicationSubmitted.pageTitle).should("be.visible").should("contain.text", "Application Submitted");
9898
cy.get(selectors.applicationSubmitted.applicationSummaryButton).should("be.visible").should("contain.text", "Go to application summary");
9999
// Manage Submitted Application
100-
cy.get(selectors.elementType.spanbutton).contains('Home').click();
100+
cy.get(selectors.elementType.span_button).contains('Home').click();
101101
cy.reload();
102-
cy.get(selectors.elementType.spanbutton).contains('Manage Application').click();
102+
cy.get(selectors.elementType.span_button).contains('Manage Application').click();
103103
cy.get(selectors.elementType.text_links).contains('Program Confirmation Form:').click()
104104
cy.get('input[aria-label="I have my Program Confirmation Form and will upload it now."]').check({ force: true });
105-
cy.get(selectors.elementType.spanbutton).contains('Add file').click();
105+
cy.get(selectors.elementType.span_button).contains('Add file').click();
106106

107107
// Wait for hidden file input to appear in the DOM
108108
cy.get('input[type="file"]', { timeout: 10000 }).should('exist');
@@ -115,6 +115,6 @@ describe("managed Submitted ECE5Year Plus ITE and SNE Certification Add Program
115115

116116
// (Optional) Assert successful upload
117117
cy.contains('Upload complete').should('be.visible');
118-
cy.get(selectors.elementType.spanbutton).contains('Save').click();
118+
cy.get(selectors.elementType.span_button).contains('Save').click();
119119
});
120120
});

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/cypress/e2e/ui/manageSubmittedApplication/managedSubmittedECEAssistantCertificationAddPreviousName.cy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,18 @@ describe("Managed Submitted ECE Assistant Certification Add PreviousName", () =>
7979
cy.get(selectors.applicationSubmitted.pageTitle).should("be.visible").should("contain.text", "Application Submitted");
8080
cy.get(selectors.applicationSubmitted.applicationSummaryButton).should("be.visible").should("contain.text", "Go to application summary");
8181
// Manage Submitted Application
82-
cy.get(selectors.elementType.spanbutton).contains('Home').click();
82+
cy.get(selectors.elementType.span_button).contains('Home').click();
8383
cy.reload();
84-
cy.get(selectors.elementType.spanbutton).contains('Manage Application').click();
84+
cy.get(selectors.elementType.span_button).contains('Manage Application').click();
8585
cy.get(selectors.elementType.text_links).contains('Proof of previous name').click()
8686
cy.contains('a','Add previous name').click({ force: true });
8787
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
8888
cy.get('[aria-label="First name"]').type(`First Name_${timestamp}`);
8989
cy.get('[aria-label="Middle names (optional)"]').type(`Middle tName_${timestamp}`);
9090
cy.get('[aria-label="Last name"]').type(`Last Name_${timestamp}`);
9191

92-
cy.get(selectors.elementType.spanbutton).contains('Save and continue').click();
93-
cy.get(selectors.elementType.spanbutton).contains('Add file').click();
92+
cy.get(selectors.elementType.span_button).contains('Save and continue').click();
93+
cy.get(selectors.elementType.span_button).contains('Add file').click();
9494
// Wait for hidden file input to appear in the DOM
9595
cy.get('input[type="file"]', { timeout: 10000 }).should('exist');
9696

@@ -102,6 +102,6 @@ describe("Managed Submitted ECE Assistant Certification Add PreviousName", () =>
102102

103103
// (Optional) Assert successful upload
104104
cy.contains('Upload complete').should('be.visible');
105-
cy.get(selectors.elementType.spanbutton).contains('Send').click();
105+
cy.get(selectors.elementType.span_button).contains('Send').click();
106106
});
107107
});

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/cypress/support/selectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,6 @@ export default {
119119
button: "button",
120120
vListItem: "div.v-list-item",
121121
text_links: 'p.text-links',
122-
spanbutton: 'span.v-btn__content',
122+
span_button: 'span.v-btn__content',
123123
},
124124
};

0 commit comments

Comments
 (0)