Welcome to the Test Repository for Anytype. This repository is used to manage and run end-to-end (E2E) tests using Cucumber, Playwright, and TypeScript.
Before setting up the project, make sure you have the following installed:
- Node.js and npm
- Go (for local middleware testing)
Clone the repository and install the necessary dependencies.
git clone https://github.com/anyproto/anytype-test.git
npm install
To test the compatibility of the latest 3 Anytype-heart versions, run the bash script first to populate the test scripts with versions and download them:
./getHearts.sh <macos|ubuntu|windows> <arm64|amd64>
Replace <macos|ubuntu|windows>
with your operating system and <arm64|amd64>
with your architecture.
Then run tests with:
npm run test:comp
To run tests using the local middleware, follow these steps:
- Set the Version to "default" in the .feature File:
In the .feature file, set the version variable to "default" in the Scenario Outline or Server Test Step. This configuration tells the testing framework to use the local middleware built with Go instead of a specific version.
For example, you can set the versions like this:
Examples:
| version1 | version2 |
| "default" | "default" |
Or like this:
Given the server "default" 1 is running
- Clone the
anytype-heart
Repository:
Clone the anytype-heart repository into the anytype-test/cmd folder:
git clone https://github.com/anyproto/anytype-heart.git anytype-test/cmd/anytype-heart
-
Follow the Instructions for
anytype-heart
:Navigate to the anytype-heart repository and follow the setup and build instructions provided in its README file.