Skip to content

Commit

Permalink
Merge pull request #2210 from ChainSafe/dev
Browse files Browse the repository at this point in the history
Release - 2022-07-01
  • Loading branch information
FSM1 authored Jul 5, 2022
2 parents 997ae3b + 861d8ce commit be2f59c
Show file tree
Hide file tree
Showing 142 changed files with 4,628 additions and 2,817 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/test-files-on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_dispatch]
jobs:
cypress-run:
runs-on: ubuntu-latest
container: cypress/browsers:node14.17.0-chrome91-ff89
container: cypress/browsers:node14.17.6-chrome100-ff98
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -18,11 +18,13 @@ jobs:
key: ${{ runner.os }}-node_modules-files-build-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
- name: Install and show git version
run: apt-get -y install git && git --version
id: git-install
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v4
env:
REACT_APP_BLOCKNATIVE_ID: ${{ secrets.GH_REACT_APP_BLOCKNATIVE_ID }}
REACT_APP_FILES_VERIFIER_NAME: ${{ secrets.GH_REACT_APP_FILES_VERIFIER_NAME }}
Expand Down Expand Up @@ -53,6 +55,7 @@ jobs:

- name: Slack Notification
uses: rtCamp/[email protected]
if: always()
env:
SLACK_TITLE: 'Files UI Test Suite On-Demand Result:'
SLACK_MESSAGE: ${{ job.status }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
cypress-run:
runs-on: ubuntu-latest
container: cypress/browsers:node14.17.0-chrome91-ff89
container: cypress/browsers:node14.17.6-chrome100-ff98
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -27,18 +27,19 @@ jobs:
key: ${{ runner.os }}-node_modules-files-build-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
- name: Install and show git version
run: apt-get -y install git && git --version
id: git-install
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v4
env:
REACT_APP_BLOCKNATIVE_ID: ${{ secrets.GH_REACT_APP_BLOCKNATIVE_ID }}
REACT_APP_FILES_VERIFIER_NAME: ${{ secrets.GH_REACT_APP_FILES_VERIFIER_NAME }}
REACT_APP_FILES_UUID_VERIFIER_NAME: 'chainsafe-uuid-testnet'
REACT_APP_TEST: 'true'
REACT_APP_STRIPE_PK: ${{secrets.GH_REACT_APP_STRIPE_PK}}
DEBUG: '@cypress/github-action'
with:
start: yarn start:files-ui
# wait for 10min for the server to be ready
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test-storage-on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_dispatch]
jobs:
cypress-run:
runs-on: ubuntu-latest
container: cypress/browsers:node14.17.0-chrome91-ff89
container: cypress/browsers:node14.17.6-chrome100-ff98
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -18,11 +18,13 @@ jobs:
key: ${{ runner.os }}-node_modules-build-storage-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
- name: Install and show git version
run: apt-get -y install git && git --version
id: git-install
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v4
env:
REACT_APP_BLOCKNATIVE_ID: ${{ secrets.GH_REACT_APP_BLOCKNATIVE_ID }}
REACT_APP_FILES_VERIFIER_NAME: ${{ secrets.GH_REACT_APP_FILES_VERIFIER_NAME }}
Expand Down Expand Up @@ -52,6 +54,7 @@ jobs:

