Open Jorge-Lopes opened 6 months ago
user1
docker exec e2e-agd-1 bash -c "yes | agd keys export --unsafe --unarmored-hex --keyring-backend=test user1"
I can confirm that the tests are running as expected in my machine as well. What I think can be improved in this process;
user1
and user2
private keys, maybe we can write a script that gets these values and write them to a file. Then consume these values from that file in the test spec. provision-user2
is I believe misleading maybe we can convert it to fund-user2
user2
and not checking user1
at all, have another script that checks the balances of user1
and user2
then fund them if necessaryNone of the above is necessary, just a mere improvement.
Feedback
I can confirm that the tests are running as expected in my machine as well. What I think can be improved in this process;
- Instead of manually getting the
user1
anduser2
private keys, maybe we can write a script that gets these values and write them to a file. Then consume these values from that file in the test spec.provision-user2
is I believe misleading maybe we can convert it tofund-user2
- Instead of statically funding
user2
and not checkinguser1
at all, have another script that checks the balances ofuser1
anduser2
then fund them if necessaryNone of the above is necessary, just a mere improvement.
Thank you for the feedback. The suggested improvements were implemented and the documentation above was updated accordingly.
Frameworks used
To build the e2e test the following frameworks were used
Guide to execute the e2e test locally:
Checkout to branch jorge/e2e-ci-workflow and change to
frontend
directoryRun container with latest a3p image
debug
mode (OPTIONAL)CI workflow
A github action was created to automate the execution of the UI e2e test when a commit is pushed. See the configuration file e2e.yml for more detail
Note: the event currently set to trigger the this action is susceptible to be updated in the future.
Test coverage
The testing coverage of the UI e2e test follows the same happy path has the one established on the smoke tests. As the following:
Note: the
equip
feature was not including because of the issue #10Problems and solutions
Connect to agoric localhost
The first challenge we faced was to set the
Agoric localhost
as theselectedChains
at the process of setup a wallet. If that was not successfully made, the KREAd app would not be able to work as intended. To solve this issue, a test is executed prior to setting up the wallet , should connect to Agoric local chain, which purpose is to provide the Agoric local chain configuration to theexperimentalSuggestChain
feature of the Keplr extension.Incorrect account sequence
While trying to build the test case should unequip Item we were facing a problem where the
Unequip
button was being pressed and the transaction being approved on the Keplr extension, but the offer result was not being returned and the state of the Items were kept the same.After trying different approaches, it came clear to use that we would need to wait until the transaction was processed and included in a block before proceding to the next item.
With this in mind, we built two function that allow us to retrieve the current block height getBlockHeight(), and a second function that would force to wait until a predefined number of blocks have been published before resuming the test checkBlockHeight().