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

added cypress tests for critical-ui components #140

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

utkarsh-1602
Copy link
Contributor

Description

Checklist

  • I have followed the repository's contribution guidelines.
  • I have added necessary documentation or updated existing documentation.
  • My code follows the established code style and formatting of the project.
  • I have tested my changes and they function as expected.
  • I have added suitable unit tests (if applicable).

To be reviewed by: @Nasfame @techyNonso

Copy link

vercel bot commented Nov 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-decenterai-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2024 9:20pm

@utkarsh-1602
Copy link
Contributor Author

1/5 Tests Passed :

  • Error I'm getting in notification.cy.js
Running:  notification.cy.js                                                              (
  Notifications Components
    1) should render Messages component with mock data
    2) should render ModalNotification component with mock data
  0 passing (25s)
  2 failing
  1) Notifications Components
       should render Messages component with mock data:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `[data-cy=messages]`, but never found it.
      at Context.eval (webpack://app.decenterai.com/./cypress/e2e/notification.cy.js:35:41)

  2) Notifications Components
       should render ModalNotification component with mock data:
     ReferenceError: avatarData is not defined
      at Context.eval (webpack://app.decenterai.com/./cypress/e2e/notification.cy.js:54:24)

  • Error I'm getting in repository.cy.js
Running:  repository.cy.js                                                                (
  Page Component
    1) should interact with the page elements and repository component

  0 passing (16s)
  1 failing

  1) Page Component
       should interact with the page elements and repository component:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.h-full`, but never found it.
      at Context.eval (webpack://app.decenterai.com/./cypress/e2e/repository.cy.js:10:46)

  • Error I'm getting in settings.cy.js

  Settings Page
    1) should interact with the settings page elements

  0 passing (15s)
  1 failing

  1) Settings Page
       should interact with the settings page elements:
     AssertionError: Timed out retrying after 10000ms: Expected to find content: 'Profile' but never did.
      at Context.eval (webpack://app.decenterai.com/./cypress/e2e/settings.cy.js:10:11)

  • Error I'm getting in train.cy.js
Train Page Component
    1) "before each" hook for "should interact with the train page elements"

  0 passing (5s)
  1 failing

  1) Train Page Component
       "before each" hook for "should interact with the train page elements":
     CypressError: `cy.visit()` failed trying to load:

http://localhost:3000/dashboard/train

The response we received from your web server was:

  > 500: Internal Server Error

This was considered a failure because the status code was not `2xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Train Page Component`
      at <unknown> (http://localhost:3000/__cypress/runner/cypress_runner.js:131299:76)
      at visitFailedByErr (http://localhost:3000/__cypress/runner/cypress_runner.js:130707:12)
      at <unknown> (http://localhost:3000/__cypress/runner/cypress_runner.js:131282:13)
      at tryCatcher (http://localhost:3000/__cypress/runner/cypress_runner.js:1807:23)
      at Promise._settlePromiseFromHandler (http://localhost:3000/__cypress/runner/cypress_runner.js:1519:31)
      at Promise._settlePromise (http://localhost:3000/__cypress/runner/cypress_runner.js:1576:18)
      at Promise._settlePromise0 (http://localhost:3000/__cypress/runner/cypress_runner.js:1621:10)
      at Promise._settlePromises (http://localhost:3000/__cypress/runner/cypress_runner.js:1697:18)
      at _drainQueueStep (http://localhost:3000/__cypress/runner/cypress_runner.js:2407:12)
      at _drainQueue (http://localhost:3000/__cypress/runner/cypress_runner.js:2400:9)
      at Async._drainQueues (http://localhost:3000/__cypress/runner/cypress_runner.js:2416:5)
      at Async.drainQueues (http://localhost:3000/__cypress/runner/cypress_runner.js:2286:14)
  From Your Spec Code:
      at Context.eval (webpack://app.decenterai.com/./cypress/e2e/train.cy.js:5:11)



@codypharm
Copy link
Contributor

@Nasfame what do you think about the task errors

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 this pull request may close these issues.

3 participants