-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: implement playwright for browser compatibility testing #1182
Closed
danielbate
wants to merge
157
commits into
master
from
db/feat/implement-browser-testing-with-runner-groups
Closed
Changes from 105 commits
Commits
Show all changes
157 commits
Select commit
Hold shift + click to select a range
6345f20
feat: implement playwright for browser based testing with jest
71bded7
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
8ee0391
feat: regen lock file
18dc128
feat: implement multiple jest configs for different environments
7a6b27a
feat: use jest test pattern for runner groups
cb4fe09
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
fe8c134
chore: regen lock file
61faf71
feat: remove runner groups syntax from test
4336c89
feat: implement all tests config
ef31bd7
chore: install nyc
e25d874
chore: add nyc config
3c93e24
chore: remove duplicate group tsdoc key
92cffa8
chore: changeset
c2aeab0
feat: implement merged coverage
0baf51e
feat: move more config to jest base config
2f5e7e8
feat: move js config to json for nyc
2e37b32
feat: implement constants for test envs
0c04a3d
feat: support nyc converage in test workflow
1d6e27e
feat: add missign coverage json rename
8cc44d8
chore: linting
8905f73
94fa353
feat: fix jest env pattern matches
c6b965e
feat: add browser test env to docs snippets
f9d5705
chore: linting
938815d
feat: remove usage of env tags in test declarations
f1cbac1
feat: use regex on file path for env test matching rather than test case
80149fa
feat: rename abi coder tests
a1fc53f
feat: rename fuel gauge packages
062b413
feat: add environemnt testing to abi typegen package
34f78dc
chore: linting
bcbca1a
feat: add environment tests to various packages
2800dc2
feat: rename more tests for environments
27d7665
feat: add further environment prefixes to tests
3c14af5
feat: add further environment prefixes to tests
676387f
feat: reimplement tx param in custom transaction test
46e3631
feat: rename further test files
a771b8a
feat: add github action to validate test files
41aeefc
feat: add pretest to ci test script
c3e6785
chore: force rebuild
9728aec
feat: alter test scripts
87d6c0f
fix: reintroduce unintentionally deleted file
460ddc5
fix: reintroduce unintentionally deleted file
15709dc
fix: fix crypto file indexes
9f094a1
chore: force rebuild
56de71d
chore: force rebuild
e1aee2f
feat: modify ci script
0fcb6d5
chore: forece rebuild
0cc3533
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
87c93af
feat: modify ci test script to run env tests independently
c26e596
feat: add coverage to ci test script
0349500
feat: fix gh coverage workflow
8506134
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
9847868
feat: add envs to wallet manager tests
a8e7ef8
feat: fix links in md files for wallet manager tests
ee18efe
feat: gh workflow coverage report call
bae9f56
feat: revert master coverage report name
f60c13d
feat: fix master upload file name
3e53b22
feat: add conditional test step to gh workflow
d18a30c
fix: fix gh action ref name
97b5a89
fix: fix gh action
f06b281
feat: test gh action workflow
cf91864
feat: retry action
545d814
feat: alterations to gh test script
0d221ae
feat: try test gh flow without coverage file
c15331d
feat: gh workflow alter
b99083c
feat: try different version of atriom coverage report
f26bfc2
feat: add test location in results flags to coverage reports
6150cad
feat: implement coverage threshhold
2cee062
feat: lower testing threshhold
ab56804
feat: finalise test coverage merging and reporting
6ad92d9
feat: fixes for the merge coverage script
e2b9a2d
feat: alter github action to support nyc
5c9c385
feat: add github token to nyc action
5e46cf6
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
e122ee2
feat: add coverage template
179a749
feat: add pretest to ci test script
7953c74
feat: add source to comment template
d1bbf7e
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
86ee9f4
feat: resolve pretest issue
ff31395
feat: attempt CI without base coverage
0fd0022
feat: alter git checkout fetch depth
8c17cf2
feat: add fetch base branch to test workflow
f99e7e5
feat: add base coverage file
8fa679b
feat: alter gh workflow fetch depth
8507a35
feat: alter fetch depth on origin in gh test workflow
f93a2b4
feat: alter base coverage file
69c39c9
feat: report lcov in report
7a4acf8
feat: add json reporting to nyc
da304f3
feat: use base lcov in coverage report
bdc20b6
feat: use diff version of cov reporter
3fb237d
feat: fix report action attributes
ac12192
feat: alter report coverage action to not filter files
ad89d3c
feat: alter master coverage artefact
abfe478
feat: download coverage using pr number
fadb558
feat: get coverage via run id
de620b1
feat: add temp gh workflow steps for this PR
affdac9
feat: fix temp gh action
9f02d6d
feat: fix github action conditional syntax
4ec815d
chore: testing cleanup
3b0f404
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
ff0f9da
feat: alter fuel error test file names
d43e422
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
d07fbee
feat: add missing validate test step to test CI
a86e75a
feat: remove byte coder test
4a4bda6
feat: add vecs test env
15eb7ec
Update scripts/merge-coverage.ts
danielbate 04015c3
Update scripts/merge-coverage.ts
danielbate 376beb0
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
f4ddc02
feat: rename test files with duplicated envs
8a1984a
Merge branch 'db/feat/implement-browser-testing-with-runner-groups' o…
11ae5df
feat: swap jest playwright ts config for js
8cca525
feat: modify test commands
f3b2e58
feat: remove test file path from node and browser test commands
eb6b2a4
feat: disable jest playwright collect coverage
5d6d903
feat: test concurrent test worlfows
be8fee0
feat: rename node test stage
f2dc574
feat: add concurrent test and report steps
5ccce0a
feat: fix workflow name in coverage download
9eb562e
feat: reinstate test yaml
e3511f4
feat: rename workflow in download coverage step
ea1378b
feat: rename workflow run triggers in test yaml
73d7972
chore: implement find/grep script for test files (#1209)
arboleya 9d225e8
feat: introduce tests to check browser environment
58b0fc4
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
3b4d446
feat: add browser type to browser test
d93385e
feat: add sequential test commands
9a68691
feat: rename coverage commands
8fc6eb3
feat: add test groups to docs snips contracts
1bdf65c
feat: install expect-playwright
50a1231
feat: modify env tests
1fb2de7
feat: remove group from contracts docs snippets for test
0bc70cb
feat: add describe to provider time test
419deb9
feat: add browser test env to all test files
ecab299
feat: rename test files
ee2166c
feat: remove duplicated test grpups
fbff4f2
feat: remove duplicated tyest
4404f6e
feat: alter test validation script
52c6100
feat: alter test commands and coumentation
c0a7ef7
feat: simplify test gh workflow
8883afa
feat: update docs snippets links
6713725
feat: add support for @group
6774230
feat: lint fixes for check tests test
058e2c5
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
a65c9e9
feat: add built step to parallel test jobs
40b75f6
feat: remove support for custom tags in tsdoc
62a3a7c
feat: add ci setup to seperate test job
28e4edd
feat: reinstate ci test command
03a03a1
feat: remove test file paths from test comamnds
741bbfc
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
a541587
feat: rename provider snapshot test
d5cf553
feat: implement and skip browser tests
d7ef7c8
feat: add find PR step to test workflow
b50de5e
feat: add build step to test workflow
5f0ff54
feat: add correct workflow download to test runs
0549bbe
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
fca23cf
feat: remove browser or node package
07f840c
feat: add environmennt to transaction response test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "@istanbuljs/nyc-config-typescript", | ||
"all": true, | ||
"include": ["packages/**/*.ts", "apps/docs-snippets/**/*.ts"], | ||
"exclude": [ | ||
"/dist/", | ||
"/apps/demo-nextjs", | ||
"/apps/demo-react-cra", | ||
"/dist/demo-react-vite" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
apps/docs-snippets/src/guide/testing/tweaking-the-blockchain.node.browser.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Provider, fromTai64ToUnix } from 'fuels'; | ||
|
||
describe(__filename, () => { | ||
test('produceBlocks with custom timestamp docs snippet', async () => { | ||
const provider = new Provider('http://127.0.0.1:4000/graphql'); | ||
const latestBlock = await provider.getBlock('latest'); | ||
if (!latestBlock) { | ||
throw new Error('No latest block'); | ||
} | ||
const lastBlockNumber = latestBlock.height; | ||
// #region Provider-produceBlocks-custom-timestamp | ||
const lastBlockTimestamp = fromTai64ToUnix(latestBlock.time); | ||
const latestBlockNumber = await provider.produceBlocks(3, lastBlockTimestamp + 1000); | ||
// #endregion Provider-produceBlocks-custom-timestamp | ||
expect(latestBlockNumber.toHex()).toBe(lastBlockNumber.add(3).toHex()); | ||
}); | ||
}); |
15 changes: 0 additions & 15 deletions
15
apps/docs-snippets/src/guide/testing/tweaking-the-blockchain.test.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To save CI time, we should run
--browser
and--node
tests in parallel I CI.Then, we'd have a third job awaiting the other two to finish and merge their coverage afterward.
I remember @Dhaiwat10 started this implementation on his first draft for this.
This comment was marked as off-topic.
Sorry, something went wrong.