Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0c6bcdd
feat: add ToolsModelinaPage and tests
anushkaaaaaaaa Nov 4, 2025
cfacd6e
feat: add ToolsGeneratorPage and tests
anushkaaaaaaaa Nov 4, 2025
504f7f3
feat: add ToolsMiscPage and corresponding tests for CLI, Parsers, and…
anushkaaaaaaaa Nov 4, 2025
a41b39e
Merge branch 'master' into toolsPage
anushkaaaaaaaa Nov 4, 2025
88e545d
Merge branch 'master' into toolsPage
anushkaaaaaaaa Nov 6, 2025
a9c6212
Merge branch 'master' into toolsPage
anushkaaaaaaaa Nov 7, 2025
2118a1a
Merge branch 'master' into toolsPage
sambhavgupta0705 Nov 28, 2025
ada737a
Merge branch 'master' into toolsPage
anushkaaaaaaaa Dec 15, 2025
9df361d
feat: implement base page classes (dry principle) for tools and homep…
anushkaaaaaaaa Dec 16, 2025
b1a9aff
Merge branch 'toolsPage' of https://github.com/anushkaaaaaaaa/website…
anushkaaaaaaaa Dec 16, 2025
4fb2c32
Merge branch 'master' into toolsPage
anushkaaaaaaaa Dec 16, 2025
09f8016
refactor: implement DRY
anushkaaaaaaaa Dec 19, 2025
626a99a
Merge branch 'toolsPage' of https://github.com/anushkaaaaaaaa/website…
anushkaaaaaaaa Dec 19, 2025
acbdb6b
refactor: implement DRY principle
anushkaaaaaaaa Dec 19, 2025
d81fa0a
feat: add Cypress tests for Generator, CLI, Parsers, GitHub Actions, …
anushkaaaaaaaa Dec 19, 2025
a3fb69a
Merge branch 'master' into toolsPage
anushkaaaaaaaa Dec 19, 2025
38cb603
chore: minor fix
anushkaaaaaaaa Dec 19, 2025
844ff45
Merge branch 'toolsPage' of https://github.com/anushkaaaaaaaa/website…
anushkaaaaaaaa Dec 19, 2025
b689fe3
small fix
anushkaaaaaaaa Dec 19, 2025
a36ba19
fixxx
anushkaaaaaaaa Dec 19, 2025
88335e4
small fixx
anushkaaaaaaaa Dec 19, 2025
5134008
feat: Add BasePage with common Cypress page object methods and BaseTo…
anushkaaaaaaaa Dec 20, 2025
4044946
fix
anushkaaaaaaaa Dec 20, 2025
0083202
feat: Add Cypress page objects for Roadmap, Tools, Blog, Case Studies…
anushkaaaaaaaa Dec 30, 2025
bd8f6e1
Merge branch 'master' into toolsPage
anushkaaaaaaaa Dec 30, 2025
ac3e698
Merge branch 'master' into toolsPage
anushkaaaaaaaa Jan 3, 2026
1e3e949
remove 'basetoolspage'
anushkaaaaaaaa Jan 23, 2026
c0baccf
Merge branch 'master' into toolsPage
anushkaaaaaaaa Jan 23, 2026
d8fc389
change test names
anushkaaaaaaaa Jan 23, 2026
c52db52
refactor: consolidate link verification methods in BasePage
anushkaaaaaaaa Jan 23, 2026
d6a5e32
refactor: replace specific link verification methods with a generic t…
anushkaaaaaaaa Jan 23, 2026
d106460
refactor: replace verifyCodeSnippet method with verifyElementContains…
anushkaaaaaaaa Jan 23, 2026
7447d5d
minor fix
anushkaaaaaaaa Jan 23, 2026
6f0a445
feat: Add Cypress page objects and tests for various tools including …
anushkaaaaaaaa Jan 26, 2026
bdfbcf6
Merge branch 'master' into toolsPage
anushkaaaaaaaa Jan 26, 2026
95aedb9
feat: Add Cypress tests for CLI, GitHub Actions, and Parsers tools, i…
anushkaaaaaaaa Jan 26, 2026
1c4b835
Merge branch 'toolsPage' of https://github.com/anushkaaaaaaaa/website…
anushkaaaaaaaa Jan 26, 2026
e181b2d
jdfvk
anushkaaaaaaaa Jan 26, 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
4 changes: 2 additions & 2 deletions cypress/docspage.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ beforeEach(() => {
});

