Files
freeCodeCamp/cypress/integration/learn/challenges/projects.js
GM Fuster 3b056aa7b4 chore(replit): use correct brand name across codebase (#41941)
* replace repl.it with replit.com in the English version

Replace repl.it to replit.com in the English version.  Chinese and Spanish versions have the same issue.

* Updated the repl.it to replit.com or Replit

I changed the text from replit.com to Replit and added the changes to the files outside the curriculum folder.

* Forgot removing one .com.

There was on Replit.com that I missed when I reviewed the files.

* Resolve conflicts

I got an unable to auto merge so resolving conflicts and trying again.

* try committing conflicts again

* Trying the conflicts again

* chore: fix typo in personal library

Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>

Co-authored-by: gemmaf98 <44875585+gemmaf98@users.noreply.github.com>
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>
2021-04-29 11:13:38 +01:00

53 lines
1.8 KiB
JavaScript

/* global cy */
const projects = {
superBlock: 'machine-learning-with-python',
block: 'machine-learning-with-python-projects',
challenges: [
{
slug: 'book-recommendation-engine-using-knn',
nextChallengeText: 'Linear Regression Health Costs Calculator'
},
{
slug: 'cat-and-dog-image-classifier',
nextChallengeText: 'Book Recommendation Engine using KNN'
},
{
slug: 'linear-regression-health-costs-calculator',
nextChallengeText: 'Neural Network SMS Text Classifier'
},
{
slug: 'neural-network-sms-text-classifier',
nextChallengeText: 'Find the Symmetric Difference'
},
{
slug: 'rock-paper-scissors',
nextChallengeText: 'Cat and Dog Image Classifier'
}
]
};
describe('project submission', () => {
// NOTE: this will fail once challenge tests are added.
it('Should be possible to submit Python projects', () => {
const { superBlock, block, challenges } = projects;
challenges.forEach(({ slug }) => {
const url = `/learn/${superBlock}/${block}/${slug}`;
cy.visit(url);
cy.get('#dynamic-front-end-form')
.get('#solution')
.type('https://replit.com/@camperbot/python-project#main.py');
cy.contains("I've completed this challenge").click();
cy.contains('Go to next challenge');
// clicking on 'Go to next challenge' seems to have caused flakiness, so
// it's commented out until we figure out why.
// cy.contains('Go to next challenge').click();
// The next two commands are to confirm that go to next challenge has
// moved us to the expected challenge before we loop again.
// cy.get('.title-text').should('include.text', nextChallengeText);
// cy.url().should('not.have.string', url);
});
});
});