From 2cbb748bc5cf62ac1bb7c8307b4f501625bf7c83 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Wed, 10 Feb 2021 15:45:42 +0100 Subject: [PATCH] fix(test): confirm that Python projects can be submitted (#41038) Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com> --- .../integration/learn/challenges/projects.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cypress/integration/learn/challenges/projects.js diff --git a/cypress/integration/learn/challenges/projects.js b/cypress/integration/learn/challenges/projects.js new file mode 100644 index 0000000000..8bde882a92 --- /dev/null +++ b/cypress/integration/learn/challenges/projects.js @@ -0,0 +1,28 @@ +/* global cy */ + +const projects = { + superBlock: 'machine-learning-with-python', + block: 'machine-learning-with-python-projects', + challenges: [ + 'book-recommendation-engine-using-knn', + 'cat-and-dog-image-classifier', + 'linear-regression-health-costs-calculator', + 'neural-network-sms-text-classifier', + 'rock-paper-scissors' + ] +}; +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(challenge => { + cy.visit(`/learn/${superBlock}/${block}/${challenge}`); + cy.get('#dynamic-front-end-form') + .get('#solution') + .type('https://repl.it/@camperbot/python-project#main.py'); + + cy.contains("I've completed this challenge").click(); + cy.contains('Go to next challenge').click(); + }); + }); +});