-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add loads of changes to login mechanism for testing (possible options are admin, student, and all roles at the same time) #434 * chore: login users beforehand (might delete this in the future actually) #434 * chore: trying to fix adding data before tests #434 * chore: more trial and error #434 * chore: struggling.. #434 * chore: so close, but yet so far #407 * chore: fix location of preprocessor #407 * chore: remove unnecessary node events #434 * chore: test.sh script now deletes database and fills with realistic fixtures #434 * test: automatically login all users, before every test file, so that they're available, but also automatically logout after every test #434 * test: set path to supportFile correctly cypress #434 * test: removing logging out for cleaning up #434 * test: add professor login endpoint #434 * test: cleanup #434 * test: course make and course enroll test with id's applied where necessary #434 * test: forgot to actually commit the test file itself #434 * style: lint fix #434 * chore: move filling db to outside --------- Co-authored-by: Topvennie <vincent@vallaeys.com>
- Loading branch information
Showing
16 changed files
with
197 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
describe('course', () => { | ||
context('teacher', () => { | ||
it('creates course', () => { | ||
// login as a professor | ||
cy.request('POST', '/api/auth/test-user/professor/'); | ||
// visit the dashboard | ||
cy.visit('/'); | ||
// click button to create new coursre | ||
cy.get('#courseCreate').click(); | ||
// fill in the required values for a new course | ||
cy.get('#courseName').type('Course'); | ||
cy.get('#courseExcerpt').type('Description'); | ||
cy.get('#courseFaculty').click(); | ||
cy.get('#courseFaculty_1').click(); | ||
// click the save button | ||
cy.get('#courseSave').click(); | ||
// should redirect to dashboard | ||
cy.url().should('equal', Cypress.config('baseUrl') + '/'); | ||
}); | ||
}); | ||
context('student', () => { | ||
it('able to enroll into course', () => { | ||
// login as a student | ||
cy.request('POST', '/api/auth/test-user/student/'); | ||
// visit the dashboard | ||
cy.visit('/'); | ||
// navigate to course selector | ||
cy.get('#courses').click(); | ||
// enroll into course | ||
cy.get('#courseEnroll').click(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.