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
0cc2e998
Commit
0cc2e998
authored
May 11, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test fix
parent
9714c809
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
11 deletions
+24
-11
LatestTxs.pw.tsx
ui/home/LatestTxs.pw.tsx
+24
-11
LatestTxs.pw.tsx_dark-color-mode_default-view-dark-mode-1.png
...stTxs.pw.tsx_dark-color-mode_default-view-dark-mode-1.png
+0
-0
LatestTxs.pw.tsx_default_default-view-dark-mode-1.png
...s__/LatestTxs.pw.tsx_default_default-view-dark-mode-1.png
+0
-0
LatestTxs.pw.tsx_default_mobile-default-view-1.png
...hots__/LatestTxs.pw.tsx_default_mobile-default-view-1.png
+0
-0
LatestTxs.pw.tsx_mobile_default-view-mobile-dark-mode-1.png
...testTxs.pw.tsx_mobile_default-view-mobile-dark-mode-1.png
+0
-0
No files found.
ui/home/LatestTxs.pw.tsx
View file @
0cc2e998
import
{
test
as
base
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
{
test
as
base
,
expect
,
devices
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
*
as
statsMock
from
'
mocks/stats/index
'
;
import
*
as
txMock
from
'
mocks/txs/tx
'
;
import
*
as
socketServer
from
'
playwright/fixtures/socketServer
'
;
import
TestApp
from
'
playwright/TestApp
'
;
...
...
@@ -13,11 +12,29 @@ export const test = base.extend<socketServer.SocketServerFixture>({
createSocket
:
socketServer
.
createSocket
,
});
test
(
'
default view +@mobile +@dark-mode
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
buildApiUrl
(
'
homepage_stats
'
),
(
route
)
=>
route
.
fulfill
({
status
:
200
,
body
:
JSON
.
stringify
(
statsMock
.
base
),
}));
test
.
describe
(
'
mobile
'
,
()
=>
{
test
.
use
({
viewport
:
devices
[
'
iPhone 13 Pro
'
].
viewport
});
test
(
'
default view
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
buildApiUrl
(
'
homepage_txs
'
),
(
route
)
=>
route
.
fulfill
({
status
:
200
,
body
:
JSON
.
stringify
([
txMock
.
base
,
txMock
.
withContractCreation
,
txMock
.
withTokenTransfer
,
]),
}));
const
component
=
await
mount
(
<
TestApp
>
<
LatestTxs
/>
</
TestApp
>,
);
await
expect
(
component
).
toHaveScreenshot
();
});
});
test
(
'
default view +@dark-mode
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
buildApiUrl
(
'
homepage_txs
'
),
(
route
)
=>
route
.
fulfill
({
status
:
200
,
body
:
JSON
.
stringify
([
...
...
@@ -47,10 +64,6 @@ test.describe('socket', () => {
};
test
(
'
new item
'
,
async
({
mount
,
page
,
createSocket
})
=>
{
await
page
.
route
(
buildApiUrl
(
'
homepage_stats
'
),
(
route
)
=>
route
.
fulfill
({
status
:
200
,
body
:
JSON
.
stringify
(
statsMock
.
base
),
}));
await
page
.
route
(
buildApiUrl
(
'
homepage_txs
'
),
(
route
)
=>
route
.
fulfill
({
status
:
200
,
body
:
JSON
.
stringify
([
...
...
ui/home/__screenshots__/LatestTxs.pw.tsx_dark-color-mode_default-view-
mobile-
dark-mode-1.png
→
ui/home/__screenshots__/LatestTxs.pw.tsx_dark-color-mode_default-view-dark-mode-1.png
View file @
0cc2e998
File moved
ui/home/__screenshots__/LatestTxs.pw.tsx_default_default-view-
mobile-
dark-mode-1.png
→
ui/home/__screenshots__/LatestTxs.pw.tsx_default_default-view-dark-mode-1.png
View file @
0cc2e998
File moved
ui/home/__screenshots__/LatestTxs.pw.tsx_default_mobile-default-view-1.png
0 → 100644
View file @
0cc2e998
31.6 KB
ui/home/__screenshots__/LatestTxs.pw.tsx_mobile_default-view-mobile-dark-mode-1.png
deleted
100644 → 0
View file @
9714c809
29.9 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