diff --git a/.eslintrc.json b/.eslintrc.json index 274e73d453..d046b33919 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,7 +7,7 @@ "jsx": true // Allows for the parsing of JSX } }, - "plugins": ["@typescript-eslint", "cypress", "ternary"], + "plugins": ["@typescript-eslint", "cypress", "no-only-tests", "ternary"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", @@ -24,7 +24,8 @@ }, "rules": { "comma-spacing": ["error", { "before": false, "after": true }], - "indent": ["error", 2], + "cypress/no-pause": "error", + "@typescript-eslint/indent": ["error", 2], "linebreak-style": ["error", "unix"], "quotes": ["error", "double"], "semi": ["error", "never"], @@ -46,6 +47,7 @@ "space-infix-ops": "error", "no-trailing-spaces": ["error", { "ignoreComments": true }], "comma-dangle": ["error", "never"], + "no-only-tests/no-only-tests": "error", "object-curly-spacing": ["error", "always"], "space-in-parens": ["error", "never"], "ternary/no-unreachable": "off", diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index d4e1e9790d..0d8b387518 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -1,3 +1,3 @@ "Type: Feature": ['feature/*', 'feat/*'] "Type: Bug Fix": fix/* -"Type: Maintenance": ['chore/*', 'mnt/*'] +"Type: Maintenance": ['chore/*', 'mnt/*', 'weblate*'] diff --git a/.github/workflows/test-storage.yml b/.github/workflows/test-storage.yml index 7fe3b2dc50..f03c0dc27e 100644 --- a/.github/workflows/test-storage.yml +++ b/.github/workflows/test-storage.yml @@ -11,7 +11,7 @@ on: jobs: cypress-run: runs-on: ubuntu-latest - container: cypress/browsers:node14.16.0-chrome90-ff88 + container: cypress/browsers:node14.17.0-chrome91-ff89 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/package.json b/package.json index b70fe61bd4..a62f07950c 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "chalk": "^4.1.0", "eslint": "^6.8.0", "eslint-plugin-cypress": "^2.11.3", + "eslint-plugin-no-only-tests": "^2.6.0", "eslint-plugin-react": "^7.22.0", "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-ternary": "^1.0.4", diff --git a/packages/common-components/src/Button/Button.tsx b/packages/common-components/src/Button/Button.tsx index 3717ec36d4..0900773aaf 100644 --- a/packages/common-components/src/Button/Button.tsx +++ b/packages/common-components/src/Button/Button.tsx @@ -7,7 +7,6 @@ import { Typography } from "../Typography" const useStyles = makeStyles( ({ constants, typography, animation, palette, overrides }: ITheme) => createStyles({ - // JSS in CSS goes here root: { ...typography.button, borderRadius: `${constants.generalUnit / 4}px`, @@ -110,6 +109,29 @@ const useStyles = makeStyles( }, ...overrides?.Button?.variants?.secondary?.root }, + tertiary: { + backgroundColor: palette.additional["gray"][3], + color: palette.common.black.main, + "& svg": { + fill: palette.common.white.main + }, + "&:hover": { + backgroundColor: palette.primary.main, + color: palette.common.white.main, + ...overrides?.Button?.variants?.tertiary?.hover + }, + "&:focus": { + backgroundColor: palette.primary.main, + color: palette.common.white.main, + ...overrides?.Button?.variants?.tertiary?.focus + }, + "&:active": { + backgroundColor: palette.primary.main, + color: palette.common.white.main, + ...overrides?.Button?.variants?.tertiary?.active + }, + ...overrides?.Button?.variants?.tertiary?.root + }, outline: { color: palette.additional["gray"][8], backgroundColor: palette.common?.white.main, @@ -271,7 +293,7 @@ interface IButtonProps extends Omit { className?: string children?: ReactNode | ReactNode[] fullsize?: boolean - variant?: "link" | "primary" | "secondary" | "outline" | "dashed" | "danger" + variant?: "link" | "primary" | "secondary" |"tertiary" | "outline" | "dashed" | "danger" iconButton?: boolean size?: "large" | "medium" | "small" type?: "button" | "submit" | "reset" diff --git a/packages/common-components/src/CheckboxInput/CheckboxInput.tsx b/packages/common-components/src/CheckboxInput/CheckboxInput.tsx index 94260664ed..7d508154fa 100644 --- a/packages/common-components/src/CheckboxInput/CheckboxInput.tsx +++ b/packages/common-components/src/CheckboxInput/CheckboxInput.tsx @@ -99,14 +99,14 @@ const useStyles = makeStyles( }) ) -interface ICheckboxProps - extends Omit, "value" | "label"> { +interface ICheckboxProps extends Omit, "value" | "label"> { className?: string label?: string | ReactNode error?: string value: boolean indeterminate?: boolean - onChange(event: FormEvent): void + onChange: (event: FormEvent) => void + testId?: string } const CheckboxInput: React.FC = ({ @@ -117,6 +117,7 @@ const CheckboxInput: React.FC = ({ indeterminate = false, value, error, + testId, ...props }) => { const classes = useStyles(props) @@ -126,7 +127,10 @@ const CheckboxInput: React.FC = ({ } return ( -