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
d7b41395
Commit
d7b41395
authored
Apr 19, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for form
parent
eb298eca
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
+38
-0
TokenInfoForm.pw.tsx
ui/tokenInfo/TokenInfoForm.pw.tsx
+38
-0
TokenInfoForm.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
...m.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
+0
-0
TokenInfoForm.pw.tsx_default_base-view-mobile-dark-mode-1.png
...nInfoForm.pw.tsx_default_base-view-mobile-dark-mode-1.png
+0
-0
TokenInfoForm.pw.tsx_mobile_base-view-mobile-dark-mode-1.png
...enInfoForm.pw.tsx_mobile_base-view-mobile-dark-mode-1.png
+0
-0
No files found.
ui/tokenInfo/TokenInfoForm.pw.tsx
0 → 100644
View file @
d7b41395
import
{
test
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
*
as
mocks
from
'
mocks/account/verifiedAddresses
'
;
import
TestApp
from
'
playwright/TestApp
'
;
import
buildApiUrl
from
'
playwright/utils/buildApiUrl
'
;
import
TokenInfoForm
from
'
./TokenInfoForm
'
;
const
FORM_CONFIG_URL
=
buildApiUrl
(
'
token_info_applications_config
'
,
{
chainId
:
'
99
'
},
true
);
test
(
'
base view +@mobile +@dark-mode
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
mocks
.
TOKEN_INFO_APPLICATION_BASE
.
iconUrl
,
(
route
)
=>
{
return
route
.
fulfill
({
status
:
200
,
path
:
'
./playwright/image_md.jpg
'
,
});
});
await
page
.
route
(
FORM_CONFIG_URL
,
(
route
)
=>
route
.
fulfill
({
body
:
JSON
.
stringify
(
mocks
.
TOKEN_INFO_FORM_CONFIG
),
}));
const
props
=
{
address
:
mocks
.
VERIFIED_ADDRESS
.
ITEM_1
.
contractAddress
,
tokenName
:
'
Test Token (TT)
'
,
application
:
mocks
.
TOKEN_INFO_APPLICATION
.
APPROVED
,
onSubmit
:
()
=>
{},
};
const
component
=
await
mount
(
<
TestApp
>
<
TokenInfoForm
{
...
props
}
/>
</
TestApp
>,
);
await
expect
(
component
).
toHaveScreenshot
();
});
ui/tokenInfo/__screenshots__/TokenInfoForm.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
0 → 100644
View file @
d7b41395
124 KB
ui/tokenInfo/__screenshots__/TokenInfoForm.pw.tsx_default_base-view-mobile-dark-mode-1.png
0 → 100644
View file @
d7b41395
120 KB
ui/tokenInfo/__screenshots__/TokenInfoForm.pw.tsx_mobile_base-view-mobile-dark-mode-1.png
0 → 100644
View file @
d7b41395
122 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