Skip to content

Commit ba4fd7f

Browse files
authored
Update state section on test-snaps (#3014)
Some HTML IDs were duplicated between the state and manage state sections on `test-snaps`, and there was a missing button as well. I've fixed both issues in this PR.
1 parent 1ab6bc9 commit ba4fd7f

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/test-snaps/src/features/snaps/state/State.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const State: FunctionComponent = () => {
4949
</pre>
5050
</Result>
5151

52+
<GetState encrypted={false} />
5253
<SetState encrypted={false} />
5354
<ClearState encrypted={false} />
5455
</Snap>

packages/test-snaps/src/features/snaps/state/components/SetState.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,22 @@ export const SetState: FunctionComponent<{ encrypted: boolean }> = ({
5959
placeholder="Value"
6060
value={value}
6161
onChange={handleChangeValue}
62-
id={encrypted ? 'dataManageState' : 'dataUnencryptedManageState'}
62+
id={encrypted ? 'dataState' : 'dataUnencryptedState'}
6363
className="mb-3"
6464
/>
6565
</Form.Group>
6666

6767
<Button
6868
type="submit"
69-
id={encrypted ? 'sendManageState' : 'sendUnencryptedManageState'}
69+
id={encrypted ? 'sendState' : 'sendUnencryptedState'}
7070
disabled={isLoading}
7171
>
7272
Set State
7373
</Button>
7474
</Form>
7575

7676
<Result className="mb-3">
77-
<span
78-
id={
79-
encrypted
80-
? 'sendManageStateResult'
81-
: 'sendUnencryptedManageStateResult'
82-
}
83-
>
77+
<span id={encrypted ? 'sendStateResult' : 'sendUnencryptedStateResult'}>
8478
{JSON.stringify(data, null, 2)}
8579
{JSON.stringify(error, null, 2)}
8680
</span>

0 commit comments

Comments
 (0)