Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c111ab4
test: add e2e tests for tsc, slack and ambassadors page
anushkaaaaaaaa Jul 10, 2025
f7f8e6e
fix: update
anushkaaaaaaaa Jul 15, 2025
b40bada
Merge branch 'master' into tscslack
anushkaaaaaaaa Jul 15, 2025
d408d53
fix: small changes
anushkaaaaaaaa Jul 16, 2025
279a97f
Merge branch 'tscslack' of https://github.com/anushkaaaaaaaa/website …
anushkaaaaaaaa Jul 16, 2025
90bea84
Merge branch 'master' into tscslack
anushkaaaaaaaa Jul 18, 2025
3200b51
Merge branch 'master' into tscslack
anushkaaaaaaaa Aug 18, 2025
21f89ca
feat: add tests for Ambassadors and TSC pages, including social links…
anushkaaaaaaaa Nov 3, 2025
f276e0b
Merge branch 'master' into tscslack
anushkaaaaaaaa Nov 3, 2025
6219990
small change
anushkaaaaaaaa Nov 3, 2025
f749d19
Merge branch 'tscslack' of https://github.com/anushkaaaaaaaa/website …
anushkaaaaaaaa Nov 3, 2025
47a54aa
refactor: format verifyKeySectionsAndLinks method for improved readab…
anushkaaaaaaaa Nov 3, 2025
1e16720
fix: update link in verifyKeySectionsAndLinks method to correct URL
anushkaaaaaaaa Nov 3, 2025
d3bcbf7
Merge branch 'master' into tscslack
anushkaaaaaaaa Nov 9, 2025
0e1d14c
Merge branch 'master' into tscslack
anushkaaaaaaaa Nov 15, 2025
7a15871
test: enhance Slack workspace tests for inactive link handling
anushkaaaaaaaa Nov 15, 2025
ca73a27
refactor: streamline link status checks and enhance test structure fo…
anushkaaaaaaaa Nov 15, 2025
f703eec
test: ensure visibility checks for Slack login buttons and footer links
anushkaaaaaaaa Nov 15, 2025
7353b76
refactor: remove unused navigation methods for Tools and Docs pages
anushkaaaaaaaa Nov 15, 2025
7196dc4
Merge branch 'master' into tscslack
anushkaaaaaaaa Nov 15, 2025
4921a24
refactor: replace static wait with dynamic page load checks for Slack…
anushkaaaaaaaa Nov 15, 2025
82bf898
Merge branch 'master' into tscslack
anushkaaaaaaaa Nov 20, 2025
cba1570
Merge branch 'master' into tscslack
sambhavgupta0705 Nov 29, 2025
edb7441
Merge branch 'master' into tscslack
anushkaaaaaaaa Dec 11, 2025
bcfb24b
Merge branch 'master' into tscslack
anushkaaaaaaaa Dec 13, 2025
c896f11
Merge branch 'master' into tscslack
anushkaaaaaaaa Dec 15, 2025
d1e8b85
Update cypress/pages/homepage.js
anushkaaaaaaaa Dec 30, 2025
71e6594
Update cypress/pages/tscpage.js
anushkaaaaaaaa Dec 30, 2025
94895ff
Update cypress/pages/tscpage.js
anushkaaaaaaaa Dec 30, 2025
c995f7b
Update cypress/ambassadors.cy.js
anushkaaaaaaaa Dec 30, 2025
8b050f2
Update cypress/pages/tscpage.js
anushkaaaaaaaa Dec 30, 2025
9a05884
Update cypress/tscpage.cy.js
anushkaaaaaaaa Dec 30, 2025
9c3f1da
Update cypress/pages/ambassadors.js
anushkaaaaaaaa Dec 30, 2025
a2b3ac8
Update cypress/pages/tscpage.js
anushkaaaaaaaa Dec 30, 2025
ef803c3
Update cypress/pages/ambassadors.js
anushkaaaaaaaa Dec 30, 2025
ef011a3
Merge branch 'master' into tscslack
anushkaaaaaaaa Dec 30, 2025
ed48dab
feat: Add E2E tests for the TSC page and Slack workspace.
anushkaaaaaaaa Dec 30, 2025
df1743a
Merge branch 'tscslack' of https://github.com/anushkaaaaaaaa/website …
anushkaaaaaaaa Dec 30, 2025
2dba8a6
test: Add Cypress E2E tests and page objects for Ambassadors, TSC, an…
anushkaaaaaaaa Dec 30, 2025
ffe4155
Merge branch 'master' into tscslack
anushkaaaaaaaa Jan 14, 2026
4c6fb52
feat: add Cypress page object for the ambassadors page to encapsulate…
anushkaaaaaaaa Jan 14, 2026
70b287e
Merge branch 'tscslack' of https://github.com/anushkaaaaaaaa/website …
anushkaaaaaaaa Jan 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions cypress/ambassadors.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import HomePage from './pages/homepage';
import AmbassadorsPage from './pages/ambassadors';

