This project contains automated tests for the awork web UI and API (project entity creation), demonstrating CRUD operations and a simple UI flow testing.
project-root/
│
├── API Tests/
│ └── project.test.js
│
├── UI Tests/
│ └── project.test.js
│
├── api.js
├── config.js
├── jest.config.js
└── README.md
-
Sign up for a free 14-day trial of awork at https://app.awork.com and set up your workspace with a basic project.
-
Go to
Settings
→Integrations
and create a new API client underAPI access
. -
Click
…
in the list andManage API keys
to copy the API key. -
Clone this repository to your local machine.
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory with the following content:API_KEY=your_api_key_here EMAIL=your_awork_UI_platform_email_here PASSWORD=your_awork_UI_platform_password_here
Replace
your_api_key_here
with the API key you copied in step 3,your_awork_UI_platform_email_here
andyour_awork_UI_platform_password_here
with your awork account email and password.
To run all tests:
npm run test:all
To run only API tests:
npm run test:api
To run only UI tests:
npm run test:ui
The API tests demonstrate CRUD operations on a project entity:
- Create a project
- Fetch the created project
- Update the project
- Fetch the updated project
- Delete the project
- Ensure the project has been deleted
The UI tests demonstrate a simple user flow in awork:
- Login to awork
- Create a new project
- Add a task to the project
- Add a comment to the task
- JavaScript
- Jest (Testing framework)
- Axios (HTTP client for API tests)
- Selenium WebDriver (for UI tests)
- Chromedriver
For more information on the awork API, visit the awork Developer Documentation.
- The UI tests assume that you have Chrome installed on your machine.
- Make sure to keep your API key and password confidential and do not commit the
.env
file to version control.