File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,29 @@ jobs:
178178 if : steps.retry.outcome == 'failure'
179179 run : ${{ matrix.cmd }}
180180
181+ # Run the multitab tests in every supported browser
182+
183+ multitab :
184+ needs : lint
185+ strategy :
186+ fail-fast : false
187+ matrix :
188+ client : ['firefox', 'chromium', 'webkit']
189+ adapter : ['idb', 'indexeddb']
190+ runs-on : ubuntu-latest
191+ env :
192+ CLIENT : ${{ matrix.client }}
193+ ADAPTERS : ${{ matrix.adapter }}
194+ steps :
195+ - uses : actions/checkout@v4
196+ with :
197+ persist-credentials : false
198+ - uses : ./.github/actions/install-node-package
199+ with :
200+ node-version : ${{ env.NODE_VERSION }}
201+ - uses : ./.github/actions/build-pouchdb
202+ - run : npm run test-multitab
203+
181204 # Run the integration, find and mapreduce tests against all the Node.js
182205 # PouchDB adapters. This should be run for every adapter on every version of
183206 # Node.js we support.
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ help fixing them though.
2424 - [ Test options] ( #test-options )
2525- [ Other sets of tests] ( #other-sets-of-tests )
2626 - [ ` find ` and ` mapreduce ` ] ( #find-and-mapreduce )
27+ - [ multi-tab tests] ( #multi-tab-tests )
2728 - [ "Fuzzy" tests] ( #fuzzy-tests )
2829 - [ Performance tests] ( #performance-tests )
2930 - [ Running tests in the browser] ( #running-tests-in-the-browser )
@@ -239,6 +240,24 @@ like so:
239240Note that the default choice for the ` SERVER ` value (` pouchdb-express-router ` )
240241does not support ` find ` or ` mapreduce ` and does not need to pass these tests.
241242
243+ ### Multi-tab tests
244+
245+ We have a few tests to check that interactions with backing stores like
246+ IndexedDB are synchronized across tabs where multiple PouchDB instances are
247+ connected to the same database. These have to be scripted via Playwright rather
248+ than being run inside the normal unit test suite. To run them:
249+
250+ $ npm run test-multitab
251+
252+ Two environment variables can be used to control how these are run:
253+
254+ - ` CLIENT ` : may be ` firefox ` , ` chromium ` or ` webkit ` to select the browser where
255+ the tests will be run.
256+ - ` ADAPTERS ` : may be ` idb ` or ` indexeddb ` to set which backend adapter PouchDB
257+ will use.
258+
259+ All combinations of these should be tested on CI.
260+
242261### "Fuzzy" tests
243262
244263This test suite checks some more unusual replication scenarios, it can be run
You can’t perform that action at this time.
0 commit comments