fix(client): display legacy certs like current ones (#42038)
* fix: display legacy certs like the current ones * fix: link projects in legacy certs to project pages * fix: update tests to changed legacy cert display * fix: update tests for removed legacy certs forms * fix: display legacy certs like the current ones * fix: submit projects for cert on projects pages * fix: remove legacy certs form submitting handling * fix: move claiming cert setup before both tests * fix: remove legacy cert update props and actions * fix: remove legacy cert updates from api * fix: correct merge conflict
This commit is contained in:
@ -10,9 +10,9 @@ describe('Settings certifications area', () => {
|
||||
});
|
||||
|
||||
describe('initially', () => {
|
||||
it('Should render 11 "Claim Certification" buttons', () => {
|
||||
it('Should render 15 "Claim Certification" buttons', () => {
|
||||
cy.findAllByText('Claim Certification').should($btns => {
|
||||
expect($btns).to.have.length(11);
|
||||
expect($btns).to.have.length(15);
|
||||
});
|
||||
});
|
||||
|
||||
@ -54,49 +54,6 @@ describe('Settings certifications area', () => {
|
||||
'It looks like you have not completed the necessary steps. Please complete the required projects to claim the Responsive Web Design Certification'
|
||||
).should('exist');
|
||||
});
|
||||
|
||||
it('Should show "Your projects have been updated." message after submitting projects', () => {
|
||||
cy.get(
|
||||
'#dynamic-information-security-and-quality-assurance input'
|
||||
).each(el => {
|
||||
cy.wrap(el)
|
||||
.clear({ force: true })
|
||||
.type('https://nhl.com', { force: true, delay: 0 });
|
||||
});
|
||||
|
||||
cy.get('#dynamic-information-security-and-quality-assurance').then(
|
||||
form => {
|
||||
if (form[0][5] && form[0][5].innerHTML === 'Save Progress') {
|
||||
form[0][5].click({ force: true });
|
||||
cy.wait(1000);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
cy.contains('Your projects have been updated.').should('exist');
|
||||
});
|
||||
|
||||
it('Should render 12 "Claim Certification" buttons after submitting legacy projects', () => {
|
||||
cy.findAllByText('Claim Certification').should($btns => {
|
||||
expect($btns).to.have.length(12);
|
||||
});
|
||||
});
|
||||
|
||||
it('Should show "congrats" message after claiming a cert', () => {
|
||||
cy.get(
|
||||
'#dynamic-information-security-and-quality-assurance button'
|
||||
).click();
|
||||
|
||||
cy.contains(
|
||||
'@developmentuser, you have successfully claimed the Legacy Information Security and Quality Assurance Certification! Congratulations on behalf of the freeCodeCamp.org team!'
|
||||
).should('exist');
|
||||
});
|
||||
|
||||
it('Should render a "Show Certification" button after submitting enough projects', () => {
|
||||
cy.findAllByText('Show Certification').should($btns => {
|
||||
expect($btns).to.have.length(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user