Skip to content

Commit

Permalink
Merge branch 'new-dawn' into sero/rename-account
Browse files Browse the repository at this point in the history
  • Loading branch information
Seroxdesign authored Feb 1, 2024
2 parents 02b591d + eacf895 commit 456921f
Show file tree
Hide file tree
Showing 34 changed files with 341 additions and 143 deletions.
9 changes: 9 additions & 0 deletions .changeset/fresh-walls-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@synthetixio/synpress": major
"@synthetixio/synpress-core": patch
"@synthetixio/synpress-fixtures": patch
"@synthetixio/synpress-tsconfig": patch
"@synthetixio/synpress-metamask": patch
---

Initial Alpha Release
14 changes: 14 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"docs": "0.0.0",
"example-new-dawn": "0.0.0",
"@synthetixio/synpress-core": "0.0.0",
"@synthetixio/synpress-fixtures": "0.0.0",
"@synthetixio/synpress-tsconfig": "0.0.0",
"@synthetixio/synpress": "3.0.0",
"@synthetixio/synpress-metamask": "0.0.0"
},
"changesets": ["fresh-walls-nail"]
}
39 changes: 39 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Deployment Guide

## Materials worth reading

- https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md
- https://github.com/changesets/changesets/blob/main/docs/prereleases.md

## How to deploy

⚠️ Remember to run all the commands from the root directory of the repository!

1. Run the following command to select the package to be released:

```bash
pnpm changeset
```

2. Consume the changeset by running:

```bash
pnpm changeset version
```

3. Verify all the `package.json` and `CHANGELOG.md` files that were changed by the previous command.

4. Publish the packages by running:

```bash
# You might have to run this command twice if it fails to publish the `@synthetixio/synpress` package on the first run.
pnpm changeset publish
```

## Tags

If you're running in prerelease mode, make sure you're also pushing the release tags to GitHub with:

