Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13711364
D17967.id53596.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D17967.id53596.diff
View Options
diff --git a/cashtab/src/components/Etokens/__tests__/TokenActions.test.js b/cashtab/src/components/Etokens/__tests__/TokenActions.test.js
--- a/cashtab/src/components/Etokens/__tests__/TokenActions.test.js
+++ b/cashtab/src/components/Etokens/__tests__/TokenActions.test.js
@@ -253,9 +253,9 @@
const { tokenName } = slp1FixedMocks.token.genesisInfo;
// Wait for element to get token info and load
- expect(
- (await screen.findAllByText(new RegExp(tokenName)))[0],
- ).toBeInTheDocument();
+ expect(await screen.findAllByText(new RegExp(tokenName))).toHaveLength(
+ 3,
+ );
// Token image is rendered
expect(
@@ -263,13 +263,13 @@
).toBeInTheDocument();
// Token actions are available
- expect(screen.getByTitle('Token Actions')).toBeInTheDocument();
+ expect(await screen.findByTitle('Token Actions')).toBeInTheDocument();
// On load, default action for SLP is to list it
- expect(screen.getByTitle('Toggle Sell Token')).toBeEnabled();
+ expect(await screen.findByTitle('Toggle Sell Token')).toBeEnabled();
// The list button is disabled on load
- const listButton = screen.getByRole('button', {
+ const listButton = await screen.findByRole('button', {
name: /List Vespene Gas/,
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 11:46 (14 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5573440
Default Alt Text
D17967.id53596.diff (1 KB)
Attached To
D17967: [Cashtab] Improve flaky token test
Event Timeline
Log In to Comment