Skip to content

Commit

Permalink
chore: add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kmruiz committed May 13, 2024
1 parent 97fd13a commit 78845bb
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
49 changes: 49 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,55 @@ with the plugin:
./gradlew :packages:jetbrains-plugin:runIde
```

The plugin will hot-reload any change in the source code if it's built. So running the
following command:

```sh
./gradlew build
```

Will apply the latest changes to the running IDE.

> [!INFO]
> It's important to note that this only works because the plugin is a dynamic plugin.
> If you find out that it consistently fail, we might have break one of the dynamic plugin
> rules so run the `./gradlew :packages:jetbrains-plugin:runPluginVerifier` task to check.
## Running UI Tests

UI tests require a working local environment, so before running them, please revisit the
`Getting Started` section.

Once the environment is set up, run the follow commandline script to run all the UI tests of
the project:

```sh
./gradle/run-ui-test.sh
```

It will take a while, and Remote Robot will take ownership of your mouse once it starts
a running IntelliJ environment, so please take a set and watch it run.

If a test fails, there will be a video recording in `packages/jetbrains-plugin/video` in AVI format
(you might need VLC Player to view it if you use a Mac) and also a screenshot in `packages/jetbrains-plugin/build/reports`
alongside the hierarchy of the view (the "DOM").

## Running a single UI Test

We can run a single UI test for debugging using Gradle and IntelliJ IDEA. To do so, first we need
to start the plugin with the Remote Robot server, by running the following Gradle task:

```sh
./gradlew :packages:jetbrains-plugin:runIdeForUiTests
```

Once the IDE is started, now we can go to any test in IntelliJ IDEA and press the Play button
to run it. When the button is clicked, it will ask for which Gradle task to use to run the test,
and we will choose `uiTest` instead of `test`.

> [!CAUTION]
> :warning: Using `test` instead of `uiTest` won't run any test, so make sure to use `uiTest`. :warning:
## Managing third-party dependencies

We try to avoid third-party dependencies as much as possible, and only use the MongoDB driver,
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@


> [!CAUTION]
> :warning: This is a work in progress and not yet released. :warning:


> :warning: This is a work in progress and not yet released. :warning:

0 comments on commit 78845bb

Please sign in to comment.