-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3482 from dodona-edu/feedback-motivational-message
Add motivational message to feedback table
- Loading branch information
Showing
10 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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,26 @@ | ||
import { initCorrectSubmissionToNextLink } from "../../app/assets/javascripts/submission"; | ||
|
||
beforeAll(() => { | ||
document.body.innerHTML = ` | ||
<a href="http://test/next_link" data-title="next_tooltip" id="next-exercise-link"> | ||
<i class="mdi mdi-chevron-right"></i> | ||
</a> | ||
<div id='submission-motivational-message'></div> | ||
`; | ||
}); | ||
|
||
describe("Correct submission link to next test", () => { | ||
test("Incorrect status should do nothing", () => { | ||
initCorrectSubmissionToNextLink("wrong"); | ||
const message = document.getElementById("submission-motivational-message"); | ||
expect(message.innerHTML).toMatch(""); | ||
}); | ||
|
||
test("Link should be fetched from page", () => { | ||
initCorrectSubmissionToNextLink("correct"); | ||
const message = document.getElementById("submission-motivational-message"); | ||
expect(message.firstElementChild.children).toHaveLength(2); | ||
const link = message.firstElementChild.lastElementChild; | ||
expect(link.getAttribute("href")).toBe("http://test/next_link"); | ||
}); | ||
}); |