import { expect } from "e2e";
import { test, WEB } from "./t3.ts";

test("Imported native ACP conversation immediately shows its history", WEB, async ({t3,app,screen}) => {
 await t3.project("Garden");
 await t3.open();
 await screen.getByRole("button", "Add project").waitFor({state:"visible"});
 await app.open("/settings/providers?instanceId=nativeHistory");
 await screen.getByRole("button", "List sessions").tap();
 await screen.getByRole("button", "Import", {exact:true}).tap();
 await screen.getByRole("button", "Imported", {exact:true}).waitFor({state:"visible"});
 await app.open("/");
 await screen.getByText("Native conversation",{exact:true}).first().tap();
 await app.screenshot("imported-native-history");
 await expect(screen.getByText("Water the garden early in the morning, twice a week.",{exact:false})).toBeVisible();
});
