Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
42 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
82a8927
Merge branch 'master' into toolsPage
anushkaaaaaaaa Feb 2, 2026
99cea89
implement suggestions by copilot
anushkaaaaaaaa Feb 4, 2026
3cf172a
Merge branch 'master' into toolsPage
anushkaaaaaaaa Feb 4, 2026
22b6a55
Merge branch 'master' into toolsPage
princerajpoot20 Feb 7, 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
31 changes: 31 additions & 0 deletions cypress/pages/toolsGenerator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class ToolsGeneratorPage {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: consider naming class consistently with file name. Reivew these naming in all the files

visit() {
cy.visit('/tools/generator');
}

verifyHeadingExists(text) {
Copy link
Member

Choose a reason for hiding this comment

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

VerifyHeadingExists is duplicated across multiple pages in this PR and also in the all the other PRs you have raised.

Consider extracting it into a shared base helper to keep things DRY and easier to maintain.

Copy link
Member

Choose a reason for hiding this comment

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

@princerajpoot20 can you please elaborate this more
I didn't get it

Copy link
Member

Choose a reason for hiding this comment

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

@sambhavgupta0705 This verifyHeadingExists function is duplicated in every file. It repeats the same logic again and again across multiple files and multiple PRs of @anushkaaaaaaaa. We need to remove this duplication and keep the code DRY.

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

verifyHeader() {
this.verifyHeadingExists('Docs, Code, Anything!');
}

verifyMainImage() {
cy.get('img[alt="generator diagram"]').should('be.visible');
}
Copy link
Member

Choose a reason for hiding this comment

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

consider asserting more strongly like src is non-empty. also please review the naming of function. What do you mean by mainImage?


verifyGithubLink() {
cy.contains('a', 'View on Github')
.should('be.visible')
.and('have.attr', 'href', 'https://www.github.com/asyncapi/generator');
}

verifyDocsLink() {
cy.contains('a', 'View Docs')
.should('be.visible')
.and('have.attr', 'href', '/docs/tools/generator');
}
}

export default ToolsGeneratorPage;
72 changes: 72 additions & 0 deletions cypress/pages/toolsMisc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
class ToolsMiscPage {
visitCli() {
cy.visit('/tools/cli');
}

visitParsers() {
cy.visit('/tools/parsers');
}

visitGithubActions() {
cy.visit('/tools/github-actions');
Copy link
Member

Choose a reason for hiding this comment

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

Please review these dedicated visit() methods that are everywhere. They are repeating the same stuff everywhere. Consider using a single helper like visit(path). This reduces repetition and makes your code DRY.

Please review all the methods in all the tests you have added via multiple PRs you have opened right now. If they can be extracted out into shared functions, it will make them reusable and keep the code DRY.

}

verifyHeadingExists(text) {
cy.contains('h1, h2, h3, h4, h5, h6', text).should('be.visible');
Copy link
Member

Choose a reason for hiding this comment

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

as mentioned earlier. please follow DRY principle

}

// CLI page checks
verifyCliHeader() {
this.verifyHeadingExists(
'Interact with AsyncAPI from the comfort of your CLI',
);
}

verifyCliGithubLink() {
cy.contains('a', 'View on Github')
.should('be.visible')
.and('have.attr', 'href', 'https://www.github.com/asyncapi/cli');
}

verifyCliDocsLink() {
cy.contains('a', 'View Docs')
.should('be.visible')
.and('have.attr', 'href', '/docs/tools/cli');
}
Copy link
Member

Choose a reason for hiding this comment

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

@anushkaaaaaaaa
As mentioned earlier,
all these can be removed. This is unnecessary repetition of code.
Make this a general function that takes parameters and move it to a shared folder so it can be used by everyone and you don’t have to write the same code again and again. Please refer to the DRY principle. This will make the code maintainable.

I have observed this across all your PRs that are open right now, so please review all your PRs for this.


verifyCliInstallSnippet() {
cy.contains('code', 'npm install -g @asyncapi/cli').should('exist');
}

// Parsers page checks
verifyParsersHeader() {
this.verifyHeadingExists('Build your own tools');
}

verifyParsersGithubLink() {
cy.contains('a', 'View on Github')
.should('be.visible')
.and('have.attr', 'href', 'https://www.github.com/asyncapi/parser-js');
}

verifyParsersInstallSnippet() {
cy.contains('code', 'npm install @asyncapi/parser').should('exist');
}

// GitHub Actions page checks
verifyGhActionsHeader() {
this.verifyHeadingExists('Automate using GitHub Actions');
}

verifyGhActionsGithubLink() {
cy.contains('a', 'View on Github')
.should('be.visible')
.and(
'have.attr',
'href',
'https://www.github.com/asyncapi/github-action-for-generator',
);
}
Copy link
Member

Choose a reason for hiding this comment

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

As mentioned above, you should avoid these and make a general function that takes parameters

}

export default ToolsMiscPage;
Copy link
Member

Choose a reason for hiding this comment

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

Please review this naming

31 changes: 31 additions & 0 deletions cypress/pages/toolsModelina.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class ToolsModelinaPage {
visit() {
cy.visit('/tools/modelina');
}

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

verifyHeader() {
this.verifyHeadingExists('Modelina');
}

verifyGithubLink() {
cy.contains('a', 'View on Github')
.should('be.visible')
.and('have.attr', 'href', 'https://www.github.com/asyncapi/modelina');
}

verifyTryItNowLink() {
cy.contains('a', 'Try it now')
.should('be.visible')
.and('have.attr', 'href', 'https://modelina.org/playground');
}

verifyInstallSnippet() {
Copy link
Member

Choose a reason for hiding this comment

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

I hope you are now able to understand the real benefit. If you had made general methods, you wouldn’t have to put repetitive effort into doing the same stuff. And most importantly, it makes the code maintainable.

cy.contains('code', 'npm install @asyncapi/modelina').should('exist');
}
}

export default ToolsModelinaPage;
25 changes: 25 additions & 0 deletions cypress/tools_generator.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import ToolsGeneratorPage from './pages/toolsGenerator';

describe('Tools - Generator Page', () => {
const page = new ToolsGeneratorPage();

beforeEach(() => {
page.visit();
});

it('User sees the main header', () => {
page.verifyHeader();
});

it('User sees the generator diagram image', () => {
page.verifyMainImage();
});

it('User verifies GitHub button link', () => {
page.verifyGithubLink();
});

it('User verifies Docs button link', () => {
page.verifyDocsLink();
});
});
56 changes: 56 additions & 0 deletions cypress/tools_misc.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import ToolsMiscPage from './pages/toolsMisc';

describe('Tools - CLI / Parsers / GitHub Actions', () => {
const page = new ToolsMiscPage();

describe('CLI', () => {
beforeEach(() => {
page.visitCli();
});

it('User sees the CLI header', () => {
page.verifyCliHeader();
});

it('User verifies CLI GitHub and Docs links', () => {
page.verifyCliGithubLink();
page.verifyCliDocsLink();
});

it('User sees CLI install snippet', () => {
page.verifyCliInstallSnippet();
});
});

describe('Parsers', () => {
beforeEach(() => {
page.visitParsers();
});

it('User sees the Parsers header', () => {
page.verifyParsersHeader();
});

it('User verifies Parsers GitHub link', () => {
page.verifyParsersGithubLink();
});

it('User sees Parsers install snippet', () => {
page.verifyParsersInstallSnippet();
});
});

describe('GitHub Actions', () => {
beforeEach(() => {
page.visitGithubActions();
});

it('User sees the GitHub Actions header', () => {
page.verifyGhActionsHeader();
});

it('User verifies GitHub Actions GitHub link', () => {
page.verifyGhActionsGithubLink();
});
});
});
25 changes: 25 additions & 0 deletions cypress/tools_modelina.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import ToolsModelinaPage from './pages/toolsModelina';

describe('Tools - Modelina Page', () => {
const page = new ToolsModelinaPage();

beforeEach(() => {
page.visit();
});

it('User sees the main header and intro', () => {
page.verifyHeader();
});

it('User sees install snippet', () => {
page.verifyInstallSnippet();
});

it('User verifies GitHub button link', () => {
page.verifyGithubLink();
});

it('User verifies Try it now link', () => {
page.verifyTryItNowLink();
});
});
Loading