Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
d27a4750
Commit
d27a4750
authored
Nov 22, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TxLogTopic test
parent
28070d4d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
0 deletions
+32
-0
TxLogTopic.pw.tsx
ui/tx/logs/TxLogTopic.pw.tsx
+31
-0
TxLogTopic.tsx
ui/tx/logs/TxLogTopic.tsx
+1
-0
TxLogTopic.pw.tsx_address-view-1.png
...logs/__screenshots__/TxLogTopic.pw.tsx_address-view-1.png
+0
-0
TxLogTopic.pw.tsx_hex-view-1.png
ui/tx/logs/__screenshots__/TxLogTopic.pw.tsx_hex-view-1.png
+0
-0
No files found.
ui/tx/logs/TxLogTopic.pw.tsx
0 → 100644
View file @
d27a4750
import
{
test
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
RenderWithChakra
from
'
playwright/RenderWithChakra
'
;
import
{
MOBILE
}
from
'
playwright/viewports
'
;
import
TxLogTopic
from
'
./TxLogTopic
'
;
test
.
use
({
viewport
:
MOBILE
});
test
(
'
address view
'
,
async
({
mount
})
=>
{
const
component
=
await
mount
(
<
RenderWithChakra
>
<
TxLogTopic
hex=
"0x000000000000000000000000d789a607ceac2f0e14867de4eb15b15c9ffb5859"
index=
{
42
}
/>
</
RenderWithChakra
>,
);
await
component
.
locator
(
'
select[aria-label="Data type"]
'
).
selectOption
(
'
address
'
);
await
expect
(
component
).
toHaveScreenshot
();
});
test
(
'
hex view
'
,
async
({
mount
})
=>
{
const
component
=
await
mount
(
<
RenderWithChakra
>
<
TxLogTopic
hex=
"0x000000000000000000000000d789a607ceac2f0e14867de4eb15b15c9ffb5859"
index=
{
42
}
/>
</
RenderWithChakra
>,
);
await
component
.
locator
(
'
select[aria-label="Data type"]
'
).
selectOption
(
'
hex
'
);
await
expect
(
component
).
toHaveScreenshot
();
});
ui/tx/logs/TxLogTopic.tsx
View file @
d27a4750
...
...
@@ -74,6 +74,7 @@ const TxLogTopic = ({ hex, index }: Props) => {
mr=
{
3
}
flexShrink=
{
0
}
w=
"auto"
aria
-
label=
"Data type"
>
{
OPTIONS
.
map
((
option
)
=>
<
option
key=
{
option
}
value=
{
option
}
>
{
capitalize
(
option
)
}
</
option
>)
}
</
Select
>
...
...
ui/tx/logs/__screenshots__/TxLogTopic.pw.tsx_address-view-1.png
0 → 100644
View file @
d27a4750
5.89 KB
ui/tx/logs/__screenshots__/TxLogTopic.pw.tsx_hex-view-1.png
0 → 100644
View file @
d27a4750
3.58 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment