Skip to content

Commit

Permalink
Remove flaky snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpjones committed Mar 25, 2024
1 parent bf69c3b commit d2b90ba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 232 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ describe('ImageFileUpload', () => {
'src',
expect.stringMatching('^blob:')
);
expect(baseElement).toMatchSnapshot();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,234 +375,3 @@ exports[`ImageFileUpload > should render correctly 1`] = `
</div>
</body>
`;

exports[`ImageFileUpload > should render the preview when a file is selected 1`] = `
<body>
<div>
<div
class="p-fileupload p-fileupload-advanced p-component uic-img-upload uic-img-upload--advanced uic-img-upload--preview"
data-pc-name="fileupload"
data-pc-section="root"
>
<input
accept="image/*"
data-pc-section="input"
disabled=""
type="file"
/>
<div
class="p-fileupload-buttonbar uic-img-upload__btnbar uic-img-upload__btnbar--preview"
data-pc-section="buttonbar"
>
<span
class="p-button p-component p-fileupload-choose uic-img-upload__choose-btn"
data-pc-section="choosebutton"
data-testid="img-upload-choose-btn"
tabindex="0"
>
<i
class="pi pi-upload"
/>
<span
class="p-button-label uic-img-upload__choose-btn-label"
data-pc-section="choosebuttonlabel"
>
Upload
</span>
</span>
<button
aria-label="Upload"
class="p-button p-component uic-img-upload__upload-btn"
data-pc-name="button"
data-pc-section="uploadbutton"
type="button"
>
<svg
aria-hidden="true"
class="p-icon p-button-icon p-button-icon-left"
data-pc-section="uploadbuttonicon"
fill="none"
height="14"
viewBox="0 0 14 14"
width="14"
xmlns="http://www.w3.org/2000/svg"
>
<g
clipPath="url(#pv_icon_clip_pv_id_2)"
>
<path
clip-rule="evenodd"
d="M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z"
fill="currentColor"
fill-rule="evenodd"
/>
</g>
<defs>
<clippath
id="pv_icon_clip_pv_id_2"
>
<rect
fill="white"
height="14"
width="14"
/>
</clippath>
</defs>
</svg>
<span
class="p-button-label"
data-pc-section="label"
>
Upload
</span>
<!---->
</button>
<button
aria-label="Cancel"
class="p-button p-component uic-img-upload__cancel-btn"
data-pc-name="button"
data-pc-section="cancelbutton"
type="button"
>
<i
class="pi pi-trash"
/>
<span
class="p-button-label uic-img-upload__label sr-only"
data-pc-section="label"
>
Cancel
</span>
<!---->
</button>
</div>
<div
class="p-fileupload-content uic-img-upload__content"
data-p-highlight="false"
data-pc-section="content"
data-testid="img-upload-dropzone"
>
<div
aria-valuemax="100"
aria-valuemin="0"
class="p-progressbar p-component p-progressbar-determinate"
data-pc-name="progressbar"
data-pc-section="root"
role="progressbar"
>
<div
class="p-progressbar-value p-progressbar-value-animate"
data-pc-section="value"
style="display: flex;"
>
<!---->
</div>
<!---->
</div>
<div
class="p-fileupload-file uic-img-upload__file"
data-pc-section="file"
>
<img
alt="chucknorris.png"
class="p-fileupload-file-thumbnail"
data-pc-section="thumbnail"
role="presentation"
src="blob:nodedata:5618215f-97fe-4626-b2a0-6757850a4a68"
width="50"
/>
<div
class="p-fileupload-file-details"
data-pc-section="details"
>
<div
class="p-fileupload-file-name uic-img-upload__filename"
data-pc-section="filename"
>
chucknorris.png
</div>
<span
class="p-fileupload-file-size uic-img-upload__filesize"
data-pc-section="filesize"
>
12 B
</span>
<span
class="p-badge p-component p-badge-warning uic-img-upload__badge p-fileupload-file-badge"
data-pc-name="badge"
data-pc-section="root"
>
Pending
</span>
</div>
<div
class="p-fileupload-file-actions"
data-pc-section="actions"
>
<button
class="p-button p-component p-button-icon-only p-button-danger p-button-rounded p-button-text uic-img-upload__remove-btn p-fileupload-file-remove"
data-pc-name="button"
data-pc-section="root"
data-pc-severity="danger"
type="button"
>
<svg
aria-hidden="true"
class="p-icon p-button-icon"
fill="none"
height="14"
viewBox="0 0 14 14"
width="14"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z"
fill="currentColor"
/>
</svg>
<span
class="p-button-label"
data-pc-section="label"
>
 
</span>
<!---->
</button>
</div>
</div>
<!---->
</div>
</div>
</div>
</body>
`;

0 comments on commit d2b90ba

Please sign in to comment.