Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 4, 2024
2 parents 297a133 + 18f7a76 commit 0b3e14d
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 4 deletions.
54 changes: 53 additions & 1 deletion data-for-testing.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
"python",
"other_text"
],
"epoch": 1
"epoch": 1,
"program_count": 2
},
{
"username": "teacher2",
Expand Down Expand Up @@ -613,6 +614,50 @@
"error": false,
"adventure_name": "restaurant"
},
{
"id": "0e538f041638423297420216385fbd02",
"session": "d88c181e6a0c4f43919130d42f279f2f",
"date": 1667488047709,
"lang": "en",
"version": "DEV",
"level": 1,
"code": "print This is a saved program\nprint it has been modified!!!",
"name": "Level 1",
"username": "teacher1",
"public": 1,
"error": false,
"adventure_name": "default",
"is_modified": true
},
{
"id": "18c9161454324622a9c5dfa06f2981ac",
"session": "d88c181e6a0c4f43919130d42f279f2f",
"date": 1667490487613,
"lang": "en",
"version": "DEV",
"level": 1,
"code": "print Welcome to Hedy's restaurant \ud83c\udf5f\nask What would you like to order?\necho So you would like to order\nprint Thanks you for your order!\nprint It's on its way!",
"name": "Restaurant - Level 1",
"username": "teacher1",
"public": 1,
"error": false,
"adventure_name": "restaurant"
},
{
"id": "94aae222be5a49388e9899f3d9b3d4ab",
"session": "d88c181e6a0c4f43919130d42f279f2f",
"date": 1667488047709,
"lang": "en",
"version": "DEV",
"level": 1,
"code": "print Hi there, programmer!\nprint Welcome to Hedy!",
"name": "Level 1",
"username": "teacher1",
"public": 0,
"error": false,
"adventure_name": "print",
"is_modified": false
},
{
"session": "fac24066d19f4fd8ac44508ac4a7fdae",
"date": 1716482478177,
Expand Down Expand Up @@ -690,6 +735,13 @@
"tags": [],
"achievements": 10,
"last_achievement": 1667489184479
},
{
"username": "teacher1",
"image": "1",
"personal_text": "I like Hedy!",
"agree_terms": "on",
"tags": []
}
],
"quiz-stats": [
Expand Down
5 changes: 2 additions & 3 deletions tests/cypress/e2e/public_programs/programs_page.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,16 @@ describe("General tests for my programs page (with both custom teacher and built
})
});

it("second-teachers can NOT view each other's public programs", () => {
it("second-teachers can NOT view each other's public programs after making them private", () => {
loginForTeacher("teacher4");
navigateToClass("CLASS1");
cy.get("#second_teachers_container tbody tr")
.each(($tr, i) => {
if ($tr.text().includes("teacher1")) {
cy.get(`#second_teachers_container tbody :nth-child(${i+1}) [data-cy="programs"]`).click();
cy.getDataCy("no-programs").should("be.visible");
cy.getDataCy("no-programs").should("not.exist");
}
})

});

it("delete created program", () => {
Expand Down

0 comments on commit 0b3e14d

Please sign in to comment.