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

SIM-Fix frontend e2e tests #264

Closed
bradleySuira opened this issue Jul 10, 2024 · 0 comments · Fixed by #271
Closed

SIM-Fix frontend e2e tests #264

bradleySuira opened this issue Jul 10, 2024 · 0 comments · Fixed by #271
Assignees

Comments

@bradleySuira
Copy link
Contributor

The first time the e2e tests run, 6 of them fail. The next time they succeed:

ℹ tests 23
ℹ suites 6
ℹ pass 17
ℹ fail 6
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 0.25225

✖ failing tests:

✖ should call get_storage state (31002.615ms)
  TimeoutError: Waiting for element to be located By(xpath, //button[text()='get_storage'])
  Wait timed out after 30806ms
      at /Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:911:22
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    remoteStacktrace: ''
  }

✖ should call update_storage() method (10171.555583ms)
  NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":"//option[@value='update_storage']"}
    (Session info: chrome=126.0.6478.127)
      at Object.throwDecodedError (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/error.js:521:15)
      at parseHttpResponse (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/http.js:514:13)
      at Executor.execute (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/http.js:446:28)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Driver.execute (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:740:17)
      at async toWireValue (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:146:15)
      at async /Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:192:16
      at async forEachKey (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:186:9)
      at async convertKeys (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:191:3)
      at async Driver.execute (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:738:22)
      at TestContext.<anonymous> (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/test/e2e/ContractExampleStorage.spec.ts:116:5)
      at async Test.run (node:internal/test_runner/test:574:9)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:318:7) {
    remoteStacktrace: '0   chromedriver                        0x0000000102f46a80 chromedriver + 4385408\n1   chromedriver                        0x0000000102f3f38c chromedriver + 4354956\n2   chromedriver                        0x0000000102b5cb0c chromedriver + 281356\n3   chromedriver                        0x0000000102b9f2f8 chromedriver + 553720\n4   chromedriver                        0x0000000102b95734 chromedriver + 513844\n5   chromedriver                        0x0000000102bd7d24 chromedriver + 785700\n6   chromedriver                        0x0000000102b93eec chromedriver + 507628\n7   chromedriver                        0x0000000102b948c4 chromedriver + 510148\n8   chromedriver                        0x0000000102f0e43c chromedriver + 4154428\n9   chromedriver                        0x0000000102f12ea0 chromedriver + 4173472\n10  chromedriver                        0x0000000102ef3ff8 chromedriver + 4046840\n11  chromedriver                        0x0000000102f1378c chromedriver + 4175756\n12  chromedriver                        0x0000000102ee6fb8 chromedriver + 3993528\n13  chromedriver                        0x0000000102f3121c chromedriver + 4297244\n14  chromedriver                        0x0000000102f31398 chromedriver + 4297624\n15  chromedriver                        0x0000000102f3ef84 chromedriver + 4353924\n16  libsystem_pthread.dylib             0x0000000188c36034 _pthread_start + 136\n17  libsystem_pthread.dylib             0x0000000188c30e3c thread_start + 8\n'
  }

✖ should call get_have_coin state (30627.0305ms)
  TimeoutError: Waiting for element to be located By(xpath, //button[text()='get_have_coin'])
  Wait timed out after 30580ms
      at /Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:911:22
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    remoteStacktrace: ''
  }

✖ should call ask_for_coin() method (10225.492917ms)
  NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":"//option[@value='ask_for_coin']"}
    (Session info: chrome=126.0.6478.127)
      at Object.throwDecodedError (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/error.js:521:15)
      at parseHttpResponse (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/http.js:514:13)
      at Executor.execute (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/http.js:446:28)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Driver.execute (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:740:17)
      at async toWireValue (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:146:15)
      at async /Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:192:16
      at async forEachKey (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:186:9)
      at async convertKeys (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:191:3)
      at async Driver.execute (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/node_modules/selenium-webdriver/lib/webdriver.js:738:22)
      at TestContext.<anonymous> (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/test/e2e/ContractExampleWizardOfCoin.spec.ts:102:5)
      at async Test.run (node:internal/test_runner/test:574:9)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:318:7) {
    remoteStacktrace: '0   chromedriver                        0x00000001045e2a80 chromedriver + 4385408\n1   chromedriver                        0x00000001045db38c chromedriver + 4354956\n2   chromedriver                        0x00000001041f8b0c chromedriver + 281356\n3   chromedriver                        0x000000010423b2f8 chromedriver + 553720\n4   chromedriver                        0x0000000104231734 chromedriver + 513844\n5   chromedriver                        0x0000000104273d24 chromedriver + 785700\n6   chromedriver                        0x000000010422feec chromedriver + 507628\n7   chromedriver                        0x00000001042308c4 chromedriver + 510148\n8   chromedriver                        0x00000001045aa43c chromedriver + 4154428\n9   chromedriver                        0x00000001045aeea0 chromedriver + 4173472\n10  chromedriver                        0x000000010458fff8 chromedriver + 4046840\n11  chromedriver                        0x00000001045af78c chromedriver + 4175756\n12  chromedriver                        0x0000000104582fb8 chromedriver + 3993528\n13  chromedriver                        0x00000001045cd21c chromedriver + 4297244\n14  chromedriver                        0x00000001045cd398 chromedriver + 4297624\n15  chromedriver                        0x00000001045daf84 chromedriver + 4353924\n16  libsystem_pthread.dylib             0x0000000188c36034 _pthread_start + 136\n17  libsystem_pthread.dylib             0x0000000188c30e3c thread_start + 8\n'
  }

✖ should create a new validator (22832.7385ms)
  AssertionError: number of validators should be greather than old validators list: expected +0 to be above +0
      at TestContext.<anonymous> (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/test/e2e/CreateNodeValidator.spec.ts:39:10)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Test.run (node:internal/test_runner/test:574:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:810:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:318:7) {
    actual: 0,
    expected: 0,
    showDiff: true,
    operator: 'strictEqual'
  }

✖ should delete an existing validator (2154.417625ms)
  AssertionError: validators length should be less than initial validators length: expected 1 to be below 1
      at TestContext.<anonymous> (/Users/cristiamdasilva/ggenlayer/genlayer-simulator/frontend/test/e2e/DeleteNodeValidator.spec.ts:60:10)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Test.run (node:internal/test_runner/test:574:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:810:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:318:7) {
    actual: 1,
    expected: 1,
    showDiff: true,
    operator: 'strictEqual'
  }
@bradleySuira bradleySuira self-assigned this Jul 10, 2024
@bradleySuira bradleySuira linked a pull request Jul 11, 2024 that will close this issue
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 a pull request may close this issue.

2 participants