Closed rabi-siddique closed 3 months ago
Looks like lint is failing, maybe adding an eslintrc like https://github.com/frazarshad/dapp-psm/blob/79bb3102a476b00ca685b75087dd54b659426e60/tests/e2e/.eslintrc.cjs should do the trick?
@samsiegart Thanks for pointing it out. I've addressed the linting issue. I had to add some eslint-specific dependencies and make code changes around that. Turns out, in dapp-psm
, there weren't many linting issues because linter is applied to the src
folder only and as a result, it never gets applied to the tests
folder there. In dapp-inter
, our linter isn't restricted to the src
folder.
We're close now, lint is passing but yarn test
is failing:
⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL test/e2e/specs/test.spec.js [ test/e2e/specs/test.spec.js ]
ReferenceError: describe is not defined
❯ test/e2e/specs/test.spec.js:2:1
1| /* eslint-disable ui-testing/no-disabled-tests */
2| describe('Vaults UI Test Cases', () => {
| ^
3| context('Test commands', () => {
4| let collateralizationRatio;
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed | 1 passed (2)
Tests 16 passed (16)
I think we can solve this by ignoring the e2e tests in vitest.config.ts
like: https://github.com/Agoric/dapp-psm/pull/125/commits/fff09f5e6106907a06f8d357e666217776997199
We're close now, lint is passing but
yarn test
is failing:⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL test/e2e/specs/test.spec.js [ test/e2e/specs/test.spec.js ] ReferenceError: describe is not defined ❯ test/e2e/specs/test.spec.js:2:1 1| /* eslint-disable ui-testing/no-disabled-tests */ 2| describe('Vaults UI Test Cases', () => { | ^ 3| context('Test commands', () => { 4| let collateralizationRatio; ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ Test Files 1 failed | 1 passed (2) Tests 16 passed (16)
I think we can solve this by ignoring the e2e tests in
vitest.config.ts
like: Agoric/dapp-psm@fff09f5
@samsiegart Addressed. Thanks for the assistance. :)
The PR adds end-to-end test cases for: