Giter Site home page Giter Site logo

Comments (12)

drptbl avatar drptbl commented on June 11, 2024 1

Hey @philpetrov,

You've shared your env var secrets including TELEGRAM_BOT_TOKEN and PWA_LOCAL_DEV_CHAT_ID.

I have edited your post and removed them.

However, please rotate your variables, otherwise someone else could use it maliciously in future.

Thanks,
Jakub.

from synpress.

duckception avatar duckception commented on June 11, 2024

Hey!

There are a bunch of different things that might be failing here. I'd recommend using or building on top of the docker image we have provided in the examples repo.

However, if you'd still like to try to debug this further, I'd check the screenshots and recordings that are produced after you run the tests. They might contain useful clues as to why the tests are failing πŸ•΅οΈβ€β™‚οΈ

from synpress.

jimxyz avatar jimxyz commented on June 11, 2024

UD spec -- should connect wallet with success (failed) (attempt 2)
UD spec -- should connect wallet with success (failed)

@duckception

ubuntu@ip-172-31-32-231:~/code/frontend-cypress$ docker-compose up
Creating network "frontend-cypress_default" with the default driver
Building frontend-cypress
Step 1/6 : FROM cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
 ---> 7840cba986fe
Step 2/6 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 4748e9ebf804
Step 3/6 : COPY package.json ./
 ---> Using cache
 ---> 1f146dbe433f
Step 4/6 : RUN npm install
 ---> Running in 90bd4f174858
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1156 packages, and audited 1157 packages in 2m

183 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (5 moderate, 3 high)

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
Removing intermediate container 90bd4f174858
 ---> bc2a9b735150
Step 5/6 : COPY . ./
 ---> 3ac8a8e3d36d
Step 6/6 : CMD ["npm", "run","synpress:run"]
 ---> Running in ec78b9f2f7c7
Removing intermediate container ec78b9f2f7c7
 ---> 34756e131a94

