Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

chore: remove e2e config and environment variables #270

Merged
merged 3 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .env.example

This file was deleted.

64 changes: 0 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,70 +27,6 @@ To check out the guide, visit [https://docs.superviz.com](https://docs.superviz.

To report a new bug or request a new feature, you can file an issue with the correct template. [Issue reporting](https://github.com/superviz/sdk/issues)

## E2E Tests

Our E2E tests are using [Playwright Framework](https://playwright.dev/), to run, first, install their dependencies and browsers

```bash
yarn && yarn test:e2e:install
```

Set `E2E_BASE_URL` env var to your local execution: Ex: http://localhost:3000

Verify that the first step of the test conforms to the SDK initialization implementation, such as room id, user id and username fields. If you are not using this aproach, just add `skip` annotation to this test stage ([See documentation](https://playwright.dev/docs/test-annotations#skip-a-test)) or remove [this section](https://github.com/SuperViz/sdk/blob/chore/e2e-tests/e2e/meeting-sdk.e2e.spec.ts#L25).

```typescript
test('Fill the params and initialize SDK', async () => {
await page.locator(LOCATORS.GENERIC_INPUT).first().fill(ROOM_ID);
await page.locator(LOCATORS.GENERIC_INPUT).nth(1).fill(USER_ID);
await page.locator(LOCATORS.GENERIC_INPUT).nth(2).fill(USER_NAME);
await page.locator(LOCATORS.INITIALIZE_SDK_BUTTON).click();
});
```

You can use code generator to pick this locators with command

```bash
yarn test:e2e:generate
```

To run tests in headless mode, execute the command

```bash
yarn test:e2e
```

You can run tests with default language (based on `E2E_LOCALE` env var) or run with one of supported: en, pt-BR with commands:

```bash
# Run tests with English language
yarn test:e2e:en

# Run tests with Portuguese language
yarn test:e2e:pt-BR

# Run tests with all languages
yarn test:e2e:all
```

You can run tests with headed mode with the command

```bash
yarn test:e2e:headed
```

You can run tests with debug mode with the command

```bash
yarn test:e2e:debug
```

You can build and run E2E tests on container with command

```bash
source ./e2e/build-e2e.sh
```

## To run locally

Add file .remote-config.js with the following content:
Expand Down
16 changes: 0 additions & 16 deletions e2e/build-e2e.sh

This file was deleted.

26 changes: 0 additions & 26 deletions e2e/docker/Dockerfile

This file was deleted.

50 changes: 0 additions & 50 deletions e2e/meeting-sdk-no-avatars.e2e.spec.ts

This file was deleted.

55 changes: 0 additions & 55 deletions e2e/meeting-sdk-on-avatars.e2e.spec.ts

This file was deleted.

33 changes: 0 additions & 33 deletions e2e/utils/locators.ts

This file was deleted.

4 changes: 0 additions & 4 deletions e2e/utils/sleep.ts

This file was deleted.

9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
"test:unit:watch": "jest --watch",
"test:unit:coverage": "jest --coverage",
"test:unit:ci": "jest --ci",
"test:e2e": "PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright test ./e2e",
"test:e2e:pt-br": "E2E_LOCALE=pt-BR yarn test:e2e",
"test:e2e:en": "E2E_LOCALE=en yarn test:e2e",
"test:e2e:all": "yarn test:e2e:pt-br && yarn test:e2e:en",
"test:e2e:install": "PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install",
"test:e2e:generate": "eval $(cat .env | xargs) && npx playwright codegen $E2E_BASE_URL",
"test:e2e:debug": "eval $(cat .env | xargs) && PWDEBUG=1 yarn test:e2e",
"test:e2e:headed": "eval $(cat .env | xargs) && yarn test:e2e --headed",
"semantic-release": "semantic-release",
"commit": "git-cz"
},
Expand All @@ -48,7 +40,6 @@
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@jest/globals": "^29.5.0",
"@playwright/test": "^1.28.1",
"@types/debug": "^4.1.8",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
Expand Down
64 changes: 0 additions & 64 deletions playwright.config.ts

This file was deleted.

13 changes: 0 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1166,14 +1166,6 @@
dependencies:
"@octokit/openapi-types" "^16.0.0"

"@playwright/test@^1.28.1":
version "1.28.1"
resolved "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz"
integrity sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==
dependencies:
"@types/node" "*"
playwright-core "1.28.1"

"@pnpm/network.ca-file@^1.0.1":
version "1.0.2"
resolved "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz"
Expand Down Expand Up @@ -6217,11 +6209,6 @@ pkg-dir@^4.2.0:
dependencies:
find-up "^4.0.0"

[email protected]:
version "1.28.1"
resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz"
integrity sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==

postcss-selector-parser@^6.0.10:
version "6.0.11"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc"
Expand Down
Loading