- name: Slack Notification
uses: rtCamp/[email protected]
if: always()
env:
SLACK_TITLE: 'Storage UI Test Suite On-Demand Result:'
SLACK_MESSAGE: ${{ job.status }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test-storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
cypress-run:
runs-on: ubuntu-latest
container: cypress/browsers:node14.17.0-chrome91-ff89
container: cypress/browsers:node14.17.6-chrome100-ff98
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -27,11 +27,13 @@ jobs:
key: ${{ runner.os }}-node_modules-build-storage-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
- name: Install and show git version
run: apt-get -y install git && git --version
id: git-install
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v4
env:
REACT_APP_BLOCKNATIVE_ID: ${{ secrets.GH_REACT_APP_BLOCKNATIVE_ID }}
REACT_APP_FILES_VERIFIER_NAME: ${{ secrets.GH_REACT_APP_FILES_VERIFIER_NAME }}
Expand Down
71 changes: 32 additions & 39 deletions packages/common-components/src/Breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { Fragment, useMemo } from "react"
import React, { Fragment, ReactNode, useMemo } from "react"
import clsx from "clsx"
import { ITheme, makeStyles, createStyles } from "@chainsafe/common-theme"
import { HomeIcon } from "../Icons"
import { Typography } from "../Typography"
import { MenuDropdown } from "../MenuDropdown"

Expand All @@ -16,10 +15,10 @@ export type Crumb = {

export type BreadcrumbProps = {
crumbs?: Crumb[]
homeOnClick?: () => void
hideHome?: boolean
homeRef?: React.Ref<HTMLDivElement>
homeActive?: boolean
onRootClick?: () => void
rootRef?: React.Ref<HTMLDivElement>
rootActive?: boolean
rootIcon: ReactNode
className?: string
showDropDown?: boolean
maximumCrumbs?: number
Expand All @@ -41,19 +40,6 @@ const useStyles = makeStyles(
},
...overrides?.Breadcrumb?.root
},
home: {
height: 16,
width: "fit-content",
margin: "3px 0",
"& > svg": {
display: "block",
height: "100%"
},
"&.clickable": {
cursor: "pointer"
},
...overrides?.Breadcrumb?.home
},
separator: {
width: 1,
margin: `0 ${constants.generalUnit}px`,
Expand Down Expand Up @@ -106,7 +92,20 @@ const useStyles = makeStyles(
padding: `0 ${constants.generalUnit * 0.5}px`,
"&.active": {
borderColor: palette.primary.main
}
},
width: "fit-content",
margin: "3px 0",
"& svg": {
display: "block",
height: "100%",
"& path": {
fill: palette.additional["gray"][9]
}
},
"&.clickable": {
cursor: "pointer"
},
...overrides?.Breadcrumb?.home
},
fullWidth: {
width: "100%"
Expand Down Expand Up @@ -136,11 +135,10 @@ const CrumbComponent = ({ crumb }: {crumb: Crumb}) => {

const Breadcrumb = ({
crumbs = [],
homeOnClick,
hideHome,
homeRef,
homeActive,
className,
onRootClick,
rootRef,
rootActive,
rootIcon,
showDropDown,
maximumCrumbs
}: BreadcrumbProps) => {
Expand Down Expand Up @@ -194,20 +192,15 @@ const Breadcrumb = ({
}

return (
<div className={clsx(classes.root, className)}>
{!hideHome && <>
<div
ref={homeRef}
className={clsx(classes.wrapper, homeActive && "active")}
>
<HomeIcon
className={clsx(classes.home, homeOnClick && "clickable")}
onClick={() => homeOnClick && homeOnClick()}
/>
</div>
{!!crumbs.length && <div className={clsx(classes.separator)} />}
</>
}
<div className={classes.root}>
<div
ref={rootRef}
className={clsx(classes.wrapper, rootActive && "active", onRootClick && "clickable")}
onClick={() => onRootClick && onRootClick()}
>
{rootIcon}
</div>
{!!crumbs.length && <div className={clsx(classes.separator)} />}
{generateCrumbs()}
</div>
)
Expand Down
2 changes: 2 additions & 0 deletions packages/common-components/src/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const Dialog: React.FC<IDialogProps> = ({
onClick={() => reject()}
variant="dashed"
size="medium"
testId={`reject-${testId}`}
{...rejectButtonProps}
>
{rejectText}
Expand All @@ -92,6 +93,7 @@ const Dialog: React.FC<IDialogProps> = ({
onClick={() => accept()}
variant="primary"
size="medium"
testId={`confirm-${testId}`}
{...acceptButtonProps}
>
{acceptText}
Expand Down
Loading

0 comments on commit be2f59c

Please sign in to comment.