Skip to content
Open
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
111 changes: 56 additions & 55 deletions .github/workflows/test-e2e-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,63 @@ env:
RUDDERSTACK_CLIENT_ID: ${{ secrets.RUDDERSTACK_CLIENT_ID }}

jobs:
if: false
linux-dev:
runs-on: ubuntu-latest
concurrency:
group: e2e-dev-linux-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository.
uses: actions/checkout@v4
# linux-dev:
# runs-on: ubuntu-latest
# concurrency:
# group: e2e-dev-linux-${{ github.ref }}
# cancel-in-progress: true
# steps:
# - name: Checkout repository.
# uses: actions/checkout@v4

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'yarn'
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install modules.
run: yarn setup
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- name: Build and Test
run: yarn test:e2e-ci
# - name: Setup NodeJS
# uses: actions/setup-node@v3
# with:
# node-version: '20'
# cache: 'yarn'
# - name: Reconfigure git to use HTTP authentication
# run: >
# git config --global url."https://github.com/".insteadOf
# ssh://[email protected]/
# - name: Authenticate with private NPM package
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
# - name: Install modules.
# run: yarn setup
# env:
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# - name: Build and Test
# run: yarn test:e2e-ci

mac-dev:
runs-on: macos-13
concurrency:
group: e2e-dev-mac-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository.
uses: actions/checkout@v4
# mac-dev:
# runs-on: macos-13
# concurrency:
# group: e2e-dev-mac-${{ github.ref }}
# cancel-in-progress: true
# steps:
# - name: Checkout repository.
# uses: actions/checkout@v4

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'yarn'
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install modules.
run: yarn setup
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- name: Build and Test
run: yarn test:e2e-ci
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: false
# - name: Setup NodeJS
# uses: actions/setup-node@v3
# with:
# node-version: '20'
# cache: 'yarn'
# - name: Reconfigure git to use HTTP authentication
# run: >
# git config --global url."https://github.com/".insteadOf
# ssh://[email protected]/
# - name: Authenticate with private NPM package
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
# - name: Install modules.
# run: yarn setup
# env:
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# - name: Build and Test
# run: yarn test:e2e-ci
# env:
# GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
# GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
# CSC_IDENTITY_AUTO_DISCOVERY: false

windows-dev:
runs-on: windows-latest
Expand Down Expand Up @@ -101,3 +100,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
HOST_OS: win
QASE_JEST_DESKTOP_CLIENT_API_TOKEN: ${{ secrets.QASE_JEST_DESKTOP_CLIENT_API_TOKEN }}
9 changes: 4 additions & 5 deletions .github/workflows/test-e2e-packaged.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Test E2E Packaged

on:
pull_request:
branches: [main]
push:
branches: [main]
# pull_request:
# branches: [main]
# push:
# branches: [main]
workflow_dispatch:

env:
Expand All @@ -14,7 +14,6 @@ env:
RUDDERSTACK_CLIENT_ID: ${{ secrets.RUDDERSTACK_CLIENT_ID }}

jobs:
if: false
linux-packaged:
runs-on: ubuntu-latest
concurrency:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ jobs:

- name: Test
run: yarn test:ci
env:
QASE_JEST_DESKTOP_CLIENT_API_TOKEN: ${{ secrets.QASE_JEST_DESKTOP_CLIENT_API_TOKEN }}
38 changes: 21 additions & 17 deletions e2e/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
#!/bin/bash

echo "Clearing display lock for Xvfb"
rm -rf /tmp/.X99-lock
echo "Host OS is $HOST_OS"

echo "Starting Xvfb"
Xvfb :99 -ac &
sleep 2
# get os
os=$HOST_OS
# if [[ "$OSTYPE" == *"linux"* ]]
# then
# os="linux"

# elif [[ "$OSTYPE" == *"darwin"* ]]
# then
# os="mac"
# fi

if [[ "$os" == "linux" ]]
then
echo "Clearing display lock for Xvfb"
rm -rf /tmp/.X99-lock

echo "Starting Xvfb"
Xvfb :99 -ac &
sleep 2
fi

export DISPLAY=:99
echo "Executing command $@"
Expand All @@ -18,18 +34,6 @@ echo "# Build #"
echo "#########"
echo

# get os
os="win"
if [[ "$OSTYPE" == *"linux"* ]]
then
os="linux"

elif [[ "$OSTYPE" == *"darwin"* ]]
then
os="mac"
fi
echo "OS is $os"

yarn setup

# build
Expand Down
17 changes: 16 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,20 @@ module.exports = {
coverageReporters: ['text', 'html'],
projects: ['<rootDir>/src/backend', '<rootDir>/src/frontend'],

rootDir: '.'
rootDir: '.',
reporters: [
'default',
[
'jest-qase-reporter',
{
mode: 'testops',
testops: {
api: {
token: process.env.QASE_JEST_DESKTOP_CLIENT_API_TOKEN
},
project: 'HC'
}
}
]
]
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,10 @@
"husky": "^9.1.4",
"i18next-parser": "^9.0.1",
"jest": "^29.7.0",
"jest-qase-reporter": "^2.0.3",
"pkg": "^5.8.1",
"playwright": "^1.46.0",
"playwright-qase-reporter": "^2.0.16",
"prettier": "^2.8.8",
"pretty-quick": "^4.0.0",
"react-markdown": "^9.0.1",
Expand Down Expand Up @@ -404,7 +406,8 @@
"i18next-parser>esbuild": false,
"wagmi>@wagmi/connectors>@metamask/sdk>@metamask/sdk-communication-layer>utf-8-validate": true,
"@hyperplay/providers>@metamask/sdk>@metamask/sdk-communication-layer>utf-8-validate": true,
"@hyperplay/overlay>electron": false
"@hyperplay/overlay>electron": false,
"jest-qase-reporter>qase-javascript-commons>child-process-ext>es5-ext": true
}
}
}
26 changes: 25 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,29 @@ import { defineConfig } from 'playwright/test'
export default defineConfig({
testMatch: ['*spec.ts'],
/* Maximum time one test can run for. */
timeout: 5 * 60 * 1000
timeout: 5 * 60 * 1000,
use: {
screenshot: 'only-on-failure',
video: 'retain-on-failure'
},
reporter: [
['list'],
[
'playwright-qase-reporter',
{
mode: 'testops',
debug: false,
testops: {
api: {
token: process.env.QASE_PW_DESKTOP_CLIENT_API_TOKEN
},
project: 'HC',
uploadAttachments: true,
run: {
complete: true
}
}
}
]
]
})
Loading
Loading