- Create a topic and enter the topic discussion
- Write something in the quick reply box
- Check the "Post Anonymously" button next to the Quick Reply button
- Post the post
- Display name of the poster should be "Anonymous" instead of their username
2 automated tests in test\topics.js
.
- Posts an unanonymous reply, retrieves the post, and verifies that it is unanonymous.
- Posts an anonymous reply, retrieves the post, and verifies that it is anonymous.
These tests are sufficient for seeing if the backend correctly stores the data. Pre-existing tests also verify the schema of the anonymous field.
npm run lint
andnpm run test
are working.
- Log into an admin account
- Enter the admin dashboard http://localhost:4567/admin
- On the left hand tab, go to Settings -> Posts
- Scroll down to Posting Restrictions -> Banned Words
- Input a few banned words (e.g. "apple, strawberry")
- Save your changes
- Navigate back to NodeBB Forum
- Create a new topic with the banned words
- Post the topic
- Banned words should be starred out (e.g. "a***e", "s********y")
Admin sets banned words in settings
User wants to post something with banned words
Added automated tests in test/topics.js
to test censorBannedText
and censorBannedMarkdown
.
These tests set a list of banned words, post a post with the banned word both in title and in content, and verify the result contains the starred out words.
These tests verify the accuracy of the functions and the censoring for both plaintext and markdown.
npm run lint
and npm run test
are working.
- Create an account as a normal user
- Create a topic and enter the topic discussion
- You should see a User tag next to your post
- Create an admin account
- Create a topic and enter the topic discussion
- You should see a User tag next to your post
1 automated tests in test\event.js
.
- Checks the role of the user is what is being stored
npm run lint
andnpm run test
are working.
- Create an account as a admin user
- Create a topic and enter the topic discussion
- You should see a blue star next to your name
1 automated tests in test\event.js
.
- Checks the role of the user is what is being stored and if it is admin give it a star
npm run lint
andnpm run test
are working.
- Create an account as a admin user
- Navigate to any topic and enter the topic discussion
- Hover over any reply and select the endorse/unendorse post tool
- Toggle post endorsement as needed, and the changes will be visible to all users
Added automated tests in test/topics.js
- Creates a topic, creates a reply to that topic
- Assumes the admin role, and then endorses the reply using the API
- Checks that the reply was endorsed using the API
- Unendorses the reply and checks again to verify the status
- Sufficient test because it checks the entire process: assumes the admin role, creates a dummy topic and reply, endorses and unendorses the reply, and checks the endorsement status from the database at each step.
npm run lint
andnpm run test
are working.
- Create two users: one with no assigned user group and another with an assigned group (e.g., "Administrators").
- Start a chat conversation between the two users.
- The first user (without a group) should send a message.
- The second user (with a group) should send a message.
- In the chat message display, the first user should have no group title shown, while the second user should have "Administrators" displayed.
User with no group title vs User with group title
User can change their group title
Added automated tests in test/messaging.js
:
- Sends a message from a user with no group title and verifies that
groupTitle
is empty. - Sends a message from a user in the "Administrators" group and verifies that
groupTitle
is "Administrators".
These tests confirm that the correct group title is displayed in the chat interface.
npm run lint
andnpm run test
are working.
- Create an account (doesn't matter what kind).
- Post a chat in a separate language.
- Click the "translate this message" button under the post (only shows up if the message isn't in English).
- Translation will show up under the button
- Click the "Undo translation" button to hide the translation.
One atuomated test:
- Posts a message in English with typos.
This test confirms that the translation will show only if the API detects a different language.
npm run lint
andnpm run test
are working.