Skip to content

Add session tooling (WIP) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 183 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
0fe44bb
feat: fix working v1 with session-tooling. Still need to use it
Bilb Jul 27, 2024
7ea7d22
working tiny test pushing configs and print seedphrase
Bilb Jul 27, 2024
450999e
Updating tests for onboarding
burtonemily Aug 12, 2024
41ba404
Removing TODO from git
burtonemily Aug 12, 2024
bba92d0
remove todo
burtonemily Aug 12, 2024
d81796f
Addresses feedback
burtonemily Aug 12, 2024
5c6443d
Addresses feedback
burtonemily Aug 13, 2024
cbed791
Merge pull request #17 from burtonemily/onboarding
Bilb Aug 13, 2024
b8ab0c8
fix: integration tests for onboarding
Bilb Aug 27, 2024
3409de1
Merge pull request #18 from Bilb/fix-integration-tests-onboarding
Bilb Aug 28, 2024
cdf2aed
fix: fixed test "Block user in conversation list"
Bilb Sep 10, 2024
b9b6aa4
fix: all tests passing
Bilb Sep 11, 2024
f314cb7
fix: move screenshots to a __screenshots__ folder on root
Bilb Sep 11, 2024
78af9b8
chore: moved fixtures to root folder
Bilb Sep 11, 2024
6d8750b
chore: removed date-fns as no tests need it for now
Bilb Sep 11, 2024
646c584
fix: use localize for all the strings
Bilb Sep 11, 2024
5e4f518
chore: remove unused deps
Bilb Sep 11, 2024
2335682
chore: update readme
Bilb Sep 12, 2024
ae7aa55
fix: always strip and force in english for now
Bilb Sep 12, 2024
d264be3
chore: remove outdated comment
Bilb Sep 16, 2024
4c66b9b
fix: add one test to validate the strings used have expected values
Bilb Sep 17, 2024
ff87518
Merge pull request #19 from Bilb/fix-tests-for-strings
Bilb Sep 17, 2024
d5be3e5
chore: adding empty workflow to main as github won't find mine in branch
Bilb Sep 20, 2024
cad271b
Merge branch 'main' into add-tooling
burtonemily Oct 11, 2024
a2cee2b
Merge pull request #3 from Bilb/add-tooling
burtonemily Oct 11, 2024
61c3f33
feat: fix working v1 with session-tooling. Still need to use it
Bilb Jul 27, 2024
c926c85
working tiny test pushing configs and print seedphrase
Bilb Jul 27, 2024
5551e77
Merge branch 'main' of github.com:burtonemily/session-playwright
burtonemily Oct 16, 2024
189afd4
Revert "feat: fix working v1 with session-tooling"
burtonemily Nov 11, 2024
df1d137
Merge pull request #4 from burtonemily/revert-3-add-tooling
burtonemily Nov 11, 2024
bf13d04
feat: fix working v1 with session-tooling. Still need to use it2
Bilb Jul 27, 2024
792dffa
working tiny test pushing configs and print seedphrase2
Bilb Jul 27, 2024
fbec1fe
Merge remote-tracking branch 'emily/main' into add-tooling2
Bilb Nov 11, 2024
4931b96
fix: some tests fixed, all groups test still broken
Bilb Nov 26, 2024
fa0e4b1
fix: use human readable timer datatestids
Bilb Nov 26, 2024
4a408b4
Merge pull request #6 from Bilb/fix-some-test-group
burtonemily Nov 26, 2024
85c2045
fix: fix the non-groups test for the groups changes
Bilb Nov 28, 2024
31980a4
Removed package.json
burtonemily Dec 10, 2024
bd31b33
Merge branch 'main' of github.com:burtonemily/session-playwright
burtonemily Dec 10, 2024
7dd7bb9
Readds package.json
burtonemily Dec 10, 2024
9d002aa
Merge pull request #3 from Bilb/fix-test-for-strings-with-strings-checks
burtonemily Dec 10, 2024
78154c3
Merge branch 'main' of github.com:session-foundation/session-playwright
burtonemily Dec 10, 2024
388ec2d
Merge pull request #7 from Bilb/fix-test-with-groups
burtonemily Dec 10, 2024
8eff6d9
Merging main into local
burtonemily Dec 10, 2024
cdd68d2
Revert "Merge pull request #7 from Bilb/fix-test-with-groups"
burtonemily Dec 10, 2024
612bd9c
Cleaning up js files and js.map files
burtonemily Dec 10, 2024
a44e7de
fixes js compiling issues
burtonemily Dec 10, 2024
de4a0c3
updated control message
burtonemily Dec 11, 2024
921d636
tracks eslint file
burtonemily Dec 11, 2024
2cd6d28
Adds function to sort users by pubkey, updates mentions test, fixes s…
burtonemily Dec 16, 2024
5229d80
Adds in disappearing messages test turning off
burtonemily Dec 17, 2024
df392b2
Adds in tests for delete conversation, linked device delete conversat…
burtonemily Dec 10, 2024
b95c9b5
Moves comments
burtonemily Dec 17, 2024
db75298
Adds in input validation tests for onboarding
burtonemily Dec 17, 2024
8f18c1f
Merge pull request #7 from burtonemily/turn_off_disappearing_messages
burtonemily Dec 17, 2024
d51178f
Adds in test to join community and to send an image
burtonemily Dec 18, 2024
c168b6d
Adds comments on pending test tags
burtonemily Dec 18, 2024
7b361f2
Merge branch 'main' into input_validations
burtonemily Dec 18, 2024
0a54198
Addresses feedback
burtonemily Dec 18, 2024
434f80c
Merge branch 'input_validations' of github.com:burtonemily/session-pl…
burtonemily Dec 18, 2024
a3935ca
Merged main into branch
burtonemily Dec 18, 2024
a4e1b2b
Update tests/automation/input_validations.spec.ts
burtonemily Dec 18, 2024
0dc2d06
Update tests/automation/input_validations.spec.ts
burtonemily Dec 18, 2024
20bce7d
Replaces test tag and fixes reporter to show stacktrace on failure
burtonemily Dec 18, 2024
79bd909
Merge pull request #8 from burtonemily/input_validations
burtonemily Dec 18, 2024
96de48c
Addresses feedback
burtonemily Dec 19, 2024
bce20d6
Merge pull request #9 from burtonemily/new_community_tests
burtonemily Dec 19, 2024
2d3d1d5
Tidies up block message request test
burtonemily Dec 20, 2024
b94a776
Addresses feedback
burtonemily Dec 20, 2024
54ce645
Merge pull request #10 from burtonemily/block_message_request
burtonemily Dec 20, 2024
73fc85d
Adds in a test for sending a community invite
burtonemily Dec 20, 2024
f283c17
Merge pull request #11 from burtonemily/send_community_invite
burtonemily Dec 20, 2024
7542c07
Adds test for inviting a friend
burtonemily Dec 30, 2024
ac5eb92
Merge pull request #12 from burtonemily/invite_friend_new
burtonemily Dec 30, 2024
0794689
Adds test for hiding note to self locally and linked device
burtonemily Dec 30, 2024
ce29630
Addresses feedback
burtonemily Jan 1, 2025
1da9e82
Merge pull request #13 from burtonemily/hide_note_to_self
burtonemily Jan 2, 2025
97ba693
Adds in test for sending a link with preview to 1:1 conversations and…
burtonemily Jan 2, 2025
43fbbd1
Clean up imports
burtonemily Jan 2, 2025
986f0f8
Addresses feedback
burtonemily Jan 2, 2025
52bdfbd
Merge pull request #14 from burtonemily/link_preview_group
burtonemily Jan 2, 2025
7f22f1a
Starts disappearing messages tests for all media types
burtonemily Jan 2, 2025
1cd5cdd
Merge remote-tracking branch 'upstream/main' into disappearing_messag…
burtonemily Jan 2, 2025
5062b24
Creates a default disappearing messages test and switches out media t…
burtonemily Jan 2, 2025
dd5cc8d
chore: fix eslint conflict with airbnb base
Bilb Jan 2, 2025
03cccc6
Merge pull request #8 from Bilb/disappearing_messages_all
burtonemily Jan 2, 2025
1c048e9
Adds in test for disappearing messages checking all media types, link…
burtonemily Jan 7, 2025
7dfa9af
Merge branch 'main' into disappearing_messages_all
burtonemily Jan 7, 2025
974c9df
Addresses feedback
burtonemily Jan 7, 2025
e736936
Fixing merge conflicts
burtonemily Jan 7, 2025
11d4d58
Fixing up merge conflicts
burtonemily Jan 7, 2025
4a73226
Merge pull request #15 from burtonemily/disappearing_messages_all
burtonemily Jan 7, 2025
00760e5
Fixes voice calls to check for correct control message and adds in di…
burtonemily Jan 7, 2025
daddac3
Adds new call function
burtonemily Jan 7, 2025
a9ae125
includes dotenv in config file to fix env file not being used
burtonemily Jan 7, 2025
593c333
Starts disappearing messages checks for groups
burtonemily Jan 8, 2025
08a87bc
Reverts any changes made to tests that exists only on groups branch r…
burtonemily Jan 10, 2025
ae6c0be
Merge pull request #16 from burtonemily/disappearing_messages_call
burtonemily Jan 10, 2025
679153f
Merged main into branch
burtonemily Jan 10, 2025
b8942c3
Merge branch 'main' into main_2
burtonemily Jan 10, 2025
547c6fa
Merge pull request #9 from burtonemily/main_2
burtonemily Jan 10, 2025
7fb30bd
Merge branch 'session-foundation:main' into main
burtonemily Jan 10, 2025
bbef3d5
Merge branch 'main' into disappearing_messages_groups
burtonemily Jan 10, 2025
3f80aa2
Merge pull request #10 from burtonemily/disappearing_messages_groups
burtonemily Jan 10, 2025
54724f0
Merge branch 'groups_rebuild' into main
burtonemily Jan 12, 2025
c8a57dc
Merge pull request #11 from burtonemily/main
burtonemily Jan 12, 2025
324ab72
fix: PLAYWRIGHT_WORKERS_COUNT should be PLAYWRIGHT_WORKER_COUNT
yougotwill Jan 14, 2025
5e899f0
fix: we want to use the plural WORKERS
yougotwill Jan 14, 2025
f9d1f16
Merge pull request #18 from yougotwill/fix/no-ref/worker_count_env
burtonemily Jan 14, 2025
443aea2
Adds in checkModalStrings, formattedTime, disappearActions and update…
burtonemily Jan 15, 2025
61bb673
Adds in checkModalStrings for message request tests and cleans up com…
burtonemily Jan 22, 2025
33f0569
feat: add regression tests to groups_branch
Bilb Jan 24, 2025
6c08d10
feat: use new localisation logic (all in one .ts file)
Bilb Jan 28, 2025
158954f
fix: block user test
Bilb Jan 28, 2025
5671320
updating screenshot
burtonemily Jan 29, 2025
dca6ac8
resolving merge conflicts
burtonemily Jan 29, 2025
29729fa
resolving merge conflicts
burtonemily Jan 29, 2025
9c791e7
Merge branch 'regression-tests-groups' into groups_rebuild
burtonemily Jan 29, 2025
4c9be9d
fix: typo
Bilb Jan 30, 2025
372140d
Merge remote-tracking branch 'foundation/regression-tests-groups' int…
Bilb Jan 30, 2025
ca96927
remove unnecessary line
burtonemily Jan 31, 2025
ff67a7d
Merge branch 'groups_rebuild' of github.com:burtonemily/session-playw…
burtonemily Jan 31, 2025
b8332f6
merge conflicts
burtonemily Jan 31, 2025
f5647f9
Adds in test for disappearing link and long text for groups
burtonemily Jan 31, 2025
bd43bfa
Removing async from formattedTime function
burtonemily Feb 5, 2025
c60d55f
chore: updating playwright to use latest release
burtonemily Feb 6, 2025
2496aaf
Merge pull request #23 from burtonemily/disappearing-groups-2
burtonemily Feb 6, 2025
034418a
Update tests/automation/user_actions.spec.ts
burtonemily Feb 6, 2025
7675025
Merge pull request #19 from Bilb/feat-use-new-localisation-logic
burtonemily Feb 6, 2025
4bd8c5d
Merge branch 'regression-tests-groups' into groups_rebuild
burtonemily Feb 6, 2025
cfeeeae
chore: addressing feedback to add in default disappearing messages op…
burtonemily Feb 7, 2025
7e94bb2
Merge branch 'groups_rebuild' of github.com:burtonemily/session-playw…
burtonemily Feb 7, 2025
e00d1b3
Addresses feedback
burtonemily Feb 9, 2025
9eaca65
Merge pull request #22 from burtonemily/groups_rebuild
burtonemily Feb 9, 2025
0e783e5
chore: without lfs files yet
Bilb Feb 14, 2025
41ab544
feat: add lfs tracked files for landing-page-states and other
Bilb Feb 14, 2025
695706d
chore: move fixture files to sample_files
Bilb Feb 16, 2025
668f11d
chore: remove fixture files
Bilb Feb 16, 2025
fd88990
chore: moved _screenshots__ to screenshots
Bilb Feb 16, 2025
34ac6c6
removed __screenshots__
Bilb Feb 16, 2025
463a018
Merge pull request #26 from session-foundation/toggle-recovery-password
Bilb Feb 16, 2025
ef2034b
updating tests with new strings and fixing tests for latest groups ch…
burtonemily Mar 3, 2025
d633498
chore: rename unstable to dev for session-desktop default clone
Bilb Mar 11, 2025
bd075d6
feat: add will's repo as an option
Bilb Mar 13, 2025
6644b52
Merge pull request #12 from Bilb/chore/update-session-desktop-dev-branch
burtonemily Mar 13, 2025
bc9e56a
fix: use plurals for worker in env too
Bilb Mar 14, 2025
62cb718
chore: update electron version to match the new one used by session
Bilb Mar 18, 2025
ea93b44
updating changes to strings
burtonemily Mar 19, 2025
2f7ab5f
Merge branch 'groups_rebuild' of https://github.com/burtonemily/sessi…
burtonemily Mar 19, 2025
15dd34c
Merge pull request #13 from session-foundation/add-will-choice-repo-s…
burtonemily Mar 21, 2025
4cdfeaa
Merge pull request #14 from Bilb/bump-electron-version
burtonemily Mar 21, 2025
b8cebc3
Addressed feedback
burtonemily Mar 21, 2025
60b30b1
Merge branch 'groups_rebuild' into add-tooling2
Bilb Mar 22, 2025
8597928
fix: fixed up upload of user details, still legacy groups
Bilb Mar 22, 2025
232c60e
fix: group created as new, all admins currently
Bilb Mar 22, 2025
e2f4ba2
wip
Bilb Mar 24, 2025
8fefd4e
chore: update lockfile
Bilb Mar 24, 2025
48abb6d
Merge pull request #15 from Bilb/groups_rebuild
burtonemily Mar 24, 2025
d60f833
addresses feedback
burtonemily Mar 24, 2025
4c923fe
Merge branch 'groups_rebuild' of https://github.com/burtonemily/sessi…
burtonemily Mar 24, 2025
8b72560
chore: lint
Bilb Mar 24, 2025
7d88cb5
adds in test tags for clear all modal
burtonemily Mar 25, 2025
954008b
Merge pull request #28 from burtonemily/groups_rebuild
burtonemily Mar 25, 2025
4a29581
Merge pull request #16 from Bilb/groups_rebuild
burtonemily Mar 25, 2025
264e183
chore: lint
Bilb Mar 25, 2025
8fcbe46
Merge pull request #17 from Bilb/lint
burtonemily Mar 25, 2025
9e0b8f3
Merge pull request #29 from burtonemily/groups_rebuild
burtonemily Mar 25, 2025
b36027e
adding back in modal for clearAll
burtonemily Mar 26, 2025
ced33f3
Merge branch 'groups_rebuild' of https://github.com/burtonemily/sessi…
burtonemily Mar 26, 2025
15bdc7e
fixing merge conflicts
burtonemily Mar 26, 2025
5da539c
merging main into branch
burtonemily Mar 26, 2025
1c4dd13
fixing merge conflicts
burtonemily Mar 26, 2025
28fb9d2
fix: delete and restore group test
Bilb Mar 26, 2025
8fc3363
chore: fix yarn.lock
Bilb Mar 26, 2025
54e678f
fix: tests for remove-legacy-disappearing-message desktop branch
Bilb Mar 30, 2025
7fa4e61
chore: no opt out of our custom reporter for playwright
Bilb Mar 31, 2025
0a2159a
Merge pull request #19 from Bilb/fix-delete-restore-group
burtonemily Mar 31, 2025
2f4a8dd
Merge branch 'regression-tests-groups' into groups_rebuild
burtonemily Mar 31, 2025
014a079
cleaning up PR
burtonemily Mar 31, 2025
fe781a9
Merge pull request #31 from burtonemily/groups_rebuild
Bilb Mar 31, 2025
186c045
Merge pull request #30 from session-foundation/regression-tests-groups
Bilb Mar 31, 2025
d1b4605
Merge remote-tracking branch 'foundation/main' into add-tooling2
Bilb Apr 17, 2025
7b614ec
feat: working v1 with module qa-seeder
Bilb Apr 19, 2025
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
103 changes: 0 additions & 103 deletions .drone.jsonnet

