Skip to content

Commit

Permalink
fix(cypress): fix cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
saithsab877 committed Aug 2, 2024
1 parent 3b14331 commit e51e754
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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-dir ./stack up -d;
STAKWORK_TOKEN=daaa3a0894f0658d99781471dfccd3e1 TWITTER_BEARER=$TWITTER_BEARER GITACTION_ENV=gitactionenv docker compose -f ./stack/alts/navfiber.yml --project-directory ./stack up -d;
sleep 240;
docker ps
docker logs meme.sphinx
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/addContent/addWebpage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ describe('Add Webpage Content', () => {
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')
cy.get('.Toastify__toast-body', { timeout: 20000 }).should('exist')
cy.get('.Toastify__toast-body').should('have.text', 'Content Added')
cy.get('#addContent').should('not.exist')
})
Expand Down

0 comments on commit e51e754

Please sign in to comment.