Skip to content

Commit

Permalink
fix: #3689 #3928 #3942 aml and dev portal fixes (#3945)
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcvay authored Apr 13, 2021
1 parent 746230e commit ef91689
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ exports[`Identification Identification should match snapshot when loading is fal
"_conditions": Array [],
"_deps": Array [],
"_exclusive": Object {
"isValidBase64": false,
"required": true,
},
"_mutate": undefined,
Expand All @@ -55,7 +54,6 @@ exports[`Identification Identification should match snapshot when loading is fal
},
"tests": Array [
[Function],
[Function],
],
"transforms": Array [
[Function],
Expand Down Expand Up @@ -114,7 +112,6 @@ exports[`Identification Identification should match snapshot when loading is tru
"_conditions": Array [],
"_deps": Array [],
"_exclusive": Object {
"isValidBase64": false,
"required": true,
},
"_mutate": undefined,
Expand All @@ -130,7 +127,6 @@ exports[`Identification Identification should match snapshot when loading is tru
},
"tests": Array [
[Function],
[Function],
],
"transforms": Array [
[Function],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import * as Yup from 'yup'
import formFields from './form-fields'
import errorMessages from '@/constants/error-messages'
import { isValidUploadForm } from '@/utils/validates'

const { documentIdField } = formFields

/* istanbul ignore next */
const validationSchema = Yup.object().shape({
[documentIdField.name]: Yup.string()
.required(errorMessages.FIELD_REQUIRED)
.test('isValidBase64', errorMessages.WRONG_FILE_TYPE, (value) => isValidUploadForm(value as string)),
[documentIdField.name]: Yup.string().required(errorMessages.FIELD_REQUIRED),
})

export default validationSchema
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const handleFilenameClick = (
setModalState: Dispatch<SetStateAction<ModalState>>,
) => async (e) => {
e.preventDefault()
console.log(values)
setModalState({ isLoading: true, isVisible: true, image: null })
const imageURL = await downloadDocument(values.documentId)
const image = imageURL ? imageURL : null
Expand Down Expand Up @@ -105,7 +104,6 @@ export const Identification: React.FC<IdentificationProps> = ({
inputProps={{ disabled: disabled }}
required
onFilenameClick={handleFilenameClick(values, setModalState)}
isNarrowWidth
accept="image/*"
/>
<div className="field pb-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,6 @@ exports[`AddressInformation should match snapshot 1`] = `
"_conditions": Array [],
"_deps": Array [],
"_exclusive": Object {
"isValidBase64": false,
"required": true,
},
"_mutate": undefined,
Expand All @@ -1402,7 +1401,6 @@ exports[`AddressInformation should match snapshot 1`] = `
},
"tests": Array [
[Function],
[Function],
],
"transforms": Array [
[Function],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as Yup from 'yup'
import errorMessages from '@/constants/error-messages'
import { isValidUploadForm } from '@/utils/validates'
import formFields from './form-fields'

const { FIELD_REQUIRED } = errorMessages
Expand All @@ -10,16 +9,12 @@ const secondaryAddressFields = formFields('secondaryAddress')
const validationSchema = Yup.object().shape({
metadata: Yup.object().shape({
primaryAddress: Yup.object().shape({
documentImage: Yup.string()
.required(FIELD_REQUIRED)
.test('isValidBase64', 'Wrong file type', (value) => isValidUploadForm(value as string)),
documentImage: Yup.string().required(FIELD_REQUIRED),
}),
secondaryAddress: Yup.object().shape({
documentImage: Yup.string().when([secondaryAddressFields.line1Field.name], {
is: (line1) => line1,
then: Yup.string()
.required(FIELD_REQUIRED)
.test('isValidBase64', 'Wrong file type', (value) => isValidUploadForm(value as string)),
then: Yup.string().required(FIELD_REQUIRED),
}),
}),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const initialProps = {
{ label: 'Fail', value: 'fail' },
{ label: 'Pending', value: 'pending' },
{ label: 'Cancelled', value: 'cancelled' },
{ label: 'Warnings', value: 'warnings' },
{ label: 'Unchecked', value: 'unchecked' },
],
}
Expand Down
2 changes: 1 addition & 1 deletion packages/aml-checklist/src/tests/badges/badge-lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export const columns = [
Header: 'Test Webhook',
accessor: 'test',
},
{
Header: 'Status',
accessor: 'active',
},
{
Header: 'Edit',
accessor: 'edit',
Expand Down Expand Up @@ -136,6 +140,7 @@ export const getTableTopicsData = ({
Ping
</a>
),
active: subscription.active ? 'Active' : 'Inactive',
edit: (
<Button
dataTest="edit-btn"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions packages/elements/src/styles/vendor/bulma-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ html {
}
}

.file-name {
max-width: 6em;
}

.file-input-container {
&.is-full-width {
max-width: 100%;
Expand Down

0 comments on commit ef91689

Please sign in to comment.