-
-
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
eef441d
commit ad1a31a
Showing
1 changed file
with
12 additions
and
15 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,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'); | ||
}); | ||
}); | ||
}); |