-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add tests (CI) #72
Comments
Here are some suggestions from ChatGPT, using the Code Interpreter feature:
Additionally, it suggested:
And here's a simple Python script it provided to demonstrate how to implement tests using Selenium (other possibilities are Playwright, WebDriver.io, Cypress): from selenium import webdriver
# Instantiate a browser driver
driver = webdriver.Firefox() # or webdriver.Chrome()
# Open the webpage
driver.get("file:///path_to_your_file/index.xhtml")
# Find the textarea
textarea = driver.find_element_by_css_selector("textarea")
# Interact with the textarea
textarea.send_keys("Hello, World!")
# Check the textarea value
assert "Hello, World!" in textarea.get_attribute('value')
# Close the driver
driver.quit() |
We should have tests to ensure all the code (JS), page structure (HTML) and styling (CSS) works as intended. Running these tests in each PR would have prevented regressions like #71 from happening.
I am not sure what's the best approach or tools to test this kind of app, but I'm opening the issue to get the discussion started.
The text was updated successfully, but these errors were encountered: