-
-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08b20ce
commit eef441d
Showing
1 changed file
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); | ||
}); | ||
}); |