Skip to content

Satellite-im/automated-tests-web

Repository files navigation

Uplink Web - Automated Tests

This repository contains automated tests for Uplink Web that can be run using Playwright, a Node.js library to automate Chromium, Firefox, and WebKit browsers.

Tests running using GitHub Actions:

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js: Node.js is installed. You can download it from nodejs.org.
  • npm: npm is installed. It comes with Node.js.

Setting up to run on the local machine

  1. First, clone the original Uplink Web Repository
git clone https://github.com/Satellite-im/UplinkWeb.git
  1. Install Dependencies from Uplink Web:
npm install
  1. Run instance in localhost from Uplink Web:
npm run dev
  1. Clone this testing repository:
git clone git@github.com:Satellite-im/automated-tests-web.git
  1. Install testing repository dependencies
npm install
  1. Install Playwright and its dependencies in your local machine
npx playwright install --with-deps
  1. Now, browse into the testing repository folder that you cloned before and run the following command on CLI
npx playwright test
  1. If you would like to open the Playwright UI to run the test cases, you can use the following command
npx playwright test --ui

Writing Tests

Tests are typically located in the tests directory. Here is an example of a basic test:

import { test, expect } from "@playwright/test";

test("basic test", async ({ page }) => {
  await page.goto("https://example.com");
  const title = await page.title();
  expect(title).toBe("Example Domain");
});

Running Specific Tests

To run a specific test file:

npx playwright test tests/your-test-file.spec.js

Any contributions to the repository are welcome!

About

UI Automated Tests for Uplink web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published