From b9895ffbccea3076d5b053676b8305ca8b46b479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=83=D0=BB?= Date: Mon, 5 Aug 2024 18:15:25 +0300 Subject: [PATCH] Revert "Merge pull request #1993 from saithsab877/cyress-test" This reverts commit 864d5837aff33aa1943cbb57e9fcef261fd3b092, reversing changes made to e9da16ccc0bcb970e80813ac27df6598467546e8. --- .github/workflows/test.yml | 14 +++++++------- cypress/e2e/addContent/addTweet.cy.ts | 16 +++++----------- cypress/e2e/addContent/addWebpage.cy.ts | 16 +++++----------- cypress/e2e/addContent/addYoutube.cy.ts | 16 +++++----------- 4 files changed, 22 insertions(+), 40 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90e085f44..b0fd64627 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,8 +17,8 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' - cache: 'yarn' + node-version-file: ".nvmrc" + cache: "yarn" - name: Clone Stack run: | git clone https://github.com/stakwork/sphinx-stack.git stack @@ -56,7 +56,7 @@ jobs: command: | export TWITTER_BEARER="Bearer ${{ secrets.TWITTER_BEARER }}" echo $TWITTER_BEARER - STAKWORK_TOKEN=daaa3a0894f0658d99781471dfccd3e1 TWITTER_BEARER=$TWITTER_BEARER GITACTION_ENV=gitactionenv docker compose -f ./stack/alts/navfiber.yml --project-directory ./stack up -d; + STAKWORK_TOKEN=daaa3a0894f0658d99781471dfccd3e1 TWITTER_BEARER=$TWITTER_BEARER GITACTION_ENV=gitactionenv docker-compose -f ./stack/alts/navfiber.yml --project-dir ./stack up -d; sleep 240; docker ps docker logs meme.sphinx @@ -67,8 +67,8 @@ jobs: - name: Copy Node.json uses: canastro/copy-file-action@master with: - source: 'stack/relay/NODES.json' - target: 'relay/nodes.json' + source: "stack/relay/NODES.json" + target: "relay/nodes.json" - name: Install run: yarn --immutable @@ -80,7 +80,7 @@ jobs: install-command: yarn --immutable browser: chrome start: yarn run start-e2e - wait-on: 'http://localhost:3000' # Waits for above + wait-on: "http://localhost:3000" # Waits for above wait-on-timeout: 120 # Waits for 2 minutes # Records to Cypress Dashboard record: true @@ -104,4 +104,4 @@ jobs: - name: Stop Stack working-directory: ./stack - run: docker compose down + run: docker-compose down diff --git a/cypress/e2e/addContent/addTweet.cy.ts b/cypress/e2e/addContent/addTweet.cy.ts index 10b75a344..dc5686eef 100644 --- a/cypress/e2e/addContent/addTweet.cy.ts +++ b/cypress/e2e/addContent/addTweet.cy.ts @@ -2,23 +2,17 @@ describe('Add Tweet Content', () => { it('Carol adds tweet content to graph', () => { cy.initialSetup('carol', 300) - cy.intercept( - { - method: 'POST', - url: 'http://localhost:8444/api/add_node*', - }, - { - statusCode: 200, - body: { success: true }, - }, - ).as('addTweet') + cy.intercept({ + method: 'POST', + url: 'http://localhost:8444/api/add_node*', + }).as('addTweet') cy.get('[data-testid="add-content-modal"]').click() cy.get('#addContent').should('exist') cy.get('[id="cy-youtube-channel-id"]').type('https://twitter.com/ijbguy/status/1771096005162729663') cy.get('[data-testid="add-content-btn"]').click() - cy.get('[data-testid="skip-location-btn"]').click() + cy.get('[data-testid="skip-location-btn"').click() cy.get('[data-testid="check-icon"]').click() cy.wait('@addTweet') diff --git a/cypress/e2e/addContent/addWebpage.cy.ts b/cypress/e2e/addContent/addWebpage.cy.ts index 98fa0a939..5f5276686 100644 --- a/cypress/e2e/addContent/addWebpage.cy.ts +++ b/cypress/e2e/addContent/addWebpage.cy.ts @@ -2,23 +2,17 @@ describe('Add Webpage Content', () => { it('Carol adds webpage to graph', () => { cy.initialSetup('carol', 50) - cy.intercept( - { - method: 'POST', - url: 'http://localhost:8444/api/add_node*', - }, - { - statusCode: 200, - body: { success: true }, - }, - ).as('addWebpage') + cy.intercept({ + method: 'POST', + url: 'http://localhost:8444/api/add_node*', + }).as('addWebpage') cy.get('[data-testid="add-content-modal"]').click() cy.get('#addContent').should('exist') cy.get('[id="cy-youtube-channel-id"]').type('https://www.netflix.com/browse') cy.wait(1000) cy.get('[data-testid="add-content-btn"]').should('not.be.disabled').click() - cy.get('[data-testid="skip-location-btn"]').click() + cy.get('[data-testid="skip-location-btn"').click() cy.get('[data-testid="check-icon"]').click() cy.wait('@addWebpage') diff --git a/cypress/e2e/addContent/addYoutube.cy.ts b/cypress/e2e/addContent/addYoutube.cy.ts index b1df144aa..799f10913 100644 --- a/cypress/e2e/addContent/addYoutube.cy.ts +++ b/cypress/e2e/addContent/addYoutube.cy.ts @@ -2,23 +2,17 @@ describe('Add Youtube Content', () => { it('Carol adds youtube video to graph', () => { cy.initialSetup('carol', 50) - cy.intercept( - { - method: 'POST', - url: 'http://localhost:8444/api/add_node*', - }, - { - statusCode: 200, - body: { success: true }, - }, - ).as('addYoutube') + cy.intercept({ + method: 'POST', + url: 'http://localhost:8444/api/add_node*', + }).as('addYoutube') cy.get('[data-testid="add-content-modal"]').click() cy.get('#addContent').should('exist') cy.get('[id="cy-youtube-channel-id"]').type('https://www.youtube.com/watch?v=dPLPSaFqJmY') cy.wait(1000) cy.get('[data-testid="add-content-btn"]').should('not.be.disabled').click() - cy.get('[data-testid="skip-location-btn"]').click() + cy.get('[data-testid="skip-location-btn"').click() cy.get('[data-testid="check-icon"]').click() cy.wait('@addYoutube')