test: login more directly (#44467)

* test: login more directly

* test: separate login from other visits

In a single test, Cypress can only visit within a single domain, hence
the separation.

* chore: fail slowly for all strategies

* test: user certified user for showing cert

* test: fix and cleanup certifications
This commit is contained in:
Oliver Eyton-Williams
2021-12-11 10:04:16 +01:00
committed by GitHub
parent 8fb945c5a8
commit 48f88428e8
11 changed files with 100 additions and 157 deletions

View File

@ -34,6 +34,7 @@ const pythonProjects = {
describe('project submission', () => {
beforeEach(() => {
cy.exec('npm run seed');
cy.login();
});
// NOTE: this will fail once challenge tests are added.
it('Should be possible to submit Python projects', () => {
@ -46,7 +47,7 @@ describe('project submission', () => {
.type('https://replit.com/@camperbot/python-project#main.py');
cy.contains("I've completed this challenge").click();
cy.contains('Go to next challenge');
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();
@ -61,7 +62,6 @@ describe('project submission', () => {
'JavaScript projects can be submitted and then viewed in /settings and on the certifications',
{ browser: 'electron' },
() => {
cy.login();
cy.fixture('../../config/curriculum.json').then(curriculum => {
const { challenges, meta } =
curriculum[SuperBlocks.JsAlgoDataStruct].blocks[