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
9f2da8b0
Commit
9f2da8b0
authored
Feb 18, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests (hopefully)
parent
53de21d4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
12 deletions
+12
-12
middleware.ts
middleware.ts
+4
-3
package.json
package.json
+1
-1
playwright-ct.config.ts
playwright-ct.config.ts
+0
-3
ContractVerificationForm.pw.tsx
ui/contractVerification/ContractVerificationForm.pw.tsx
+3
-3
ContractVerificationForm.pw.tsx_default_sourcify-with-multiple-contracts-mobile-1.png
...tsx_default_sourcify-with-multiple-contracts-mobile-1.png
+0
-0
ContractVerificationForm.pw.tsx_default_sourcify-with-multiple-contracts-mobile-2.png
...tsx_default_sourcify-with-multiple-contracts-mobile-2.png
+0
-0
ContractVerificationForm.pw.tsx_mobile_sourcify-with-multiple-contracts-mobile-1.png
....tsx_mobile_sourcify-with-multiple-contracts-mobile-1.png
+0
-0
ContractVerificationForm.pw.tsx_mobile_sourcify-with-multiple-contracts-mobile-2.png
....tsx_mobile_sourcify-with-multiple-contracts-mobile-2.png
+0
-0
ContractVerificationFieldContractIndex.tsx
...ication/fields/ContractVerificationFieldContractIndex.tsx
+4
-2
No files found.
middleware.ts
View file @
9f2da8b0
...
...
@@ -38,7 +38,8 @@ export function middleware(req: NextRequest) {
* Configure which routes should pass through the Middleware.
*/
export
const
config
=
{
matcher
:
[
'
/((?!.*
\\
.|api
\\
/|node-api
\\
/).*)
'
,
// exclude all static + api + node-api routes
],
matcher
:
[
'
/
'
,
'
/:notunderscore((?!_next).+)
'
],
// matcher: [
// '/((?!.*\\.|api\\/|node-api\\/).*)', // exclude all static + api + node-api routes
// ],
};
package.json
View file @
9f2da8b0
...
...
@@ -21,7 +21,7 @@
"lint:tsc"
:
"./node_modules/.bin/tsc -p ./tsconfig.json"
,
"prepare"
:
"husky install"
,
"format-svg"
:
"./node_modules/.bin/svgo -r ./icons"
,
"test:pw"
:
"./playwright/make-envs-script.sh && NODE_OPTIONS=
\"
--max-old-space-size=
6144
\"
playwright test -c playwright-ct.config.ts"
,
"test:pw"
:
"./playwright/make-envs-script.sh && NODE_OPTIONS=
\"
--max-old-space-size=
4096
\"
playwright test -c playwright-ct.config.ts"
,
"test:pw:local"
:
"export NODE_PATH=$(pwd)/node_modules && yarn test:pw"
,
"test:pw:docker"
:
"docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.28.0-focal ./playwright/run-tests.sh"
,
"test:jest"
:
"jest"
,
...
...
playwright-ct.config.ts
View file @
9f2da8b0
...
...
@@ -56,9 +56,6 @@ const config: PlaywrightTestConfig = {
// https://github.com/storybookjs/builder-vite/issues/409#issuecomment-1152848986
sourcemap
:
false
,
minify
:
false
,
rollupOptions
:
{
cache
:
false
,
},
},
},
},
...
...
ui/contractVerification/ContractVerificationForm.pw.tsx
View file @
9f2da8b0
...
...
@@ -54,7 +54,7 @@ const formConfig: SmartContractVerificationConfig = {
],
};
test
.
skip
(
'
flatten source code method +@dark-mode +@mobile
'
,
async
({
mount
,
page
})
=>
{
test
(
'
flatten source code method +@dark-mode +@mobile
'
,
async
({
mount
,
page
})
=>
{
const
component
=
await
mount
(
<
TestApp
>
<
ContractVerificationForm
config=
{
formConfig
}
hash=
{
hash
}
/>
...
...
@@ -90,9 +90,9 @@ test.describe('sourcify', () => {
const
testWithSocket
=
test
.
extend
<
socketServer
.
SocketServerFixture
>
({
createSocket
:
socketServer
.
createSocket
,
});
testWithSocket
.
describe
.
configure
({
mode
:
'
serial
'
});
testWithSocket
.
describe
.
configure
({
mode
:
'
serial
'
,
timeout
:
20
_000
});
testWithSocket
.
skip
(
'
with multiple contracts
'
,
async
({
mount
,
page
,
createSocket
})
=>
{
testWithSocket
(
'
with multiple contracts +@mobile
'
,
async
({
mount
,
page
,
createSocket
})
=>
{
const
component
=
await
mount
(
<
TestApp
withSocket
>
<
ContractVerificationForm
config=
{
formConfig
}
hash=
{
hash
}
/>
...
...
ui/contractVerification/__screenshots__/ContractVerificationForm.pw.tsx_default_sourcify-with-multiple-contracts-1.png
→
ui/contractVerification/__screenshots__/ContractVerificationForm.pw.tsx_default_sourcify-with-multiple-contracts-
mobile-
1.png
View file @
9f2da8b0
File moved
ui/contractVerification/__screenshots__/ContractVerificationForm.pw.tsx_default_sourcify-with-multiple-contracts-2.png
→
ui/contractVerification/__screenshots__/ContractVerificationForm.pw.tsx_default_sourcify-with-multiple-contracts-
mobile-
2.png
View file @
9f2da8b0
File moved
ui/contractVerification/__screenshots__/ContractVerificationForm.pw.tsx_mobile_sourcify-
method-dark-mode
-mobile-1.png
→
ui/contractVerification/__screenshots__/ContractVerificationForm.pw.tsx_mobile_sourcify-
with-multiple-contracts
-mobile-1.png
View file @
9f2da8b0
File moved
ui/contractVerification/__screenshots__/ContractVerificationForm.pw.tsx_mobile_sourcify-with-multiple-contracts-mobile-2.png
0 → 100644
View file @
9f2da8b0
50.6 KB
ui/contractVerification/fields/ContractVerificationFieldContractIndex.tsx
View file @
9f2da8b0
...
...
@@ -11,7 +11,8 @@ import FancySelect from 'ui/shared/FancySelect/FancySelect';
import
ContractVerificationFormRow
from
'
../ContractVerificationFormRow
'
;
const
SOURCIFY_ERROR_REGEXP
=
/
(?<
=
\b
contracts
\s\([^
()
]
*
)\w
+/gi
;
// const SOURCIFY_ERROR_REGEXP = /(?<=\bcontracts\s\([^()]*)\w+/gi;
const
SOURCIFY_ERROR_REGEXP
=
/
\(([^
()
]
*
)\)
/
;
const
ContractVerificationFieldContractIndex
=
()
=>
{
const
[
options
,
setOptions
]
=
React
.
useState
<
Array
<
Option
>>
([]);
...
...
@@ -26,7 +27,8 @@ const ContractVerificationFieldContractIndex = () => {
return
;
}
const
parsedMethods
=
sourcesError
.
match
(
SOURCIFY_ERROR_REGEXP
);
const
matchResult
=
sourcesError
.
match
(
SOURCIFY_ERROR_REGEXP
);
const
parsedMethods
=
matchResult
?.[
1
].
split
(
'
,
'
);
if
(
!
Array
.
isArray
(
parsedMethods
)
||
parsedMethods
.
length
===
0
)
{
return
;
}
...
...
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