let homePage;
let ambassadorsPage;

beforeEach(() => {
homePage = new HomePage();
ambassadorsPage = new AmbassadorsPage();
homePage.visit();
homePage.goToAmbassadorsPage();
});

describe('Ambassadors Page', () => {
it('verifies key sections and links', () => {
ambassadorsPage.verifyKeySectionsAndLinks();
});

it('verifies social links for selected Ambassadors', () => {
const ambassadors = [
{
name: 'Quetzalli Writes',
links: {
github: 'https://www.github.com/quetzalliwrites',
twitter: 'https://www.twitter.com/QuetzalliWrites',
linkedin: 'https://www.linkedin.com/in/quetzalli-writes'
Comment on lines +20 to +26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please extract this data into a JSON file?

}
},
{
name: 'Daniel Kocot',
links: {
github: 'https://www.github.com/danielkocot',
twitter: 'https://www.twitter.com/dk_1977',
linkedin: 'https://www.linkedin.com/in/danielkocot'
}
},
{
name: 'Hugo Guerrero',
links: {
github: 'https://www.github.com/hguerrero',
twitter: 'https://www.twitter.com/hguerreroo',
linkedin: 'https://www.linkedin.com/in/hugoguerrero'
}
}
];

ambassadors.forEach(({ name, links }) => {
ambassadorsPage.verifyAmbassadorSocialLinks(name, links);
});
});
});

32 changes: 32 additions & 0 deletions cypress/pages/ambassadors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class AmbassadorsPage {
visit() {
cy.visit('/community/ambassadors');
}

verifyKeySectionsAndLinks() {
cy.get('a[href="https://github.com/asyncapi/community/blob/master/docs/020-governance-and-policies/AMBASSADOR_PROGRAM.md"]'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same goes for this as well—please create a separate JSON file that contains all the Markdown files. As you may be aware, we recently went through a major restructuring of the docs in the community repo, and we are still updating links on the website even now. The reason is the same: everywhere we needed those links, they were hardcoded.

Instead, we should have a single source of truth, which will make it much easier to update things in the future.

)
.should('be.visible');
cy.get('[data-testid="Ambassadors-Iframe"]')
.should('be.visible');
cy.get('[data-testid="Ambassadors-members-main"]')
.should('be.visible');
cy.get('a[href="https://github.com/asyncapi/community/blob/master/AMBASSADOR_ORGANIZATION.md#are-you-interested-in-becoming-an-official-asyncapi-ambassador"]')
.scrollIntoView()
.should('be.visible');
cy.get('a[href="https://www.asyncapi.com/blog/asyncapi-ambassador-program"]')
.should('be.visible');
}

verifyAmbassadorSocialLinks(name, links) {
cy.contains('[data-testid="Ambassadors-members-details"]', name)
.closest('[data-testid="Ambassadors-members"]')
.within(() => {
if (links.twitter) cy.get(`a[href="${links.twitter}"]`).should('be.visible');
if (links.github) cy.get(`a[href="${links.github}"]`).should('be.visible');
if (links.linkedin) cy.get(`a[href="${links.linkedin}"]`).should('be.visible');
});
}
}

export default AmbassadorsPage;
14 changes: 13 additions & 1 deletion cypress/pages/homepage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import AmbassadorsPage from './ambassadors';
import TSCPage from './tscpage';
import CaseStudiesPage from './CaseStudiesPage';
import DocsPage from './DocsPage';
import RoadmapPage from './RoadmapPage';
Expand Down Expand Up @@ -140,6 +142,16 @@ class HomePage {
cy.contains('a', 'Roadmap').click();
return new RoadmapPage();
}

goToTSCPage() {
cy.visit('/community/tsc');
return new TSCPage();
}

goToAmbassadorsPage() {
cy.visit('/community/ambassadors');
return new AmbassadorsPage();
}
}

export default HomePage;
export default HomePage;
85 changes: 85 additions & 0 deletions cypress/pages/slack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
class SlackPage {
visitSlack() {
cy.visit(
'https://asyncapi.slack.com/join/shared_invite/zt-3clk6rmc0-Cujl2fChHYnHDUwFKRlQCw#/shared-invite/email',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm, if I’m not wrong, this is the Slack invite link. Don’t you think this link keeps changing? Could you replace it with the current source we have, so we can maintain a single source of truth here?

);
}

waitForPageLoad() {
cy.get('body', { timeout: 10000 }).should(($body) => {
const hasInactiveMessage =
$body.find('.p-refreshed_page__heading').length > 0;
const hasLoginButton =
$body.find('[data-qa="base_google_login_button"]').length > 0;
expect(hasInactiveMessage || hasLoginButton).to.be.true;
});
}

checkLinkStatus(callback) {
cy.get('body').then(($body) => {
const isInactive =
$body.find('.p-refreshed_page__heading').length > 0 &&
$body.text().includes('This link is no longer active');
callback(isInactive);
});
}

verifyInactiveLinkMessage() {
cy.get('.p-refreshed_page__heading')
.should('be.visible')
.and('have.text', 'This link is no longer active');
}

verifyAllLoginMethods() {
this.verifyGoogleLoginButton();
this.verifyAppleLoginButton();
this.verifyContinueWithEmail();
}

verifyAllFooterLinks() {
this.verifyPrivacyAndTerms();
this.verifyContactUs();
this.verifyChangeRegion();
}

verifyGoogleLoginButton() {
cy.get('[data-qa="base_google_login_button"]')
.should('be.visible')
.and('have.id', 'google_login_button')
.and('have.attr', 'type', 'button');
}

verifyAppleLoginButton() {
cy.get('[data-qa="base_apple_login_button"]')
.should('be.visible')
.and('have.id', 'apple_login_button')
.and('have.attr', 'href')
.and('include', 'slack.com/shared-invite/oauth/apple/start');
}

verifyContinueWithEmail() {
cy.get('[data-qa="join_with_email"]')
.should('be.visible')
.and('have.attr', 'type', 'button');
}

verifyPrivacyAndTerms() {
cy.get('[href="/legal"]')
.should('be.visible')
.and('have.attr', 'href', '/legal');
}

verifyContactUs() {
cy.get('[href="/help/requests/new"]')
.should('be.visible')
.and('have.attr', 'href', '/help/requests/new');
}

verifyChangeRegion() {
cy.get('a[href="#"]')
.should('be.visible')
.and('contain.text', 'Change region');
}
}

export default SlackPage;
36 changes: 36 additions & 0 deletions cypress/pages/tscpage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class TSCPage {
hoverCommunityLink() {
cy.get('[data-testid="NavItem-Link"]').contains('Community').trigger('mouseover');
}

fillNewsletterForm(name, email) {
cy.get('[data-testid="NewsletterSubscribe-text-input"]').type(name);
cy.get('[data-testid="NewsletterSubscribe-email-input"]').type(email);
}

submitNewsletter() {
cy.get('[data-testid="Button-main"]').click();
}

getSuccessMessage() {
return cy.get('[data-testid="Paragraph-test"]').contains(
`You'll receive an email whenever someone requests the TSC to vote.`
);
}

getFailureMessage() {
return cy.get('[data-testid="Paragraph-test"]').contains(`Subscription failed, please let us know about it by submitting a bug`);
}
verifyTSCMemberSocialLinks(name, links) {
cy.contains('[data-testid="UserInfo-name"]', name)
.closest('[data-testid="UserInfo-list"]')
.within(() => {
if (links.GitHub) cy.get(`a[href="${links.GitHub}"]`).should('be.visible');
if (links.Twitter) cy.get(`a[href="${links.Twitter}"]`).should('be.visible');
if (links.Linkedin) cy.get(`a[href="${links.Linkedin}"]`).should('be.visible');
});
}
}

