Skip to content

Commit ce00c57

Browse files
committed
test fixes
1 parent aae0d41 commit ce00c57

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

test/plugin.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import {
99
import { Arc, ArcConfig, PluginData, Plugin, Plugins } from "../src";
1010

1111
const arcConfig = new ArcConfig("private");
12+
const pluginId =
13+
"0x3687cd051fa5d1da87b25fe33a68bedfbe70f57a781336b48392e4b0fa93f4ce";
1214

1315
describe("Plugin component ", () => {
1416
afterEach(() => cleanup());
1517

1618
it("Shows plugin name", async () => {
17-
const pluginId =
18-
"0x3687cd051fa5d1da87b25fe33a68bedfbe70f57a781336b48392e4b0fa93f4ce";
1919
const { container } = render(
2020
<Arc config={arcConfig}>
2121
<Plugin id={pluginId}>
@@ -57,10 +57,10 @@ describe("Plugin List", () => {
5757
const { findAllByText, queryAllByTestId, findByText } = render(
5858
<PluginList />
5959
);
60-
await waitFor(() => findByText(/Plugin id:/), {
60+
await waitForElementToBeRemoved(() => queryAllByTestId("default-loader"), {
6161
timeout: 20000,
6262
});
63-
await waitForElementToBeRemoved(() => queryAllByTestId("default-loader"), {
63+
await waitFor(() => findByText(`Plugin id: ${pluginId}`), {
6464
timeout: 20000,
6565
});
6666
const plugins = await findAllByText(/Plugin id:/);

test/proposal.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ describe("Proposal List", () => {
6565
const { findAllByText, queryAllByTestId, findByText } = render(
6666
<ProposalList />
6767
);
68-
await waitFor(() => findByText(/Proposal id/), {
68+
await waitForElementToBeRemoved(() => queryAllByTestId("default-loader"), {
6969
timeout: 8000,
7070
});
71-
await waitForElementToBeRemoved(() => queryAllByTestId("default-loader"), {
71+
await waitFor(() => findByText(`Proposal id: ${proposalId}`), {
7272
timeout: 8000,
7373
});
7474
const proposals = await findAllByText(/Proposal id:/);

0 commit comments

Comments
 (0)