Successfully built 34756e131a94
Successfully tagged frontend-cypress_frontend-cypress:latest
WARNING: Image for service frontend-cypress was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating frontend-cypress_frontend-cypress_1 ... done
Attaching to frontend-cypress_frontend-cypress_1
frontend-cypress_1  | 
frontend-cypress_1  | > @synpress-io/synpress-in-docker-example@1.0.0 synpress:run
frontend-cypress_1  | > ./node_modules/.bin/synpress run --config baseUrl=https://98ba-157-245-206-214.ngrok-free.app/ --headless
frontend-cypress_1  | 
frontend-cypress_1  | [STARTED] Task without title.
frontend-cypress_1  | [SUCCESS] Task without title.
frontend-cypress_1  | libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
frontend-cypress_1  | 
frontend-cypress_1  | DevTools listening on ws://127.0.0.1:33929/devtools/browser/91a7b967-ec86-40b8-801f-3fad688ec0d6
frontend-cypress_1  | [399:0918/053822.973828:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
frontend-cypress_1  | 
frontend-cypress_1  | ====================================================================================================
frontend-cypress_1  | 
frontend-cypress_1  |   (Run Starting)
frontend-cypress_1  | 
frontend-cypress_1  |   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
frontend-cypress_1  |   β”‚ Cypress:        12.17.3                                                                        β”‚
frontend-cypress_1  |   β”‚ Browser:        Chrome 114                                                                     β”‚
frontend-cypress_1  |   β”‚ Node Version:   v18.16.0 (/usr/local/bin/node)                                                 β”‚
frontend-cypress_1  |   β”‚ Specs:          1 found (UD-spec.js)                                                           β”‚
frontend-cypress_1  |   β”‚ Searched:       tests/e2e/specs/**/*.{js,jsx,ts,tsx}                                           β”‚
frontend-cypress_1  |   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  | ────────────────────────────────────────────────────────────────────────────────────────────────────
frontend-cypress_1  |                                                                                                     
frontend-cypress_1  |   Running:  UD-spec.js                                                                      (1 of 1)
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  |   UD spec
frontend-cypress_1  |  WARNING: Warning: Middleware for RTK-Query API at reducerPath "api" has not been added to the store.
frontend-cypress_1  | Features like automatic cache collection, automatic refetching etc. will not be available. 
frontend-cypress_1  |  ERROR: Warning: Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.%s 
frontend-cypress_1  |     (Attempt 1 of 2) should connect wallet with success
frontend-cypress_1  |     1) should connect wallet with success
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  |   0 passing (2m)
frontend-cypress_1  |   1 failing
frontend-cypress_1  | 
frontend-cypress_1  |   1) UD spec
frontend-cypress_1  |        should connect wallet with success:
frontend-cypress_1  |      CypressError: `cy.task('importMetamaskAccount')` failed with the following error:
frontend-cypress_1  | 
frontend-cypress_1  | > page.waitForNavigation: Timeout 30000ms exceeded.
frontend-cypress_1  | =========================== logs ===========================
frontend-cypress_1  | waiting for navigation until "load"
frontend-cypress_1  | ============================================================
frontend-cypress_1  | 
frontend-cypress_1  | https://on.cypress.io/api/task
frontend-cypress_1  |       at <unknown> (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:151171:78)
frontend-cypress_1  |       at tryCatcher (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:18744:23)
frontend-cypress_1  |       at Promise._settlePromiseFromHandler (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16679:31)
frontend-cypress_1  |       at Promise._settlePromise (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16736:18)
frontend-cypress_1  |       at Promise._settlePromise0 (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16781:10)
frontend-cypress_1  |       at Promise._settlePromises (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16857:18)
frontend-cypress_1  |       at _drainQueueStep (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13451:12)
frontend-cypress_1  |       at _drainQueue (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13444:9)
frontend-cypress_1  |       at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13460:5)
frontend-cypress_1  |       at Async.drainQueues (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13330:14)
frontend-cypress_1  |   From Your Spec Code:
frontend-cypress_1  |       at Context.eval (webpack:///./support/commands.js:49:0)
frontend-cypress_1  |   
frontend-cypress_1  |   From Node.js Internals:
frontend-cypress_1  |     TimeoutError: page.waitForNavigation: Timeout 30000ms exceeded.
frontend-cypress_1  |     =========================== logs ===========================
frontend-cypress_1  |     waiting for navigation until "load"
frontend-cypress_1  |     ============================================================
frontend-cypress_1  |     page.waitForNavigation: Timeout 30000ms exceeded.
frontend-cypress_1  |     =========================== logs ===========================
frontend-cypress_1  |     waiting for navigation until "load"
frontend-cypress_1  |     ============================================================
frontend-cypress_1  |         at Object.waitAndClick (/usr/src/app/node_modules/@synthetixio/synpress/commands/playwright.js:228:16)
frontend-cypress_1  |         at async importAccount (/usr/src/app/node_modules/@synthetixio/synpress/commands/metamask.js:358:5)
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  |   (Results)
frontend-cypress_1  | 
frontend-cypress_1  |   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
frontend-cypress_1  |   β”‚ Tests:        1                                                                                β”‚
frontend-cypress_1  |   β”‚ Passing:      0                                                                                β”‚
frontend-cypress_1  |   β”‚ Failing:      1                                                                                β”‚
frontend-cypress_1  |   β”‚ Pending:      0                                                                                β”‚
frontend-cypress_1  |   β”‚ Skipped:      0                                                                                β”‚
frontend-cypress_1  |   β”‚ Screenshots:  2                                                                                β”‚
frontend-cypress_1  |   β”‚ Video:        true                                                                             β”‚
frontend-cypress_1  |   β”‚ Duration:     1 minute, 48 seconds                                                             β”‚
frontend-cypress_1  |   β”‚ Spec Ran:     UD-spec.js                                                                       β”‚
frontend-cypress_1  |   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  |   (Screenshots)
frontend-cypress_1  | 
frontend-cypress_1  |   -  /usr/src/app/tests/e2e/screenshots/UD-spec.js/UD spec -- should connect wallet w      (780x463)
frontend-cypress_1  |      ith success (failed).png                                                                       
frontend-cypress_1  |   -  /usr/src/app/tests/e2e/screenshots/UD-spec.js/UD spec -- should connect wallet w      (780x463)
frontend-cypress_1  |      ith success (failed) (attempt 2).png                                                           
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  |   (Video)
frontend-cypress_1  | 
frontend-cypress_1  |   -  Started compressing: Compressing to 32 CRF                                                     
frontend-cypress_1  |   -  Finished compressing: 10 seconds                                                
frontend-cypress_1  |     Compression progress:  100%
frontend-cypress_1  | 
frontend-cypress_1  |   -  Video output: /usr/src/app/tests/e2e/videos/UD-spec.js.mp4
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  | ====================================================================================================
frontend-cypress_1  | 
frontend-cypress_1  |   (Run Finished)
frontend-cypress_1  | 
frontend-cypress_1  | 
frontend-cypress_1  |        Spec                                              Tests  Passing  Failing  Pending  Skipped  
frontend-cypress_1  |   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
frontend-cypress_1  |   β”‚ βœ–  UD-spec.js                               01:48        1        -        1        -        - β”‚
frontend-cypress_1  |   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
frontend-cypress_1  |     βœ–  1 of 1 failed (100%)                     01:48        1        -        1        -        -  
frontend-cypress_1  | 
frontend-cypress_1  | Cypress run results: 1 total tests, 0 passed, 1 failed
frontend-cypress_frontend-cypress_1 exited with code 1
ubuntu@ip-172-31-32-231:~/code/frontend-cypress$ 

from synpress.

duckception avatar duckception commented on June 11, 2024

Can you provide a repository where I can reproduce this?

from synpress.

jimxyz avatar jimxyz commented on June 11, 2024
  1. The Repo

https://github.com/jimxyz/synpress-docker-demo

  1. The log run in docker

https://github.com/jimxyz/synpress-docker-demo/blob/master/run-in-docker.log

  1. The log run in local headless

https://github.com/jimxyz/synpress-docker-demo/blob/master/run-in-local-headless.log

@duckception

from synpress.

duckception avatar duckception commented on June 11, 2024

You're trying to run it headlessly in docker which is not supported. You'll have to remove the --headless flag when running in docker. The headless mode works only in the local environment. Let me know if this fixes the issue 🫑

from synpress.

jimxyz avatar jimxyz commented on June 11, 2024

Remove the --headless flag.But the errors still exist.

Here are the running logs
https://github.com/jimxyz/synpress-docker-demo/blob/master/run-in-docker.log

from synpress.

duckception avatar duckception commented on June 11, 2024

I suspect that xvfb is not running for some reason, but I cannot even run this docker image on my machine. I get the Browser: chrome was not found on your system or is not supported by Cypress. error. Either way, since you're running Synpress in standalone mode don't use Cypress docker image, instead use our setup as described here.

from synpress.

philpetrov avatar philpetrov commented on June 11, 2024

Hi! I Have the same problem Cypress 12.17.3 + Synpress ("@synthetixio/synpress": "^3.7.1",). When i start locally switchToMetamaskNotification method works, and test passed, but in the gitlub error:

CypressError: cy.task('switchToMetamaskNotification') failed with the following error:

page.waitForSelector: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for locator('.notification #app-content .app') to be visible
locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

https://on.cypress.io/api/task
at (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:151171:78)
at tryCatcher (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:18744:23)
at Promise._settlePromiseFromHandler (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:16679:31)
at Promise._settlePromise (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:16736:18)
at Promise._settlePromise0 (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:16781:10)
at Promise._settlePromises (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:16857:18)
at _drainQueueStep (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:13451:12)
at _drainQueue (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:13444:9)
at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:13460:5)
at Async.drainQueues (https://dev.cryptoexchange.com/__cypress/runner/cypress_runner.js:13330:14)
From Your Spec Code:
at Context.eval (webpack:///./node_modules/@synthetixio/synpress/support/commands.js:35:0)

From Node.js Internals:
TimeoutError: page.waitForSelector: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for locator('.notification #app-content .app') to be visible
locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

page.waitForSelector: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for locator('.notification #app-content .app') to be visible
locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

locator resolved to hidden
…

  at Object.waitFor (/app/node_modules/@synthetixio/synpress/commands/playwright.js:140:16)
  at Object.switchToMetamaskNotification (/app/node_modules/@synthetixio/synpress/commands/playwright.js:120:9)
  at switchToMetamaskNotification (/app/node_modules/@synthetixio/synpress/plugins/index.js:91:32)

_signUpPage.default.visitSignUpPage();
_headOfAllPage.default.checkProtocol();
_headOfAllPage.default.checkTitlePage('Create New Customer Account');
_loginPage.default.signUpDev(_locators.user.individualAccountTestEmail);
_headOfAllPage.default.clickConnectWalletAfterLoginBtn();
_headOfAllPage.default.clickMetamaskBtn();
cy.wait(15000);
cy.switchToMetamaskNotification();
cy.acceptMetamaskAccess({
confirmSignatureRequest: true
});
cy.readFile(_locators.fixturesInfo.cxCustomerToken).then(fixtureData => {
(0, _getCustomerRequest.getCustomerRequest)(fixtureData.cxCustomerToken).then(response => {
expect(response.status).to.eq(200);
// Check, that wallet value is NOT null (wallet connected)
assert.notStrictEqual(response.body.data.wallet, null);
});
});
_headOfAllPage.default.clickAccountHeadList();
_headOfAllPage.default.clickDisconnectWalletFromHeadList();
_headOfAllPage.default.clickDisconnectBtn();
cy.readFile(_locators.fixturesInfo.cxCustomerToken).then(fixtureData => {
(0, _getCustomerRequest.getCustomerRequest)(fixtureData.cxCustomerToken).then(response => {
expect(response.status).to.eq(200);
// Check, that wallet value is NULL (wallet disconnected)
assert.strictEqual(response.body.data.wallet, null);
});
});`

Loccaly i start with:
`- docker-compose build synpress

  • docker-compose run synpress sh
  • npx synpress run --spec "cypress/e2e/specs/wallet/connectDisconnectMetamask.cy.js" --configFile synpress.config.js --browser chrome`

Using gitlab:

' - docker compose -f docker-compose.dev.yml build synpress # Π‘Π±ΠΎΡ€ΠΊΠ° ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€Π° synpress
- docker compose -f docker-compose.dev.yml up -d synpress
- npx synpress run --spec "cypress/e2e/specs/wallet/connectDisconnectMetamask.cy.js" --configFile synpress.config.js --browser chrome '

Can you help me please?

from synpress.

duckception avatar duckception commented on June 11, 2024

@philpetrov How does you docker-compose setup look like?

from synpress.

philpetrov avatar philpetrov commented on June 11, 2024

@duckception
locally docker-compose.yml which works, contains:
`version: "3.9"

services:
test-app:
build:
context: .
dockerfile: docker/local/Dockerfile
environment:
- "TELEGRAM_BOT_TOKEN="
- "PWA_LOCAL_DEV_CHAT_ID="
deploy:
restart_policy:
condition: none
volumes:
- ./var/results:/app/cypress/results
networks:
- default

nginx:
image: nginx:latest
container_name: cryptoexchange_tests_nginx
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
ports:
- "7777:80"
volumes:
- ./var/results:/opt/app
- ./nginx/conf.d:/etc/nginx/conf.d
networks:
- default

synpress:
volumes:
- /Users/lidiakarandasova/Documents/CX/cryptoexchange-test/synpress.config.js:/app/synpress.config.js
profiles:
- synpress
container_name: synpress
build: .
environment:
- DISPLAY=display:0.0
- CYPRESS_DOCKER_RUN=true
- CI=true
entrypoint: []
working_dir: /app
depends_on:
- display
networks:
- x11

display:
container_name: display
image: synthetixio/display:016121eafdfff448414894d0ca5a50b1d72b62eb-base
environment:
- RUN_XTERM=no
- DISPLAY_WIDTH=800
- DISPLAY_HEIGHT=600
ports:
- "8080:8080"
networks:
- x11

networks:
default:
driver: bridge
x11:
`

in gitlab docker-compose.dev.yml with error contains:

`version: "3.9"

services:
test-app:
image: "${IMAGE}"
deploy:
restart_policy:
condition: none
environment:
- "TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}"
- "PWA_LOCAL_DEV_CHAT_ID=${PWA_LOCAL_DEV_CHAT_ID}"
volumes:
- /var/www/cryptoexchange-tests/results:/app/cypress/results
networks:
- web

nginx:
image: nginx:latest
hostname: cryptoexchange_tests_nginx
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
ports:
- "8080:80"
volumes:
- /var/www/cryptoexchange-tests/results:/opt/app
- /var/www/cryptoexchange-tests/nginx/conf.d:/etc/nginx/conf.d
networks:
- web

synpress:
volumes:
- /var/www/cryptoexchange-tests/results:/app/cypress/results
hostname: synpress
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 5
window: 120s
image: "${SYNPRESS_IMAGE}"
environment:
- "TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}"
- "PWA_LOCAL_DEV_CHAT_ID=${PWA_LOCAL_DEV_CHAT_ID}"
- DISPLAY=display:0.0
- CYPRESS_DOCKER_RUN=true
- CI=true
networks:
- web

display:
hostname: display
image: synthetixio/display:016121eafdfff448414894d0ca5a50b1d72b62eb-base
environment:
- RUN_XTERM=no
- DISPLAY_WIDTH=800
- DISPLAY_HEIGHT=600
networks:
- web

networks:
web:`

from synpress.

gediminasInterCap avatar gediminasInterCap commented on June 11, 2024

any solutions - workarounds for this issue?

from synpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.