Prerequisites:
- You must have obtained a valid OpenAI API Key - see https://github.com/sahat/hackathon-starter?tab=readme-ov-file#obtaining-api-keys
- Have Hackathon Starter up and running with the OpenAI key and be able to load /ai/openai-moderation and check a sentence that gets flagged and one that does not get flagged.
- Be able to run
npm run test:e2e with all existing tests passing.
Scope:
- Create
test/e2e/openai-moderation.e2e.test.js for E2E testing of /ai/openai-moderation with Playwrite. See test/e2e/github-api.e2e.test.js as an example.
- The test must submit check at least one sentence that would be flagged and a sentence that would not get flagged.
- All page elements that map to data from the API should be included in the tests.
npm run test:e2e should run all existing and new tests, and they should all pass.
Please include a screenshot of the console output with your PR submission.
Note 1: You would need to complete the prerequisites before asking for GitHub issue assignment.
Note 2: Please don't just copy-paste AI-generated content (code, issue replies, or PR text), as such submissions will be rejected and may be marked as spam. You can use AI assistants to be more efficient, but the final result should be your work with the help of an assistant, not an assistant's output taken at face value and copy-pasted.
Prerequisites:
npm run test:e2ewith all existing tests passing.Scope:
test/e2e/openai-moderation.e2e.test.jsfor E2E testing of /ai/openai-moderation with Playwrite. Seetest/e2e/github-api.e2e.test.jsas an example.npm run test:e2eshould run all existing and new tests, and they should all pass.Please include a screenshot of the console output with your PR submission.
Note 1: You would need to complete the prerequisites before asking for GitHub issue assignment.
Note 2: Please don't just copy-paste AI-generated content (code, issue replies, or PR text), as such submissions will be rejected and may be marked as spam. You can use AI assistants to be more efficient, but the final result should be your work with the help of an assistant, not an assistant's output taken at face value and copy-pasted.