From 2579320642cf94d6ee6989c1ff7280a2a99c4298 Mon Sep 17 00:00:00 2001 From: mobileoss Date: Wed, 5 Feb 2025 14:17:16 +0000 Subject: [PATCH] Publish docs version 20.x --- .../copilot/technical-overview.mdx | 44 ------------------- .../copilot/testing-with-copilot.md | 11 ++--- ...ebugging-native-code-compliing-android.mdx | 1 + .../version-20.x-sidebars.json | 3 +- 4 files changed, 6 insertions(+), 53 deletions(-) delete mode 100644 website/versioned_docs/version-20.x/copilot/technical-overview.mdx diff --git a/website/versioned_docs/version-20.x/copilot/technical-overview.mdx b/website/versioned_docs/version-20.x/copilot/technical-overview.mdx deleted file mode 100644 index f20f6f2c56..0000000000 --- a/website/versioned_docs/version-20.x/copilot/technical-overview.mdx +++ /dev/null @@ -1,44 +0,0 @@ -import OverviewSVG from '../img/copilot/copilot-overview.svg'; - -# Technical Overview - -Detox Copilot integrates seamlessly with your testing environment by combining natural language processing with Detox's robust testing capabilities. - -## Building Blocks of Detox Copilot - -To enable Detox Copilot to work harmoniously with Detox and your app, it relies on several building blocks: - -- **Dynamic Code Generation**: Copilot generates Detox code on-the-fly to perform actions or assertions based on your instructions. -- **Visual Analysis**: Copilot can analyze the app's screen to verify the presence of specific elements or text, enabling assertions beyond standard UI checks. -- **App View Hierarchy**: Detox generates an XML representation of the app's view hierarchy, helping Copilot interact with all UI elements, even those not directly visible. -- **Snapshot Images**: Optional snapshot images provide Copilot with visual context for more precise understanding and analysis. -- **Injected Test IDs**: When necessary, Detox injects unique test IDs to ensure reliable access to UI elements. -- **Caching Mechanism**: Copilot caches execution results to optimize performance and reduce unnecessary LLM calls (see [Performance Optimization](#performance-optimization)). -- **Test Context Awareness**: Copilot maintains awareness of previously executed steps, ensuring continuity and readability in the test flow. - -## Copilot's Execution Flow - - - -The execution flow of Detox Copilot can be broken down into six main steps: - -1. **Gather Context**: Collect relevant app state, view hierarchy, and previous step results. -2. **Interpret Intent**: Use the LLM to interpret the natural language instruction. -3. **Generate Code**: Create the appropriate Detox commands. -4. **Execute Action**: Run the generated Detox code. -5. **Cache Results**: Store execution results to optimize future runs. -6. **Provide Feedback**: Return values or confirm actions for subsequent steps. - -By combining these steps, Detox Copilot effectively bridges the gap between natural language instructions and concrete test actions. - -### Performance Optimization - -Detox Copilot is designed to avoid unnecessary calls to the LLM service and optimize performance using static cache that is based on the current state of the app. -This minimizes the number of calls to the LLM service and reduces latency. -However, you can optimize your `PromptHandler` implementation to reduce latency and improve response times (e.g., by reducing the image size or implementing a server-side cache). -We have plans to optimize even further by introducing more advanced caching mechanisms for better performance. diff --git a/website/versioned_docs/version-20.x/copilot/testing-with-copilot.md b/website/versioned_docs/version-20.x/copilot/testing-with-copilot.md index 92b6795fd8..b85c745d95 100644 --- a/website/versioned_docs/version-20.x/copilot/testing-with-copilot.md +++ b/website/versioned_docs/version-20.x/copilot/testing-with-copilot.md @@ -4,13 +4,15 @@ In this tutorial, we'll explore how to use **Detox Copilot** to write end-to-end :::note -Detox Copilot is integrated into Detox and requires no additional installation. For complete API details, refer to our [Detox Copilot API documentation](../api/copilot.md). +Copilot now has a new [documentation site](https://wix-incubator.github.io/detox-copilot/).
+There, you can find a [technical overview](https://wix-incubator.github.io/detox-copilot/docs/guides/technical-overview), learn how to [implement a driver for your preferred testing framework](https://wix-incubator.github.io/detox-copilot/docs/guides/implementing-custom-testing-framework-driver), and stay up to date with the latest features and updates. ::: :::caution Work in Progress -**Note**: Detox Copilot is in active development. APIs are subject to change in future releases. +**Note**: Detox Copilot is in active development. APIs are subject to change in future releases.
+For complete API details, refer to our [Detox Copilot API documentation](../api/copilot.md). ::: @@ -21,11 +23,6 @@ It interprets these instructions and translates them into Detox commands. This g ![Demo](../img/copilot/copilot-demo.gif) -## Setting Up Detox - -Before you begin, ensure that your Detox environment is properly set up. -If you need assistance with the setup, refer to the [Detox Getting Started Guide](docs/introduction/getting-started/). - ## Implementing a `PromptHandler` The `PromptHandler` is a crucial component that interfaces with your LLM service. diff --git a/website/versioned_docs/version-20.x/introduction/partials/_debugging-native-code-compliing-android.mdx b/website/versioned_docs/version-20.x/introduction/partials/_debugging-native-code-compliing-android.mdx index 41d3e76eb3..216379a860 100644 --- a/website/versioned_docs/version-20.x/introduction/partials/_debugging-native-code-compliing-android.mdx +++ b/website/versioned_docs/version-20.x/introduction/partials/_debugging-native-code-compliing-android.mdx @@ -23,6 +23,7 @@ ```diff title="android/app/build.gradle" dependencies { // ... + - androidTestImplementation('com.wix:detox:+') + androidTestImplementation(project(path: ":detox")) } ``` diff --git a/website/versioned_sidebars/version-20.x-sidebars.json b/website/versioned_sidebars/version-20.x-sidebars.json index 7adb569b62..8f4cfd2d0a 100644 --- a/website/versioned_sidebars/version-20.x-sidebars.json +++ b/website/versioned_sidebars/version-20.x-sidebars.json @@ -40,8 +40,7 @@ "label": "Detox Copilot", "items": [ "copilot/testing-with-copilot", - "copilot/best-practices", - "copilot/technical-overview" + "copilot/best-practices" ] }, {