This file was deleted.

4 changes: 4 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SESSION_DESKTOP_ROOT="<path to session desktop root>"
PLAYWRIGHT_REPEAT_COUNT=0
PLAYWRIGHT_RETRIES_COUNT=0
PLAYWRIGHT_WORKERS_COUNT=1
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.eslintrc.js
*.js
tests/localization/*
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module.exports = {
},
},

extends: ['airbnb-base', 'prettier', 'plugin:@typescript-eslint/recommended'],
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier', 'plugin:@typescript-eslint/recommended'],

plugins: ['mocha', 'more', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: { project: ['tsconfig.json'] },
parserOptions: { project: ['./tsconfig.json'] },

rules: {
'comma-dangle': [
Expand Down
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
174 changes: 174 additions & 0 deletions .github/workflows/desktop-regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: Run desktop regression tests
on:
workflow_dispatch:
inputs:
PLAYWRIGHT_REPO:
description: 'Playwright repo to checkout'
required: true
type: choice
options:
- session-foundation/session-playwright
- burtonemily/session-playwright
- bilb/session-playwright
default: session-foundation/session-playwright

BRANCH_TO_CHECKOUT_PW:
description: 'branch to checkout on session-playwright'
required: true
type: string
default: regression-tests-groups

SESSION_DESKTOP_REPO:
description: 'Session desktop repo to checkout'
required: true
type: choice
options:
- session-foundation/session-desktop
- bilb/session-desktop
- yougotwill/session-desktop
default: session-foundation/session-desktop

BRANCH_TO_CHECKOUT_SESSION:
description: 'Branch to checkout on session-desktop'
required: true
type: string
default: dev

PLAYWRIGHT_REPEAT_COUNT:
description: 'Repeats of each tests (0 to only run each once)'
required: true
type: number
default: 0

PLAYWRIGHT_RETRIES_COUNT:
description: 'Retries of each tests (0 to only run each once, 1 to run another attempt)'
required: true
type: number
default: 0

PLAYWRIGHT_WORKERS_COUNT:
description: 'Playwright workers to start'
required: true
type: number
default: 8

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
desktop-regression:
name: Desktop Regression Tests
runs-on: [self-hosted, Linux, X64, qa-desktop]
container:
image: mcr.microsoft.com/playwright:v1.51.0-noble
options: --cpus 16

env:
PLAYWRIGHT_REPEAT_COUNT: ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }}
PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
PLAYWRIGHT_WORKERS_COUNT: ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }}
DESKTOP_CACHED_FOLDER: desktop/node_modules

steps:
- uses: actions/checkout@v4
- name: Runner Details
run: |
echo "PLAYWRIGHT_REPO ${{ github.event.inputs.PLAYWRIGHT_REPO }}"
echo "BRANCH_TO_CHECKOUT_PW ${{ github.event.inputs.BRANCH_TO_CHECKOUT_PW }}"
echo "SESSION_DESKTOP_REPO ${{ github.event.inputs.SESSION_DESKTOP_REPO }}"
echo "BRANCH_TO_CHECKOUT_SESSION ${{ github.event.inputs.BRANCH_TO_CHECKOUT_SESSION }}"

- uses: actions/checkout@v4
name: 'Checkout playwright'
with:
repository: ${{ github.event.inputs.PLAYWRIGHT_REPO }}
ref: ${{ github.event.inputs.BRANCH_TO_CHECKOUT_PW }}
path: 'playwright'

- name: Install system deps
run: apt update && apt install -y git g++ build-essential cmake

- uses: actions/checkout@v4
name: 'Checkout Session desktop'
with:
repository: ${{ github.event.inputs.SESSION_DESKTOP_REPO }}
ref: ${{ github.event.inputs.BRANCH_TO_CHECKOUT_SESSION }}
path: 'desktop'

# Note: caching is breaking things up (app doesn't start)
# - name: Calculate desktop cache key
# run: |
# echo "CACHE_KEY=${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('desktop/package.json', 'desktop/yarn.lock', 'desktop/patches/**') }}" >> $GITHUB_ENV

- name: Install node
uses: actions/setup-node@v3
with:
node-version-file: 'desktop/.nvmrc'

- uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install setuptools for python 3.12
shell: bash
run: python -m pip install --upgrade pip setuptools

# Note: caching is breaking things up (app doesn't start)
# - uses: actions/cache/restore@v4
# id: cache-desktop-modules
# with:
# path: ${{ env.DESKTOP_CACHED_FOLDER }}
# key: ${{ env.CACHE_KEY }}

- name: Install yarn
run: |
npm install -g yarn

- name: List desktop folder
run: |
pwd
ls -la desktop

- name: List playwright folder
run: |
pwd
ls -la playwright

- name: Install desktop dependencies
shell: bash
# if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: cd $GITHUB_WORKSPACE/desktop && yarn install --frozen-lockfile --network-timeout 600000

# Note: caching is breaking things up (app doesn't start)
# - uses: actions/cache/save@v4
# if: always()
# with:
# path: ${{ env.DESKTOP_CACHED_FOLDER }}
# key: ${{ env.CACHE_KEY }}

- name: Build desktop
shell: bash
run: cd $GITHUB_WORKSPACE/desktop && yarn build-everything

- name: Install playwright dependencies
run: |
cd $GITHUB_WORKSPACE/playwright && yarn install --frozen-lockfile

- name: Build the Desktop tests
run: |
cd $GITHUB_WORKSPACE/playwright
yarn tsc

- name: Run the Desktop tests
run: |
cd $GITHUB_WORKSPACE/playwright
SESSION_DESKTOP_ROOT=$GITHUB_WORKSPACE/desktop nice ionice xvfb-run --auto-servernum --server-num=1 --server-args='-screen 0, 1920x1080x24' yarn test
# DEBUG="pw:*"

- name: Kill all running electron app
if: always()
continue-on-error: true # just so we don't fail
shell: bash
run: |
killall electron;
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ test-results/
/playwright-report/
/playwright/.cache/
**/*.js
/*.js
*.js
*.js.map
/*.js.map
**/*.js.map
.vscode/settings.json
tests/automation/todo
allure-report
allure-results
TODO.md

