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

fix: swaps test and others #4726

Merged
merged 1 commit into from
Dec 19, 2023
Merged

fix: swaps test and others #4726

merged 1 commit into from
Dec 19, 2023

Conversation

fbwoolf
Copy link
Contributor

@fbwoolf fbwoolf commented Dec 19, 2023

Try out this version of Leather — Extension build, Test report

This PR changes to test swaps on mainnet bc we hide swaps on testnet. The broadcast is caught and aborted, so it should be ok. I also just did some clean up of the locators and handled if there happens to be a pending tx (which means we needed to catch the Hiro api post route).

@fbwoolf fbwoolf linked an issue Dec 19, 2023 that may be closed by this pull request
@@ -53,6 +53,7 @@ test.describe('Transaction signing', () => {
const multiSignatureTxHex = await generateMultisigUnsignedStxTransfer(
TEST_ACCOUNT_2_STX_ADDRESS,
amount,
100,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was failing bc the high fee warning popup was being triggered w/out a fee provided.

@@ -31,6 +24,14 @@ test.describe('Transaction signing', () => {
test('that it validates against insufficient funds when performing a contract call', async ({
context,
}) => {
const accountsPage = await context.waitForEvent('page');
await accountsPage.locator('text="Account 2"').click();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Account 1 in the test account doesn't have a 0 balance atm so this was failing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we fill it up instead of making this change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem was Account 1 has funds so clicking on Account 2 which doesn't solves it

@fbwoolf fbwoolf changed the title fix: swaps test fix: swaps test and others Dec 19, 2023
@fbwoolf
Copy link
Contributor Author

fbwoolf commented Dec 19, 2023

Fixed a few other failing tests here.

Copy link
Collaborator

@kyranjamie kyranjamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great investigation @fbwoolf, thanks

@@ -1,12 +1,12 @@
import { test } from '../../fixtures/fixtures';

const alexSdkPostRoute = 'https://*.alexlab.co/v1/graphql';
const hiroApiPostRoute = '*/**/v2/transactions';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also possible to be specific to Hiro api origin, too?

@@ -31,6 +24,14 @@ test.describe('Transaction signing', () => {
test('that it validates against insufficient funds when performing a contract call', async ({
context,
}) => {
const accountsPage = await context.waitForEvent('page');
await accountsPage.locator('text="Account 2"').click();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we fill it up instead of making this change?

Copy link
Contributor

@pete-watters pete-watters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @fbwoolf 👍

I think we need to look into how we can better block merge of PRs with failing tests to stop this happening. It seems this PR introduced these fails

I see some suggestions from Kyran that could be good to add but I will merge this now and we can iterate on it if needed

@pete-watters pete-watters added this pull request to the merge queue Dec 19, 2023
Merged via the queue into dev with commit faae457 Dec 19, 2023
26 checks passed
@pete-watters pete-watters deleted the fix/swaps-test branch December 19, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix testnet swaps tests
3 participants