Skip to content
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 TestDriver.ai to Repo #5496

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Add TestDriver.ai to Repo #5496

wants to merge 2 commits into from

Conversation

ianjennings
Copy link
Collaborator

@ianjennings ianjennings commented Mar 12, 2024

Description

Fixes # (issue)

How Has This Been Tested?

Test checklist

_ Front/Back Testing _

  • Test the component in normal state in sidebar
  • Test the component in hover state in sidebar (if hover exists)
  • Check that the settings work on frontend
  • Check that backend works and saves the settings after the editor reload
  • Same 1-4 points for the toolbar
  • Same 1-4 points on responsive
  • Test the block inside the grid (Container + Row + Column)
  • Test the block as a standalone block
  • Duplicate the block, test that the settings of the first do not affect the second
  • Test with 2 blocks of the same type

_ Pre-Code Testing _

  • Test the component in normal state in sidebar
  • Test the component in hover state in sidebar (if hover exists)
  • Check that the settings work on frontend
  • Check that backend works and saves the settings after the editor reload
  • Same 1-4 points for the toolbar
  • Same 1-4 points on responsive
  • Test the block inside the grid (Container + Row + Column)
  • Test the block as a standalone block
  • Duplicate the block, test that the settings of the first do not affect the second
  • Test with 2 blocks of the same type
  • Check no commented code and no unnecessary imports
  • Standards of the project have been followed
  • No errors/warnings on console

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings/errors
  • I have added/updated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • New Features
    • Introduced TestDriver.ai GitHub Actions workflow for automated testing on pushes, pull requests, and manual dispatches.
    • Automated testing now includes navigation, interaction, and verification on both desktop and mobile views.
  • Chores
    • Setup a pre-run script for test environment preparation, including package installation and browser configuration.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 12, 2024
Copy link
Contributor

coderabbitai bot commented Mar 12, 2024

Important

Auto Review Skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Walkthrough

This update introduces TestDriver.ai, a GitHub Actions workflow designed to automate web testing. It triggers on updates to the main branch and pull requests, running on Ubuntu. The workflow employs the dashcamio/testdriver action for testing website functionalities across desktop and mobile views. Additionally, a script is added to prepare the environment by removing a specific file, installing dashcam-chrome, and launching Chrome with an extension in a maximized setup.

Changes

File Change Summary
.github/workflows/.../testdriver.yml Adds TestDriver.ai GitHub Actions workflow for automated web testing.
.testdriver/prerun.sh Script to clean up, install dashcam-chrome, and launch Chrome with an extension.

🐰✨
In the land of code and byte,
A new workflow takes its flight.
Through web's vast open door,
TestDriver.ai aims to explore.
With every push and pull request,
Ensures our web's very best.
🎉🚀

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@ianjennings ianjennings marked this pull request as draft March 12, 2024 18:24
@ianjennings ianjennings changed the title first draft of script Add TestDriver.ai to Repo Mar 12, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 95d1341 and 47f6f3e.
Files selected for processing (2)
  • .github/workflows/testdriver.yml (1 hunks)
  • .testdriver/prerun.sh (1 hunks)
Additional comments: 3
.testdriver/prerun.sh (1)
  • 4-4: The exit command is used here, but it's worth considering if there are any cleanup actions or validations that should be performed before exiting the script. Ensure that this is the intended point of script termination.
.github/workflows/testdriver.yml (2)
  • 1-9: The workflow structure, including triggers and job definition, follows GitHub Actions best practices.
  • 15-28: Ensure that the testing steps defined here are fully supported by the dashcamio/testdriver action. These steps are detailed and cover comprehensive scenarios, but it's crucial to verify their compatibility with the action's capabilities.

@@ -0,0 +1,4 @@
rm ~/Desktop/WITH-LOVE-FROM-AMERICA.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding the file path to ~/Desktop/WITH-LOVE-FROM-AMERICA.txt may not be universally applicable. Consider making the file path configurable or checking if the file exists before attempting to remove it to avoid errors.

@@ -0,0 +1,4 @@
rm ~/Desktop/WITH-LOVE-FROM-AMERICA.txt
npm install dashcam-chrome --save
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --save flag is used to add the package to package.json, which might not be necessary in a CI/CD environment. Consider removing this flag unless there's a specific reason to modify package.json during CI/CD runs.

@@ -0,0 +1,4 @@
rm ~/Desktop/WITH-LOVE-FROM-AMERICA.txt
npm install dashcam-chrome --save
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --start-maximized --load-extension=./node_modules/dashcam-chrome/build/ 1>/dev/null 2>&1 &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command assumes Google Chrome is installed at a specific path, which may not be true in all environments, especially CI/CD. Consider verifying the presence of Chrome and making the script more flexible to accommodate different environments or browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👩‍💻 pre-code testing size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant