瀏覽代碼

remove snapshot

namnguyen 10 月之前
父節點
當前提交
ec2dc88cbe
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      frontend/taipy-gui/src/components/Taipy/Chart.spec.tsx

+ 3 - 2
frontend/taipy-gui/src/components/Taipy/Chart.spec.tsx

@@ -268,7 +268,7 @@ describe("Chart Component", () => {
 
     it("Chart renders correctly", () => {
         const figure = [{data: [], layout: {title: "Mock Title"}}];
-        const {asFragment} = render(
+        const {getByTestId} = render(
             <Chart
                 id="table"
                 updateVarName="data_var"
@@ -276,9 +276,10 @@ describe("Chart Component", () => {
                 defaultConfig={chartConfig}
                 updateVars="varname=varname"
                 figure={figure}
+                testId="chart"
             />
         );
-        expect(asFragment()).toMatchSnapshot();
+        expect(getByTestId("chart")).toBeInTheDocument();
     });
 
     it("handles plotConfig prop correctly", () => {