describe('Docs Page Tests', () => {
it('User navigates SideBar containing various sections', () => {
it('verifying navigation to SideBar containing various sections', () => {
docsPage.goToConceptsSection();

cy.get('@subsections').then((subsections) => {
Expand All @@ -29,7 +29,7 @@ describe('Docs Page Tests', () => {
docsPage.goToMigrationsSection();
docsPage.goToCommunitySection();

it('User verifies Card Links present on the Docs Page', () => {
it('verifying Card Links present on the Docs Page', () => {
const cards = [
{ href: '/docs/concepts' },
{ href: '/docs/tutorials' },
Expand Down
37 changes: 37 additions & 0 deletions cypress/fixtures/toolsPages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"generator": {
"path": "/tools/generator",
"heading": "Docs, Code, Anything!",
"image": "generator diagram",
"github": "https://www.github.com/asyncapi/generator",
"docs": "/docs/tools/generator"
},
"cli": {
"path": "/tools/cli",
"heading": "Interact with AsyncAPI from the comfort of your CLI",
"install": "npm install -g @asyncapi/cli",
"github": "https://www.github.com/asyncapi/cli",
"docs": "/docs/tools/cli"
},
"parsers": {
"path": "/tools/parsers",
"heading": "Build your own tools",
"install": "npm install @asyncapi/parser",
"github": "https://www.github.com/asyncapi/parser-js"
},
"githubActions": {
"path": "/tools/github-actions",
"heading": "Automate using GitHub Actions",
"github": "https://www.github.com/asyncapi/github-action-for-generator"
},
"modelina": {
"path": "/tools/modelina",
"heading": "Modelina",
"install": "npm install @asyncapi/modelina",
"tryIt": {
"text": "Try it now",
"href": "https://modelina.org/playground"
},
"github": "https://www.github.com/asyncapi/modelina"
}
}
6 changes: 3 additions & 3 deletions cypress/header.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ describe('Header Links Validation', () => {
header.visit();
});

it('User hovers over Docs dropdown and sees the dropdown', () => {
it('Verifying if user hovers over Docs dropdown and sees the dropdown', () => {
header.verifyDocsDropdown();
});

it('User hovers over Tools dropdown and sees the dropdown', () => {
it('Verifying if user hovers over Tools dropdown and sees the dropdown', () => {
header.verifyToolsDropdown();
});

it('User hovers over Community dropdown and sees the dropdown', () => {
it('Verifying if user hovers over Community dropdown and sees the dropdown', () => {
header.verifyCommunityDropdown();
});
});
4 changes: 2 additions & 2 deletions cypress/pages/BaseFooterPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class BasePage {
verifyLink(href, text, attr = 'href') {
const chain = cy
.get(`a[${attr}="${href}"]`)
.should('be.visible')
.and('have.attr', attr, href);
//.should('be.visible')
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

This is a commented-out assertion that should either be removed or uncommented. Leaving commented code reduces code clarity. The change appears intentional to remove the visibility check, but the commented line should be deleted rather than left in the codebase.

Suggested change
//.should('be.visible')

Copilot uses AI. Check for mistakes.
.should('have.attr', attr, href);
return text ? chain.and('contain', text) : chain;
}
}
Expand Down
9 changes: 4 additions & 5 deletions cypress/pages/BaseHeaderPage.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

class BasePage {
visit(path = '/') {
cy.visit(path)
return this;
visit() {
cy.visit('/')
}

getElement(selector) {
Expand All @@ -11,8 +10,8 @@ class BasePage {

hoverElement(selector) {
return this.getElement(selector)
.trigger('mouseover')
.trigger('mouseenter');
.trigger('mouseover')
.trigger('mouseenter');
}
}

Expand Down
55 changes: 55 additions & 0 deletions cypress/pages/BasePage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
class BasePage {
visit(url = '/') {
cy.visit(url);
}

getElement(selector) {
return cy.get(selector);
}

hoverElement(selector) {
return this.getElement(selector)
.trigger('mouseover')
.trigger('mouseenter');
}

verifyElementIsVisible(selector) {
return this.getElement(selector).should('be.visible');
}

verifyElementHasAttribute(selector, attribute, value) {
return this.getElement(selector).should('have.attr', attribute, value);
}

verifyHeadingExists(headingText) {
return cy.contains('h1, h2, h3, h4, h5, h6', headingText).should('be.visible');
}

verifyLink(href, text, { findByText = false } = {}) {
if (findByText && text) {
const chain = cy.contains('a', text).should('be.visible');
return href ? chain.and('have.attr', 'href', href) : chain;
}
const chain = cy.get(`a[href="${href}"]`).should('be.visible').and('have.attr', 'href', href);
return text ? chain.and('contain', text) : chain;
}

verifyButtonLink(href, buttonText) {
return this.verifyLink(href, buttonText, { findByText: true });
}

verifyElementContainsText(selector, text) {
return cy.contains(selector, text).should('exist');
}

verifyImageVisible(altText) {
return cy.get(`img[alt="${altText}"]`)
.should('be.visible')
.and('have.attr', 'src')
.should('not.be.empty');
}


Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

Extra blank line at the end of the class. This is inconsistent with the coding style seen in other page objects where there's only one blank line before the export statement.

Suggested change

Copilot uses AI. Check for mistakes.
}

export default BasePage;
6 changes: 3 additions & 3 deletions cypress/pages/BasePageTools.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
class BasePage {
visit(path) {
cy.visit(path);
visit() {
cy.visit('/');
}

getHeaderText(selector, expectedText) {
cy.get(selector).should('contain.text', expectedText);
}

getLink(href, text) {
return cy.contains(`a[href="${href}"]`, text)
return cy.contains(`a[href="${href}"]`, text)
.should('be.visible')
.and('have.attr', 'href', href);
}
Expand Down
7 changes: 5 additions & 2 deletions cypress/pages/BlogPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
class BlogPage {
import BasePage from './BasePage';

class BlogPage extends BasePage {
verifyPageLoaded() {
cy.contains('h1', 'Welcome to our blog!').should('be.visible');
this.verifyHeadingExists('Welcome to our blog!');
}
}

export default BlogPage;
7 changes: 5 additions & 2 deletions cypress/pages/CaseStudiesPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
class CaseStudiesPage {
import BasePage from './BasePage';

class CaseStudiesPage extends BasePage {
verifyPageLoaded() {
cy.contains('h1', 'Case Studies').should('be.visible');
this.verifyHeadingExists('Case Studies');
}
}

export default CaseStudiesPage;
8 changes: 5 additions & 3 deletions cypress/pages/CommunityPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
class CommunityPage {
import BasePage from './BasePage';

class CommunityPage extends BasePage {
verifyPageLoaded() {
cy.contains('h1','Home of #CommunityOps')
.should('be.visible');
this.verifyHeadingExists('Home of #CommunityOps');
}
}

export default CommunityPage;
6 changes: 3 additions & 3 deletions cypress/pages/Footer.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import BasePage from './BaseFooterPage';

class Footer extends BasePage {

constructor() {
super();
this.footerSelector = 'footer';
this.footerSelector = 'footer';
}

verifyFooterLink(href, text, attr = 'href') {
cy.get(this.footerSelector).within(() => {
cy.get(this.footerSelector).filter(':visible').first().within(() => {
this.verifyLink(href, text, attr);
});
}
Expand Down
7 changes: 5 additions & 2 deletions cypress/pages/RoadmapPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
class RoadmapPage {
import BasePage from './BasePage';

class RoadmapPage extends BasePage {
verifyPageLoaded() {
cy.contains('h1', 'AsyncAPI becomes the #1 API specification for defining and developing APIs.').should('be.visible');
this.verifyHeadingExists('AsyncAPI becomes the #1 API specification for defining and developing APIs.');
}
}

export default RoadmapPage;
19 changes: 3 additions & 16 deletions cypress/pages/ToolsPage.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import BasePage from './BasePageTools';
import BasePage from './BasePage';
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The import was changed from BasePageTools to BasePage, but the new BasePage class doesn't provide the getLink method that ToolsPage relies on (used in line 23 of the file). This will cause a runtime error when verifyToolLink is called. Either add the getLink method to the new BasePage class, or keep ToolsPage extending BasePageTools.

Copilot uses AI. Check for mistakes.

class ToolsPage extends BasePage {
visitToolsPage() {
super.visit('/tools');
}

verifyPageLoaded() {
cy.contains('h1', 'Tools').should('be.visible');
this.verifyHeadingExists('Tools');
}

verifyHeader() {
Expand All @@ -24,21 +24,8 @@ class ToolsPage extends BasePage {
.parents('.rounded-lg.border.shadow-md')
.first()
.within(() => {
cy.get('h2').should('contain', heading);
this.verifyHeadingExists(heading);
});
}

verifyWebsiteLinks(href, heading) {
this.verifyToolLink(href, heading, 'website');
}

verifyGithubLinks(href, heading) {
this.verifyToolLink(href, heading, 'github');
}

verifyDocsLinks(href, heading) {
this.verifyToolLink(href, heading, 'docs');
}
}

export default ToolsPage;
10 changes: 5 additions & 5 deletions cypress/pages/basepagedocs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class BasePage {
visit(path = '/') {
cy.visit(path);
visit() {
cy.visit('/');
}

verifyLinkByHref(href) {
Expand All @@ -11,9 +11,9 @@ class BasePage {
const wrap = cy.wrap($a);
return $a.prop('target') === '_self'
? wrap.invoke('removeAttr', 'target').click()
: wrap.click();
});
}
: wrap.click();
});
}

verifyLinkByLabel(href, label) {
cy.get(`a[href="${href}"]`).contains(label).click();
Expand Down
35 changes: 7 additions & 28 deletions cypress/pages/homepage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BasePage from './BasePage';
import CaseStudiesPage from './CaseStudiesPage';
import DocsPage from './DocsPage';
import RoadmapPage from './RoadmapPage';
Expand Down Expand Up @@ -34,30 +35,9 @@ const homepageLinks = features.flatMap((feature) =>
})),
);

class HomePage {
class HomePage extends BasePage {
visit() {
cy.visit('/');
}

verifyElementIsVisible(selector) {
cy.get(selector).should('be.visible');
}

verifyElementHasAttribute(selector, attribute, value) {
cy.get(selector).should('have.attr', attribute, value);
}

verifyHeadingExists(headingText) {
cy.contains('h1, h2, h3, h4, h5, h6', headingText).should('be.visible');
}

verifyLinkExists(linkName, linkUrl) {
cy.get('a')
.contains(linkName, { matchCase: false })
.should('exist')
.then(($el) => {
cy.wrap($el).invoke('attr', 'href').should('include', linkUrl);
});
return super.visit('/');
Copy link
Member

Choose a reason for hiding this comment

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

In line 43, can you remove the verifyLinkExists method and use the base class method now?

This is part of your existing code that you have already merged. Since we have enhanced our base classes now, can you please review all the methods and work you added earlier and check if any cleanup or changes are needed?

}

verifyCardTitles(customTitles, testId = null) {
Expand All @@ -71,21 +51,20 @@ class HomePage {
}

verifyNavbarLogo() {
this.verifyElementIsVisible('[data-testid="Navbar-logo"]');
return this.verifyElementIsVisible('[data-testid="Navbar-logo"]');
}

verifyHeader(text = headerText) {
this.verifyHeadingExists(text);
return this.verifyHeadingExists(text);
}

verifyGithubStarButton(link = githubStarLink) {
const selector = '[data-testid="Navbar-main"] [data-testid="Button-link"]';
this.verifyElementIsVisible(selector);
this.verifyElementHasAttribute(selector, 'href', link);
return this.verifyElementIsVisible(selector).and('have.attr', 'href', link);
}

verifyReadTheDocsButton(link = readDocsLink) {
cy.get(`[data-testid="Button-link"][href="${link}"]`).should('be.visible');
return cy.get(`[data-testid="Button-link"][href="${link}"]`).should('be.visible');
}

verifyHomepageCards(
Expand Down
12 changes: 12 additions & 0 deletions cypress/pages/toolsGenerator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import BasePage from './BasePage';
import toolsData from '../fixtures/toolsPages.json';

class ToolsGenerator extends BasePage {

Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

Empty line should be removed. This blank line between the class definition and the method is unnecessary and inconsistent with other page objects in the codebase (see toolsModelina.js, BasePage.js, etc.).

Suggested change

Copilot uses AI. Check for mistakes.
verifyGeneratorWorkflowDiagram() {
return this.verifyImageVisible(toolsData.generator.image);
}

}

export default ToolsGenerator;
Loading
Loading