Skip to content

Commit

Permalink
timeout issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vishvamsinh28 committed Nov 24, 2023
1 parent eef441d commit ad1a31a
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions cypress/test/pages/community/dashboard.cy.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
import MockApp from "../../../utils/MockApp";
import DashboardHome from "../../../../pages/community/dashboard";
import Header from "../../../../components/dashboard/Header";
import { mount } from '@cypress/react';
import { mount } from '@cypress/react'
describe('Integration Test for Dashboard ', () => {

describe('Integration Test for Dashboard', () => {
it('should filter GoodFirstIssues and check dashboard render', () => {
it('should filter GoodFirstIssues and check dashboard render ', () => {
mount(
<MockApp>
<DashboardHome />
</MockApp>
);

// Click on the first filter option
cy.get(Header).should('exist');
cy.contains('AsyncAPI - Dashboard');
cy.get(Header).should('exist')
cy.contains('AsyncAPI - Dashboard')
cy.get('[data-testid="Filters-img-container"]').click({ force: true });
cy.get('[data-testid="Filter-menu"]').within(() => {
cy.get('[data-testid="Select-form"]').eq(0).select('asyncapi/generator', { force: true });
cy.get('[data-testid="Select-form"]').eq(1).select('docs');
cy.get('[data-testid="Select-form"]').eq(1).select('docs')
});

// Check if selected options are displayed
//check if selected is only displayed
cy.contains('asyncapi/generator');
cy.contains('docs');

// Check if options that should not be selected are not displayed
cy.get('[data-testid="Filter-menu"]').should('not.contain', 'asyncapi/community');
cy.get('[data-testid="Filter-menu"]').should('not.contain', 'javascript');
cy.contains('docs')
//check if this is not selected options are not displayed
cy.should('not.contain', 'asyncapi/community');
cy.should('not.contain', 'javascript');
});
});
});

0 comments on commit ad1a31a

Please sign in to comment.