```bash
git push --follow-tags
```
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default defineConfig({
title: 'Synpress',
description: 'E2E testing library for Web3 dapps.',
lastUpdated: true,
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
themeConfig: {
editLink: {
pattern: 'https://github.com/Synthetixio/synpress/tree/new-dawn/docs/:path',
Expand Down
64 changes: 32 additions & 32 deletions docs/api/classes/MetaMask.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ This class is the heart of Synpress's MetaMask API.
- [addNetwork()](MetaMask.md#addnetwork)
- [addNewAccount()](MetaMask.md#addnewaccount)
- [approveNewNetwork()](MetaMask.md#approvenewnetwork)
- [approvePermission()](MetaMask.md#approvepermission)
- [approveSwitchNetwork()](MetaMask.md#approveswitchnetwork)
- [approveTokenPermission()](MetaMask.md#approvetokenpermission)
- [confirmSignature()](MetaMask.md#confirmsignature)
- [confirmTransaction()](MetaMask.md#confirmtransaction)
- [connectToDapp()](MetaMask.md#connecttodapp)
Expand All @@ -23,9 +23,9 @@ This class is the heart of Synpress's MetaMask API.
- [openSettings()](MetaMask.md#opensettings)
- [openSidebarMenu()](MetaMask.md#opensidebarmenu)
- [rejectNewNetwork()](MetaMask.md#rejectnewnetwork)
- [rejectPermission()](MetaMask.md#rejectpermission)
- [rejectSignature()](MetaMask.md#rejectsignature)
- [rejectSwitchNetwork()](MetaMask.md#rejectswitchnetwork)
- [rejectTokenPermission()](MetaMask.md#rejecttokenpermission)
- [rejectTransaction()](MetaMask.md#rejecttransaction)
- [resetAccount()](MetaMask.md#resetaccount)
- [switchAccount()](MetaMask.md#switchaccount)
Expand Down Expand Up @@ -138,16 +138,30 @@ Approves a new network request.
***
### approvePermission()
### approveSwitchNetwork()
```ts
approveSwitchNetwork(): Promise<void>
```
Approves a switch network request.
#### Returns
`Promise`\<`void`\>
***
### approveTokenPermission()
```ts
approvePermission(options?): Promise<void>
approveTokenPermission(options?): Promise<void>
```
Approves a permission request to spend tokens.
::: warning
This function does not work with the NFTs approvals.
For NFT approvals, use `confirmTransaction` method.
:::
#### Parameters
Expand All @@ -164,20 +178,6 @@ This function does not work with the NFTs approvals.
***
### approveSwitchNetwork()
```ts
approveSwitchNetwork(): Promise<void>
```
Approves a switch network request.
#### Returns
`Promise`\<`void`\>
***
### confirmSignature()
```ts
Expand Down Expand Up @@ -343,45 +343,45 @@ Rejects a new network request.
***
### rejectPermission()
### rejectSignature()
```ts
rejectPermission(): Promise<void>
rejectSignature(): Promise<void>
```
Rejects a permission request to spend tokens.
::: warning
This function does not work with the NFTs approvals.
:::
Rejects a signature request. This function supports all types of commonly used signatures.
#### Returns
`Promise`\<`void`\>
***
### rejectSignature()
### rejectSwitchNetwork()
```ts
rejectSignature(): Promise<void>
rejectSwitchNetwork(): Promise<void>
```
Rejects a signature request. This function supports all types of commonly used signatures.
Rejects a switch network request.
#### Returns
`Promise`\<`void`\>
***
### rejectSwitchNetwork()
### rejectTokenPermission()
```ts
rejectSwitchNetwork(): Promise<void>
rejectTokenPermission(): Promise<void>
```
Rejects a switch network request.
Rejects a permission request to spend tokens.
::: warning
For NFT approvals, use `confirmTransaction` method.
:::
#### Returns
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/known-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ If you require the previews for development purposes, your only option is to com
### MetaMask is not working in headless mode on GitHub Actions CI

Due to a bug in MetaMask, it's impossible to run MetaMask in headless mode on GitHub Actions. We're certain this bug affects other CI providers, however, we have yet to test it.

::: warning NOTE
You can run the tests in the headful mode on CI, and they will work just fine.
:::
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@synthetixio/synpress": "workspace:*",
"tsconfig": "workspace:*",
"@synthetixio/synpress-tsconfig": "workspace:*",
"typedoc": "^0.25.6",
"typedoc-plugin-markdown": "4.0.0-next.38",
"typedoc-vitepress-theme": "^1.0.0-next.4",
Expand Down
Binary file added docs/public/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "tsconfig/base.json",
"extends": "@synthetixio/synpress-tsconfig/base.json",
"compilerOptions": {
"rootDir": "."
},
Expand Down
4 changes: 2 additions & 2 deletions examples/new-dawn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"test:e2e:headless:ui": "HEADLESS=true playwright test --ui"
},
"dependencies": {
"@playwright/test": "1.40.0",
"@synthetixio/synpress": "0.0.0-devtest-20231206214259",
"@playwright/test": "1.41.1",
"@synthetixio/synpress": "4.0.0-alpha.0",
"dotenv": "16.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/new-dawn/test/e2e/03_advanced.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Token', () => {
await deployToken()

await page.locator('#approveTokens').click()
await metamask.approvePermission()
await metamask.approveTokenPermission()
})
})

Expand Down
7 changes: 7 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @synthetixio/synpress-core

## 0.0.1-alpha.0

### Patch Changes

- Initial Alpha Release
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synthetixio/synpress-core",
"version": "0.0.0",
"version": "0.0.1-alpha.0",
"type": "module",
"exports": {
"types": "./types/index.d.ts",
Expand Down Expand Up @@ -42,6 +42,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@synthetixio/synpress-tsconfig": "0.0.1-alpha.0",
"@types/archiver": "^5.3.3",
"@types/fs-extra": "^11.0.2",
"@types/gradient-string": "^1.1.4",
Expand All @@ -53,7 +54,6 @@
"memfs": "^4.5.0",
"msw": "^2.0.11",
"rimraf": "^5.0.1",
"tsconfig": "workspace:*",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "tsconfig/base.json",
"extends": "@synthetixio/synpress-tsconfig/base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "types",
Expand Down
7 changes: 7 additions & 0 deletions packages/fixtures/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @synthetixio/synpress-fixtures

## 0.0.1-alpha.0

### Patch Changes

- Initial Alpha Release
6 changes: 3 additions & 3 deletions packages/fixtures/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synthetixio/synpress-fixtures",
"version": "0.0.0",
"version": "0.0.1-alpha.0",
"type": "module",
"exports": {
"types": "./types/index.d.ts",
Expand All @@ -25,16 +25,16 @@
"types:check": "tsc --noEmit"
},
"dependencies": {
"@synthetixio/synpress-core": "workspace:*",
"@synthetixio/synpress-core": "0.0.1-alpha.0",
"@viem/anvil": "^0.0.6",
"fs-extra": "^11.1.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@synthetixio/synpress-tsconfig": "0.0.1-alpha.0",
"@types/fs-extra": "^11.0.2",
"@types/node": "^20.8.0",
"rimraf": "^5.0.1",
"tsconfig": "workspace:*",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/fixtures/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "tsconfig/base.json",
"extends": "@synthetixio/synpress-tsconfig/base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "types",
Expand Down
7 changes: 7 additions & 0 deletions packages/tsconfig/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @synthetixio/synpress-tsconfig

## 0.0.1-alpha.0

### Patch Changes

- Initial Alpha Release
6 changes: 3 additions & 3 deletions packages/tsconfig/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tsconfig",
"version": "0.0.0",
"private": true,
"name": "@synthetixio/synpress-tsconfig",
"version": "0.0.1-alpha.0",
"type": "module",
"files": [
"base.json"
]
Expand Down
Loading

0 comments on commit 456921f

Please sign in to comment.