-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
9ad0ca2
commit 5049edb
Showing
4 changed files
with
56 additions
and
57 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ describe('Test for Ambassadors', () => { | |
it('renders the ambassador list with correct data', () => { | ||
ambassadorList.contents.forEach((link) => { | ||
cy.get('[data-testid="Ambassadors-list"]') | ||
.find(`img[alt="${ link.title }"]`) | ||
.find(`img[alt="${link.title}"]`) | ||
.should('exist') | ||
.and('have.attr', 'src', link.icon); | ||
|
||
|
@@ -34,6 +34,7 @@ describe('Test for Ambassadors', () => { | |
.should('exist'); | ||
}); | ||
}); | ||
|
||
it('renders the ambassadors with correct data', () => { | ||
const asyncapiAmbassadors = sortBy( | ||
ambassadors.map((user) => addAdditionalUserInfo(user)), | ||
|
@@ -48,7 +49,7 @@ describe('Test for Ambassadors', () => { | |
.contains('div', ambassador.name) | ||
|
||
cy.get('[data-testid="Ambassadors-members-img"]') | ||
.find(`img[alt="${ ambassador.name }"]`) | ||
.find(`img[alt="${ambassador.name}"]`) | ||
|
||
.and('have.attr', 'src', ambassador.img); | ||
|
||
|
@@ -58,36 +59,37 @@ describe('Test for Ambassadors', () => { | |
}); | ||
|
||
}); | ||
|
||
it('displays the Tokens of our appreciation section with correct data', () => { | ||
cy.contains('Tokens of our appreciation').should('exist'); | ||
|
||
cy.contains('We appreciate your commitment and passion for sharing your knowledge with your communities. Let us support you!') | ||
.should('exist'); | ||
.should('exist'); | ||
|
||
ambassadorList.tokens.forEach((token) => { | ||
cy.contains('.mt-20 li', token.emoji).should('exist'); | ||
cy.contains('.mt-20 li', token.title).should('exist'); | ||
cy.contains('.mt-20 li', token.details).should('exist'); | ||
cy.contains('.mt-20 li', token.emoji).should('exist'); | ||
cy.contains('.mt-20 li', token.title).should('exist'); | ||
cy.contains('.mt-20 li', token.details).should('exist'); | ||
}); | ||
}); | ||
it('displays the Become an AsyncAPI Ambassador section with correct data', () => { | ||
}); | ||
|
||
it('displays the Become an AsyncAPI Ambassador section with correct data', () => { | ||
cy.contains('Become an AsyncAPI Ambassador').should('exist'); | ||
|
||
cy.contains('The AsyncAPI Ambassador program is now open for applications! If you’re selected, you’ll join AsyncAPI\'s mission of helping community members all over the world, build the future of Event-Driven APIs.') | ||
.should('exist'); | ||
.should('exist'); | ||
|
||
cy.contains('Become an Ambassador now') | ||
.should('have.attr', 'href', 'https://github.com/asyncapi/community/blob/master/AMBASSADOR_ORGANIZATION.md#are-you-interested-in-becoming-an-official-asyncapi-ambassador'); | ||
}); | ||
it('should display NewsletterSubscribe',()=>{ | ||
.should('have.attr', 'href', 'https://github.com/asyncapi/community/blob/master/AMBASSADOR_ORGANIZATION.md#are-you-interested-in-becoming-an-official-asyncapi-ambassador'); | ||
}); | ||
|
||
it('should display NewsletterSubscribe', () => { | ||
cy.get('[data-testid="NewsletterSubscribe-main"]').should('exist'); | ||
cy.get('[data-testid="NewsletterSubscribe-text-input"]').type("name"); | ||
cy.get('[data-testid="NewsletterSubscribe-email-input"]').type("[email protected]") | ||
cy.get('form[name="form 1"]').should('exist'); | ||
cy.get('input[name="type"]').should('exist'); | ||
cy.get('input[name="name"]').should('exist'); | ||
cy.get('input[name="email"]').should('exist'); | ||
}); | ||
|
||
}); | ||
}); |
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,34 +1,28 @@ | ||
import MockApp from "../../../utils/mockApp"; | ||
import Home 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 ', () => { | ||
|
||
it('should filter GoodFirstIssues and check dashboard render ', () => { | ||
|
||
it('should filter GoodFirstIssues and check dashboard render ', () => { | ||
mount( | ||
<MockApp> | ||
<Home /> | ||
<Home /> | ||
</MockApp> | ||
); | ||
); | ||
// Click on the first filter option | ||
cy.get(Header).should('exist') | ||
|
||
cy.contains('AsyncAPI - Dashboard') | ||
|
||
cy.get('[data-testid="Filters-img-container"]').click({force:true}); | ||
|
||
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') | ||
}); | ||
//check if selected is only 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'); | ||
}); | ||
|
||
}); | ||
//check if selected is only 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'); | ||
}); | ||
}); |
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
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