diff --git a/src/main/webui/src/app/components/content/addons/Cache.test.jsx b/src/main/webui/src/app/components/content/addons/Cache.test.jsx new file mode 100644 index 0000000..c57fb84 --- /dev/null +++ b/src/main/webui/src/app/components/content/addons/Cache.test.jsx @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2023 Red Hat, Inc. (https://github.com/Commonjava/indy-ui-service) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from "react"; +import {render, screen, cleanup} from '@testing-library/react'; +import '@testing-library/jest-dom'; +import fetchMock from "fetch-mock"; +import Cache from "./Cache.jsx"; + +beforeEach(()=>{ + fetchMock.restore(); +}); + +afterEach(() => { + cleanup(); +}); + +describe('RemoteList tests', () => { + it("Verify Cache", ()=>{ + render(); + expect(screen.getByRole("textbox", {Name: "Input the the metadata url"})).toBeInTheDocument(); + expect(screen.getByRole("button", {Name: "Delete"})).toBeInTheDocument(); + }); +});