Skip to content

Commit

Permalink
Merge pull request #89 from CMU-17313Q/automatedTests
Browse files Browse the repository at this point in the history
Uploading Automated tests - Tests.js and jest.config.js
  • Loading branch information
NickDevi authored Oct 20, 2024
2 parents 6adf80d + dc1a8a0 commit 07bbdc0
Show file tree
Hide file tree
Showing 6 changed files with 551 additions and 292 deletions.
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

module.exports = {
roots: ['<rootDir>/test'], // Set the root directory to the test folder
moduleDirectories: ['node_modules', '<rootDir>'],
testEnvironment: 'jest-environment-jsdom',
testMatch: ['**/test/mocks/plugin_modules/@nodebb/**/*.js'], // Specify where to find test files
};
4 changes: 4 additions & 0 deletions node_modules_real/post-menu-list.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

<-- {{{ if posts.display_moderator_tools }}}

<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/edit" role="menuitem" href="#">
<span class="menu-icon"><i class="fa fa-fw text-secondary fa-pencil"></i></span> [[topic:edit]]
Expand Down Expand Up @@ -155,6 +157,7 @@
<button id="saveNotesBtn" style="padding:10px 20px; background-color:blue; color:white; border:none; cursor:pointer;">Save</button>
<button id="closeModalFooterBtn" style="padding:10px 20px; background-color:grey; color:white; border:none; cursor:pointer;">Close</button>
</div>

</div>

<script>
Expand Down Expand Up @@ -298,3 +301,4 @@ function resetDropdownState() {
document.getElementById('closeModalBtn').addEventListener('click', closeNotesModal);
document.getElementById('closeModalFooterBtn').addEventListener('click', closeNotesModal);
</script> -->
Loading

0 comments on commit 07bbdc0

Please sign in to comment.