Sitelet https://github.com/synpress/docs/commit/05ac47d407f91eab0e7b902fe752da142fc19faa
Skip to content

Commit 05ac47d

Browse files
committed
Left bar - Sub-navigation
1 parent 06c78d0 commit 05ac47d

9 files changed

Lines changed: 142 additions & 161 deletions

File tree

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
---
2-
title: 'Classes'
2+
title: 'Index'
33
---
44

5-
<Card
6-
title="Class: MetaMask"
7-
icon="link"
8-
href="./MetaMask"
9-
>
10-
MetaMask class for interacting with the MetaMask extension in Cypress tests.
11-
</Card>
5+
| Member | Description |
6+
| :------ | :------ |
7+
| [MetaMask](./MetaMask) | MetaMask class for interacting with the MetaMask extension in Cypress tests. |
Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
11
---
2-
title: 'Functions'
2+
title: 'Index'
33
---
44

5-
<CardGroup cols={1}>
6-
<Card
7-
title="configureSynpressForEthereumWalletMock()"
8-
icon="link"
9-
href="./configureSynpressForEthereumWalletMock"
10-
>
11-
Configures Synpress for use with the Ethereum Wallet Mock.
12-
</Card>
13-
14-
<Card
15-
title="configureSynpressForMetaMask()"
16-
icon="link"
17-
href="./configureSynpressForMetaMask"
18-
>
19-
Configures Synpress for use with MetaMask.
20-
</Card>
21-
22-
<Card
23-
title="initMetaMask()"
24-
icon="link"
25-
href="./initMetaMask"
26-
>
27-
Initializes MetaMask for Cypress tests.
28-
</Card>
29-
</CardGroup>
5+
| Member | Description |
6+
| :------ | :------ |
7+
| [configureSynpressForEthereumWalletMock](./configureSynpressForEthereumWalletMock) | Configures Synpress for use with the Ethereum Wallet Mock. |
8+
| [configureSynpressForMetaMask](./configureSynpressForMetaMask) | Configures Synpress for use with MetaMask. |
9+
| [initMetaMask](./initMetaMask) | Initializes MetaMask for Cypress tests. |
Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
11
---
2-
title: 'Support'
2+
title: 'Index'
33
---
44

5-
<CardGroup cols={1}>
6-
<Card
7-
title="mockEthereum()"
8-
icon="link"
9-
href="./mockEthereum"
10-
>
11-
Configures Synpress for use with the Ethereum Wallet Mock.
12-
</Card>
13-
14-
<Card
15-
title="synpressCommandsForEthereumWalletMock()"
16-
icon="link"
17-
href="./synpressCommandsForEthereumWalletMock"
18-
>
19-
Initializes Synpress commands for the Ethereum Wallet Mock.
20-
</Card>
21-
22-
<Card
23-
title="synpressCommandsForMetaMask()"
24-
icon="link"
25-
href="./synpressCommandsForMetaMask"
26-
>
27-
Initializes Synpress commands for MetaMask.
28-
</Card>
29-
</CardGroup>
5+
| Member | Description |
6+
| :------ | :------ |
7+
| [mockEthereum](./mockEthereum) | Mock Ethereum Environment for Cypress Tests. |
8+
| [synpressCommandsForEthereumWalletMock](./synpressCommandsForEthereumWalletMock) | Initializes Synpress commands for the Ethereum Wallet Mock.. |
9+
| [synpressCommandsForMetaMask](./synpressCommandsForMetaMask) | Initializes Synpress commands for MetaMask. |

‎api-reference/functions/index.mdx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 'Index'
3+
---
4+
5+
| Member | Description |
6+
| :------ | :------ |
7+
| [defineWalletSetup](./defineWalletSetup) | This function is used to define how a wallet should be set up. |
8+
| [testWithSynpress](./testWithSynpress) | - |
Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
---
2-
title: 'Classes'
2+
title: 'Index'
33
---
44

5-
<CardGroup cols={1}>
6-
<Card
7-
title="EthereumWalletMock()"
8-
icon="link"
9-
href="./EthereumWalletMock"
10-
>
11-
Mock implementation of an Ethereum wallet for testing purposes.
12-
</Card>
13-
14-
<Card
15-
title="MetaMask()"
16-
icon="link"
17-
href="./MetaMask"
18-
>
19-
MetaMask class for interacting with the MetaMask extension in Playwright tests.
20-
</Card>
21-
</CardGroup>
5+
| Member | Description |
6+
| :------ | :------ |
7+
| [EthereumWalletMock](./EthereumWalletMock) | Mock implementation of an Ethereum wallet for testing purposes. |
8+
| [MetaMask](./MetaMask) | MetaMask class for interacting with the MetaMask extension in Playwright tests. |
Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,11 @@
11
---
2-
title: 'Functions'
2+
title: 'Index'
33
---
44

5-
<CardGroup cols={1}>
6-
<Card
7-
title="ethereumWalletMockFixtures()"
8-
icon="link"
9-
href="./ethereumWalletMockFixtures"
10-
>
11-
Declares a test.
12-
</Card>
13-
14-
<Card
15-
title="getExtensionId()"
16-
icon="link"
17-
href="./getExtensionId"
18-
>
19-
Returns the extension ID for the given extension name. The ID is fetched from the `chrome://extensions` page.
20-
</Card>
21-
22-
<Card
23-
title="metaMaskFixtures()"
24-
icon="link"
25-
href="./metaMaskFixtures"
26-
>
27-
</Card>
28-
29-
<Card
30-
title="mockEthereum()"
31-
icon="link"
32-
href="./mockEthereum"
33-
>
34-
</Card>
35-
36-
<Card
37-
title="unlockForFixture()"
38-
icon="link"
39-
href="./unlockForFixture"
40-
>
41-
A more advanced version of the `MetaMask.unlock()` function that incorporates various workarounds for MetaMask issues, among other things.
42-
</Card>
43-
</CardGroup>
5+
| Member | Description |
6+
| :------ | :------ |
7+
| [ethereumWalletMockFixtures](./ethereumWalletMockFixtures) | Declares a test. |
8+
| [getExtensionId](./getExtensionId) | Returns the extension ID for the given extension name. The ID is fetched from the `chrome://extensions` page. |
9+
| [metaMaskFixtures](./metaMaskFixtures) | - |
10+
| [mockEthereum](./mockEthereum) | - |
11+
| [unlockForFixture](./unlockForFixture) | A more advanced version of the `MetaMask.unlock()` function that incorporates various workarounds for MetaMask issues, among other things. |
Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
11
---
2-
title: 'Variables'
2+
title: 'Index'
33
---
44

5-
<CardGroup cols={1}>
6-
<Card
7-
title="DEFAULT_NETWORK_ID()"
8-
icon="link"
9-
href="./DEFAULT_NETWORK_ID"
10-
>
11-
The network ID (Optimism network by default).
12-
</Card>
13-
14-
<Card
15-
title="PRIVATE_KEY()"
16-
icon="link"
17-
href="./PRIVATE_KEY"
18-
>
19-
The private key used for testing purposes.
20-
</Card>
21-
22-
<Card
23-
title="web3MockPath"
24-
icon="link"
25-
href="./web3MockPath"
26-
>
27-
Relative path to the web3-mock bundle.
28-
</Card>
29-
</CardGroup>
5+
| Member | Description |
6+
| :------ | :------ |
7+
| [DEFAULT\_NETWORK\_ID](./DEFAULT_NETWORK_ID) | The network ID (Optimism network by default). |
8+
| [PRIVATE\_KEY](./PRIVATE_KEY) | The private key used for testing purposes. |
9+
| [web3MockPath](./web3MockPath) | Relative path to the web3-mock bundle. |

‎docs/guides/playwright.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ test('should connect wallet to the MetaMask Test Dapp', async ({ context, page,
6666

6767
You can notice the unusual `extensionId` fixture used here. This fixture is amongst a few others that are provided by Synpress. You can learn more about them in the [Built-in Fixtures](./fixtures) section.
6868

69-
To access the MetaMask API, you must create an instance of the `MetaMask` class as shown above. To learn more about the constructor and all the methods this class provides, see [its API reference](/api/playwright/classes/MetaMask.md).
69+
To access the MetaMask API, you must create an instance of the `MetaMask` class as shown above. To learn more about the constructor and all the methods this class provides, see [its API reference](../../api-reference/playwright/classes/MetaMask).
7070

7171
<Tip>
7272
If you're using the same wallet setup in multiple test files, you can speed up the process of writing your tests by defining a custom fixture that will create the `MetaMask` instance for you.

‎mint.json‎

Lines changed: 98 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@
1818
"versions": ["4.0.3"],
1919
"topbarLinks": [
2020
{
21-
"name": "Support",
21+
"name": "Github",
22+
"url": "https://github.com/Synthetixio/synpress/tree/dev"
23+
},
24+
{
25+
"name": "Discord",
2226
"url": "https://discord.gg/XhZKSRGtWc"
27+
},
28+
{
29+
"name": "X",
30+
"url": "https://twitter.com/Synpress_"
2331
}
2432
],
33+
"primaryTab": {
34+
"name": "Docs"
35+
},
2536
"tabs": [
2637
{
2738
"name": "API",
@@ -32,17 +43,33 @@
3243
"url": "https://github.com/Synthetixio/synpress/tree/dev/examples"
3344
}
3445
],
35-
"primaryTab": {
36-
"name": "Documentation"
37-
},
46+
"anchors": [
47+
{
48+
"name": "GitHub",
49+
"icon": "github",
50+
"url": "https://github.com/Synthetixio/synpress/tree/dev"
51+
},
52+
{
53+
"name": "Discord",
54+
"icon": "discord",
55+
"url": "https://discord.gg/XhZKSRGtWc"
56+
},
57+
58+
{
59+
"name": "X",
60+
"icon": "x-twitter",
61+
"url": "https://twitter.com/Synpress_"
62+
}
63+
],
3864
"navigation": [
3965
{
4066
"group": "Introduction",
4167
"pages": [
4268
"docs/introduction",
43-
"docs/getting-started",
44-
"docs/setup-playwright",
45-
"docs/setup-cypress",
69+
{
70+
"group": "Getting Started",
71+
"pages": ["docs/getting-started", "docs/setup-playwright", "docs/setup-cypress"]
72+
},
4673
"docs/migration-guide",
4774
"docs/typescript",
4875
"docs/platform-compatibility",
@@ -61,28 +88,83 @@
6188
]
6289
},
6390
{
64-
"group": "Functions",
91+
"group": "Index",
6592
"pages": [
66-
"api-reference/functions/defineWalletSetup",
67-
"api-reference/functions/testWithSynpress"
93+
{
94+
"group": "Functions",
95+
"pages": [
96+
"api-reference/functions/index",
97+
"api-reference/functions/defineWalletSetup",
98+
"api-reference/functions/testWithSynpress"
99+
]
100+
}
68101
]
69102
},
70103
{
71104
"group": "Cypress",
72105
"pages": [
73106
"api-reference/cypress/index",
74-
"api-reference/cypress/classes/index",
75-
"api-reference/cypress/functions/index",
76-
"api-reference/cypress/support/functions/index"
107+
{
108+
"group": "Classes",
109+
"pages": ["api-reference/cypress/classes/index", "api-reference/cypress/classes/MetaMask"]
110+
},
111+
{
112+
"group": "Functions",
113+
"pages": [
114+
"api-reference/cypress/functions/index",
115+
"api-reference/cypress/functions/configureSynpressForEthereumWalletMock",
116+
"api-reference/cypress/functions/configureSynpressForMetaMask",
117+
"api-reference/cypress/functions/initMetaMask"
118+
]
119+
},
120+
{
121+
"group": "Support",
122+
"pages": [
123+
{
124+
"group": "Functions",
125+
"pages": [
126+
"api-reference/cypress/support/functions/index",
127+
"api-reference/cypress/support/functions/mockEthereum",
128+
"api-reference/cypress/support/functions/synpressCommandsForEthereumWalletMock",
129+
"api-reference/cypress/support/functions/synpressCommandsForMetaMask"
130+
]
131+
}
132+
]
133+
}
77134
]
78135
},
79136
{
80137
"group": "Playwright",
81138
"pages": [
82139
"api-reference/playwright/index",
83-
"api-reference/playwright/classes/index",
84-
"api-reference/playwright/variables/index",
85-
"api-reference/playwright/functions/index"
140+
{
141+
"group": "Classes",
142+
"pages": [
143+
"api-reference/playwright/classes/index",
144+
"api-reference/playwright/classes/EthereumWalletMock",
145+
"api-reference/playwright/classes/MetaMask"
146+
]
147+
},
148+
{
149+
"group": "Variables",
150+
"pages": [
151+
"api-reference/playwright/variables/index",
152+
"api-reference/playwright/variables/DEFAULT_NETWORK_ID",
153+
"api-reference/playwright/variables/PRIVATE_KEY",
154+
"api-reference/playwright/variables/web3MockPath"
155+
]
156+
},
157+
{
158+
"group": "Functions",
159+
"pages": [
160+
"api-reference/playwright/functions/index",
161+
"api-reference/playwright/functions/ethereumWalletMockFixtures",
162+
"api-reference/playwright/functions/getExtensionId",
163+
"api-reference/playwright/functions/metaMaskFixtures",
164+
"api-reference/playwright/functions/mockEthereum",
165+
"api-reference/playwright/functions/unlockForFixture"
166+
]
167+
}
86168
]
87169
}
88170
],

0 commit comments

Comments
 (0)