Skip to content

Commit

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

it('should filter GoodFirstIssues and check dashboard render ', () => {
describe('Integration Test for Dashboard', () => {
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 is only displayed

// Check if selected options are displayed
cy.contains('asyncapi/generator');
cy.contains('docs')
//check if this is not selected options are not displayed
cy.should('not.contain', 'asyncapi/community');
cy.should('not.contain', 'javascript');
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');
});
});
});

0 comments on commit eef441d

Please sign in to comment.