playwright.config.js
sessionReporter.js
.env
output/
dist/
.eslintcache
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.15.0
20.18.2
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.prettierrc.json
.eslintrc.js
README.md
tests/localization/*.ts
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# Automation testing for Session Desktop

This repository holds the code to do integration tests with Playwright for Session Desktop.
This repository holds the code to do regression testing with Playwright for Session Desktop.

## Setup


`git clone https://github.com/session-foundation/session-playwright/`

Install [nvm](https://github.com/nvm-sh/nvm) or [nvm for windows](https://github.com/coreybutler/nvm-windows).

Once nvm is installed, install the node version declared in the `.nvmrc` file:
- `nvm install` on linux/macos
- `nvm install <specific version from the .nvmrc>` on windows

Install yarn & dependencies:
- `npm install -g yarn`
- `yarn install --frozen-lockfile`

## Config

Create your own config from the `.env.sample` and edit the values to match your environment & how you want to test.
- `cp .env.sample .env` Copy .env.sample to .env
- edit the `.env` file


### Config details

- `SESSION_DESKTOP_ROOT`
- *type*: string
- *default*: 1
- *description*: the path to the root of session-desktop to test
- `PLAYWRIGHT_REPEAT_COUNT`
- *type*: number
- *default*: 0
- *description*: how many times to repeat each test. So, if a test **passed or failed** on attempt x, and our current attempt is `< PLAYWRIGHT_REPEAT_COUNT` the test will be scheduled to be run again. This can be used to debug flaky tests
- `PLAYWRIGHT_RETRIES_COUNT`
- *type*: number
- *default*: 0
- *description*: the number of retries each test. i.e. if a test **failed** on attempt x, and our current attempt is `< PLAYWRIGHT_RETRIES_COUNT` the test will be scheduled to be run again. This can be used to debug flaky tests
- `PLAYWRIGHT_WORKERS_COUNT`
- *type*: number
- *default*: 1
- *description*: the number of workers to start in parallel. The more, the faster the test suite is going to run, but if you hit your CPU limit they'll start to be unnecessarily flaky. Should be fine with a value between 10-20 depending on the machine.


## Test run

To run a specific test, or tests matching a string you can do so with
`yarn test -g "<string to match>"`.

To run all the test suite, just do
`yarn test`.
Loading