export default TSCPage;

33 changes: 33 additions & 0 deletions cypress/slackworkspace.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import SlackPage from './pages/slack';

describe('Slack workspace tests', () => {
const slackPage = new SlackPage();

beforeEach(() => {
slackPage.visitSlack();
});

it('Should show all login methods when the Slack invite link is active', () => {
cy.get('body').then(($body) => {
const isInactive =
$body.find('.p-refreshed_page__heading').length > 0 &&
$body.text().includes('This link is no longer active');

if (!isInactive) {
slackPage.verifyGoogleLoginButton();
slackPage.verifyAppleLoginButton();
slackPage.verifyContinueWithEmail();
} else {
cy.log('Slack invite link is inactive - skipping login method tests');
expect(isInactive).to.be.true;
}
});
});

it('Should show links for Privacy, Contact Us, and Region Change', () => {
slackPage.verifyPrivacyAndTerms();
slackPage.verifyContactUs();
slackPage.verifyChangeRegion();
});

});
80 changes: 80 additions & 0 deletions cypress/tscpage.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import HomePage from './pages/homepage';
import TSCPage from './pages/tscpage';

let homePage;
let tscpage;

beforeEach(() => {
homePage = new HomePage();
tscpage = new TSCPage();
homePage.visit();
homePage.goToTSCPage();
});

describe('TSC Page', () => {
it('should succeed in subscribing to the newsletter', () => {
tscpage.fillNewsletterForm('anushka', 'valid@example.com');
tscpage.submitNewsletter();
tscpage.getSuccessMessage().should('be.visible');
});

it('should show correct failure message', () => {
tscpage.fillNewsletterForm('aditi', 'kerghjh@fhgj');
tscpage.submitNewsletter();
tscpage.getFailureMessage().should('be.visible');
});

it('verifies key links on the TSC page', () => {
const linksToVerify = [
{
href: 'https://github.com/asyncapi/community/blob/master/TSC_MEMBERSHIP.md',
label: 'Link',
},
{
href: 'https://github.com/asyncapi/community/blob/master/CHARTER.md',
label: 'Open Governance Model',
},
{
href: 'https://www.asyncapi.com/blog/governance-motivation',
label: 'this',
},
];

linksToVerify.forEach(({ href, label }) => {
cy.get(`a[href="${href}"]`).contains(label).should('be.visible');
});
});
Comment on lines +29 to +46
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned before, please extract these out.


it('verifies social links for selected TSC members', () => {
const members = [
{
name: 'Aishat Muibudeen',
links: {
GitHub: 'https://www.github.com/Mayaleeeee',
Twitter: 'https://www.twitter.com/maya_ux_ui',
Linkedin: 'https://www.linkedin.com/in/aishatmuibudeen'
}
},
{
name: 'Khuda Dad Nomani',
links: {
GitHub: 'https://www.github.com/KhudaDad414',
Twitter: 'https://www.twitter.com/KhudaDadNomani',
Linkedin: 'https://www.linkedin.com/in/khudadadnomani'
}
},
{
name: 'Lukasz Gornicki',
links: {
GitHub: 'https://www.github.com/derberg',
Twitter: 'https://www.twitter.com/derberq',
Linkedin: 'https://www.linkedin.com/in/lukasz-gornicki-a621914'
}
}
];
Comment on lines +50 to +74
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm… as mentioned above, please move this hardcoded data out of the test file.


members.forEach(({ name, links }) => {
tscpage.verifyTSCMemberSocialLinks(name, links);
});
});
});
Loading