Skip to content

Commit

Permalink
Merge pull request #2464 from bcgov/test
Browse files Browse the repository at this point in the history
Test to master
  • Loading branch information
devinleighsmith authored Nov 24, 2022
2 parents 6ee6735 + da9d3a1 commit 5fcbbbb
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 18 deletions.
4 changes: 2 additions & 2 deletions source/backend/api/Pims.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<UserSecretsId>0ef6255f-9ea0-49ec-8c65-c172304b4926</UserSecretsId>
<Version>3.0.0-40.31</Version>
<Version>3.0.0-40.31</Version>
<Version>3.0.0-40.34</Version>
<Version>3.0.0-40.34</Version>
<AssemblyVersion>3.0.0.40</AssemblyVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProjectGuid>16BC0468-78F6-4C91-87DA-7403C919E646</ProjectGuid>
Expand Down
2 changes: 1 addition & 1 deletion source/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "3.0.0-40.31",
"version": "3.0.0-40.34",
"private": true,
"dependencies": {
"@bcgov/bc-sans": "1.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export const DocumentFilterForm = (props: IDocumentFilterFormProps) => {
<ColButtons xl="auto">
<Row>
<Col xs="auto" className="pr-0">
<SearchButton disabled={formikProps.isSubmitting} />
<SearchButton
onClick={() => formikProps.handleSubmit()}
type="button"
disabled={formikProps.isSubmitting}
/>
</Col>
<Col xs="auto">
<ResetButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ exports[`DocumentFilterForm component renders as expected 1`] = `
data-testid="search"
id="search-button"
title="search"
type="submit"
type="button"
>
<div
class="Button__icon"
Expand Down Expand Up @@ -677,7 +677,7 @@ exports[`DocumentFilterForm component renders with data as expected 1`] = `
data-testid="search"
id="search-button"
title="search"
type="submit"
type="button"
>
<div
class="Button__icon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ exports[`Document List View renders as expected 1`] = `
data-testid="search"
id="search-button"
title="search"
type="submit"
type="button"
>
<div
class="Button__icon"
Expand Down Expand Up @@ -1413,7 +1413,7 @@ exports[`Document List View renders as expected 2`] = `
data-testid="search"
id="search-button"
title="search"
type="submit"
type="button"
>
<div
class="Button__icon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ exports[`Lease Documents Page renders as expected 1`] = `
data-testid="search"
id="search-button"
title="search"
type="submit"
type="button"
>
<div
class="Button__icon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export const MotiInventoryHeader: React.FunctionComponent<IMotiInventoryHeaderPr
}

const isLoading =
props.composedProperty.ltsaWrapper?.loading || props.composedProperty.apiWrapper?.loading;
props.composedProperty.ltsaWrapper?.loading ||
props.composedProperty.apiWrapper?.loading ||
props.composedProperty.parcelMapWrapper?.loading;
return (
<>
<LoadingBackdrop show={isLoading} parentScreen={true} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ exports[`ActivityForm test Renders as expected 1`] = `
data-testid="search"
id="search-button"
title="search"
type="submit"
type="button"
>
<div
class="Button__icon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ exports[`ActivityView test Renders as expected 1`] = `
data-testid="search"
id="search-button"
title="search"
type="submit"
type="button"
>
<div
class="Button__icon"
Expand Down
2 changes: 1 addition & 1 deletion source/frontend/src/hooks/pims-api/useApiRequestWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const useApiRequestWrapper = <
onSuccess && onSuccess(response);
return response;
} catch (e) {
if (!axios.isAxiosError(e)) {
if (!axios.isAxiosError(e) && throwError) {
throw e;
}
if (!isMounted()) {
Expand Down
13 changes: 8 additions & 5 deletions source/frontend/src/hooks/useComposedProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const useComposedProperties = ({
parcelMapFullyAttributed.name,
);
const { getSummaryWrapper } = useBcAssessmentLayer(bcAssessment.url, bcAssessment.names);
const retrievedPid = getApiPropertyWrapper?.response?.pid?.toString();
const retrievedPid = getApiPropertyWrapper?.response?.pid?.toString() ?? pid?.toString();
const retrievedPin = getApiPropertyWrapper?.response?.pin?.toString();

const typeCheckWrapper = useDeepCompareCallback(
Expand Down Expand Up @@ -74,11 +74,14 @@ export const useComposedProperties = ({
const executeBcAssessmentSummary = getSummaryWrapper.execute;

useEffect(() => {
if (!!retrievedPid) {
typeCheckWrapper(() => executeGetLtsa(retrievedPid), PROPERTY_TYPES.LTSA);
typeCheckWrapper(() => findByPid(retrievedPid), PROPERTY_TYPES.PARCEL_MAP);
if (retrievedPid !== undefined) {
typeCheckWrapper(() => executeGetLtsa(retrievedPid ?? ''), PROPERTY_TYPES.LTSA);
typeCheckWrapper(
() => executeBcAssessmentSummary(retrievedPid),
() => findByPid((retrievedPid ?? '').padStart(9, '0'), true),
PROPERTY_TYPES.PARCEL_MAP,
);
typeCheckWrapper(
() => executeBcAssessmentSummary(retrievedPid ?? ''),
PROPERTY_TYPES.BC_ASSESSMENT,
);
} else if (!!retrievedPin) {
Expand Down

0 comments on commit 5fcbbbb

Please sign in to comment.