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

feat(e2e-connector-test): add fuel wallet tests #199

Merged
merged 15 commits into from
Aug 26, 2024

Conversation

nelitow
Copy link
Contributor

@nelitow nelitow commented Aug 22, 2024

This PR creates tests for the Fuel Wallet connector in the react-app.
The tests are for transferring, incrementing and connection stability.

Copy link

vercel bot commented Aug 22, 2024

@nelitow is attempting to deploy a commit to the Fuel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@nelitow nelitow changed the title Nj/feat/test fuel wallet connector feat(e2e-connector-test): add fuel wallet tests Aug 22, 2024
Copy link
Contributor

@LuizAsFight LuizAsFight left a comment

Choose a reason for hiding this comment

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

use this folder structure to separate logic of connectors from general logic

react-app
  connectors
    FuelWalletConnector
      FuelWalletConnector.test.ts
      setup.ts
      // .... any other file with specific logic from this connector
  utils
    // generic util files

Copy link
Contributor

@LuizAsFight LuizAsFight left a comment

Choose a reason for hiding this comment

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

in the setup.ts file

the part 1 you can keep in this file as its generic test commands
the part 2 it's better to execute directly inside of each connector test, as it is specific for each connector and will change

image

import { bn, toBech32 } from 'fuels';
import { testSetup } from '../utils/index.js';
import { type WalletUnlocked, bn } from 'fuels';
import { testSetup, transferMaxBalance } from '../utils/index.js';
import { connect } from './utils';

const fuelPathToExtension = await downloadFuel('0.21.0');
Copy link
Contributor

Choose a reason for hiding this comment

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

download the latest version always, 0.27.0 is being released right now you can use it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, but maybe a latest tag could be useful in the downloadFuel helper.

@LuizAsFight LuizAsFight marked this pull request as ready for review August 26, 2024 03:05
@LuizAsFight LuizAsFight merged commit e02834a into FuelLabs:main Aug 26, 2024
8 of 9 checks passed
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.

Create e2e test for FuelWalletConnector on Examples/React app
2 participants