Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Message Test #49

Merged
merged 1 commit into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import org.hamcrest.Matcher
import java.util.concurrent.TimeoutException

object EspressoViewFinder {
private const val CHECK_INTERVAL = 50L
private const val TIMEOUT_MS = 15 * 1000L
private const val CHECK_INTERVAL = 150L
private const val TIMEOUT_MS = 30 * 1000L

/**
* Waits for the view referenced in [viewMatcher] to become visible, with a timeout of [timeOut]. If it
Expand Down
10 changes: 9 additions & 1 deletion example/src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,18 @@ test("can message a client", async () => {
const messages = await aliceConversation.messages();

if (messages.length !== 1) {
throw "No message";
throw Error("No message");
}

const message = messages[0];

return message.content === "hello world";
});

test("canMessage", async () => {
const bob = await XMTP.Client.createRandom("local");
const alice = await XMTP.Client.createRandom("local");

const canMessage = await bob.canMessage(alice.address);
return canMessage;
});