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
a28e56f2
Commit
a28e56f2
authored
May 12, 2023
by
tom
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of github.com:blockscout/frontend
parents
fd1383ee
0cc2e998
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 @
a28e56f2
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
React
from
'
react
'
;
import
*
as
statsMock
from
'
mocks/stats/index
'
;
import
*
as
txMock
from
'
mocks/txs/tx
'
;
import
*
as
txMock
from
'
mocks/txs/tx
'
;
import
*
as
socketServer
from
'
playwright/fixtures/socketServer
'
;
import
*
as
socketServer
from
'
playwright/fixtures/socketServer
'
;
import
TestApp
from
'
playwright/TestApp
'
;
import
TestApp
from
'
playwright/TestApp
'
;
...
@@ -13,11 +12,29 @@ export const test = base.extend<socketServer.SocketServerFixture>({
...
@@ -13,11 +12,29 @@ export const test = base.extend<socketServer.SocketServerFixture>({
createSocket
:
socketServer
.
createSocket
,
createSocket
:
socketServer
.
createSocket
,
});
});
test
(
'
default view +@mobile +@dark-mode
'
,
async
({
mount
,
page
})
=>
{
test
.
describe
(
'
mobile
'
,
()
=>
{
await
page
.
route
(
buildApiUrl
(
'
homepage_stats
'
),
(
route
)
=>
route
.
fulfill
({
test
.
use
({
viewport
:
devices
[
'
iPhone 13 Pro
'
].
viewport
});
status
:
200
,
test
(
'
default view
'
,
async
({
mount
,
page
})
=>
{
body
:
JSON
.
stringify
(
statsMock
.
base
),
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
({
await
page
.
route
(
buildApiUrl
(
'
homepage_txs
'
),
(
route
)
=>
route
.
fulfill
({
status
:
200
,
status
:
200
,
body
:
JSON
.
stringify
([
body
:
JSON
.
stringify
([
...
@@ -47,10 +64,6 @@ test.describe('socket', () => {
...
@@ -47,10 +64,6 @@ test.describe('socket', () => {
};
};
test
(
'
new item
'
,
async
({
mount
,
page
,
createSocket
})
=>
{
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
({
await
page
.
route
(
buildApiUrl
(
'
homepage_txs
'
),
(
route
)
=>
route
.
fulfill
({
status
:
200
,
status
:
200
,
body
:
JSON
.
stringify
([
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 @
a28e56f2
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 @
a28e56f2
File moved
ui/home/__screenshots__/LatestTxs.pw.tsx_default_mobile-default-view-1.png
0 → 100644
View file @
a28e56f2
31.6 KB
ui/home/__screenshots__/LatestTxs.pw.tsx_mobile_default-view-mobile-dark-mode-1.png
deleted
100644 → 0
View file @
fd1383ee
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