-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🪲 Don't crash the "view program" page if the program has a syntax error #5985
Merged
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
494bc81
🪲 Don't crash the "view program" page if the program has a syntax error
rix0rrr 260a8ef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 244d182
update data for testing to include program
jpelay d28c37b
add codeMirrorContent function to utils
jpelay 619c2ff
stop using english as bridge when translating
jpelay 529ddb4
add tests for translating languages not involving english
jpelay 94f7868
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a277267
add the programs to the database
jpelay 533bc98
add wait
jpelay 03a715c
Merge branch 'main' into crash-on-untranslatable-program
mergify[bot] c232b17
use timeout instead of a wait
jpelay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,30 +4,31 @@ | |
"username": "user1", | ||
"password": "$2b$09$1lZSLTxPBn1p6sOBpXy6H./9Fho7fXed.ZZJPBOd4lHu1QwRDiKW6", | ||
"email": "[email protected]", | ||
"language": "en", | ||
"keyword_language": "en", | ||
"language": "fr", | ||
"keyword_language": "fr", | ||
"created": 1667487371548, | ||
"teacher_request": null, | ||
"third_party": null, | ||
"verification_pending": "$2b$09$W/lHayOzZttUVDf6nW0OWuXErrXFV3WC.OXAMTHVJ5hZOahFxPzYW", | ||
"last_login": 1667488074388, | ||
"last_login": 1733156219944, | ||
"country": "VE", | ||
"birth_year": 1999, | ||
"gender": "f", | ||
"prog_experience": "no", | ||
"epoch": 1 | ||
"epoch": 1, | ||
"program_count": 1 | ||
}, | ||
{ | ||
"username": "user2", | ||
"password": "$2b$09$BlvY7/i5T1/tyGABEFJOx.6W8LcQHz9HaPrwhxXVZ7gILs4GkYyFe", | ||
"email": "[email protected]", | ||
"language": "en", | ||
"keyword_language": "en", | ||
"language": "es", | ||
"keyword_language": "es", | ||
"created": 1667487426140, | ||
"teacher_request": null, | ||
"third_party": null, | ||
"verification_pending": "$2b$09$8ce7rVDk8ZbMASMP1CRDBepWWXNGZLNuXlhz.2yhXkJUyXELuOdGO", | ||
"last_login": 1667488140990, | ||
"last_login": 1733156278063, | ||
"country": "NL", | ||
"birth_year": 2010, | ||
"gender": "m", | ||
|
@@ -310,6 +311,11 @@ | |
"id": "$2b$09$EW1c0OGdZTGk.TmEBAHKlO", | ||
"username": "student3", | ||
"ttl": 1728935624 | ||
}, | ||
{ | ||
"id": "$2b$09$hOgREabUhtSYJqYcMOJHYe", | ||
"username": "user2", | ||
"ttl": 1734365878 | ||
} | ||
], | ||
"program-stats": [ | ||
|
@@ -861,6 +867,46 @@ | |
1, | ||
1 | ||
] | ||
}, | ||
{ | ||
"id#level": "user1#9", | ||
"week": "2024-49", | ||
"id": "user1", | ||
"level": 9, | ||
"number_of_lines": 2, | ||
"NoIndentationException": 10, | ||
"chart_history": [ | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0 | ||
] | ||
}, | ||
{ | ||
"id#level": "@all-logged#9", | ||
"week": "2024-49", | ||
"id": "@all-logged", | ||
"level": 9, | ||
"number_of_lines": 2, | ||
"NoIndentationException": 10, | ||
"chart_history": [ | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0 | ||
] | ||
} | ||
], | ||
"achievements": [ | ||
|
@@ -1674,6 +1720,22 @@ | |
"id": "48ec04d60a4c4990a60b9e5e81121e71", | ||
"username_level": "student3-1", | ||
"is_modified": true | ||
}, | ||
{ | ||
"session": "a583433caabc41af9cff634103fc315d", | ||
"date": 1733156126001, | ||
"lang": "fr", | ||
"version": "DEV", | ||
"level": 9, | ||
"code": "r\u00e9p\u00e8te 1 fois\ntourne 3\n avance 50", | ||
"name": "Introduction 9", | ||
"username": "user1", | ||
"error": true, | ||
"adventure_name": "default", | ||
"id": "fb23d0fa90ce48b5bf87c0632969fc28", | ||
"username_level": "user1-9", | ||
"is_modified": true, | ||
"public": 1 | ||
} | ||
], | ||
"public_profiles": [ | ||
|
@@ -1682,7 +1744,8 @@ | |
"image": "1", | ||
"personal_text": "I like Hedy!", | ||
"agree_terms": "on", | ||
"tags": [] | ||
"tags": [], | ||
"country": "VE" | ||
}, | ||
{ | ||
"username": "user3", | ||
|
@@ -1879,10 +1942,10 @@ | |
"students": { | ||
"$type": "set", | ||
"elements": [ | ||
"student2", | ||
"student3", | ||
"student4", | ||
"student1", | ||
"student3", | ||
"student2", | ||
"student5" | ||
] | ||
}, | ||
|
@@ -2788,6 +2851,11 @@ | |
"id": "student3-default-1", | ||
"ticked": false, | ||
"program_id": "02930e0a15894bc68331775f08e12a32" | ||
}, | ||
{ | ||
"id": "user1-default-9", | ||
"ticked": false, | ||
"program_id": "fb23d0fa90ce48b5bf87c0632969fc28" | ||
} | ||
] | ||
} |
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,10 @@ | ||
import { login } from "../tools/login/login" | ||
import { codeMirrorContent } from "../tools/programs/program"; | ||
|
||
describe('Tests for viewing programs', () => { | ||
it('Seeing a program that contains an error in a different language, shouldnt result in a crash', () => { | ||
login('user2', '123456'); | ||
cy.visit('/hedy/fb23d0fa90ce48b5bf87c0632969fc28/view') | ||
codeMirrorContent().should('have.text', 'répète 1 foistourne 3 avance 50'); | ||
}) | ||
}) |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️