Skip to content

feat(mcp): introducing Serenity/JS MCP server #2912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

Copy link

qltysh bot commented Jul 29, 2025

❌ 3 blocking issues (3 total)

Tool Category Rule Count
qlty Duplication Found 25 lines of similar code in 3 locations (mass = 87) 3

Comment on lines +39 to +62
defineTool({
schema: {
name: 'serenity_web_navigate_back',
title: 'Navigate.back()',
description: 'Navigate back in the browser history',
inputSchema: z.object({
actorName: z.string().describe('The name of the actor performing the activity'),
}),
type: 'destructive',
},
handler: async (context: McpSessionContext, params) => {

await context.actorCalled(params.actorName).attemptsTo(
Navigate.back(),
);

return {
actor: params.actorName,
imports,
activities: [
`Navigate.back()`,
],
}
}
Copy link

Choose a reason for hiding this comment

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

Found 25 lines of similar code in 3 locations (mass = 87) [qlty:similar-code]

Comment on lines +65 to +88
defineTool({
schema: {
name: 'serenity_web_navigate_forward',
title: 'Navigate.back()',
description: 'Navigate forward in the browser history',
inputSchema: z.object({
actorName: z.string().describe('The name of the actor performing the activity'),
}),
type: 'destructive',
},
handler: async (context: McpSessionContext, params) => {

await context.actorCalled(params.actorName).attemptsTo(
Navigate.forward(),
);

return {
actor: params.actorName,
imports,
activities: [
`Navigate.forward()`,
],
}
}
Copy link

Choose a reason for hiding this comment

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

Found 25 lines of similar code in 3 locations (mass = 87) [qlty:similar-code]

Comment on lines +91 to +114
defineTool({
schema: {
name: 'serenity_web_navigate_reload_page',
title: 'Navigate.reloadPage()',
description: 'Reload the current page in the browser',
inputSchema: z.object({
actorName: z.string().describe('The name of the actor performing the activity'),
}),
type: 'destructive',
},
handler: async (context: McpSessionContext, params) => {

await context.actorCalled(params.actorName).attemptsTo(
Navigate.forward(),
);

return {
actor: params.actorName,
imports,
activities: [
`Navigate.reloadPage()`,
],
}
}
Copy link

Choose a reason for hiding this comment

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

Found 25 lines of similar code in 3 locations (mass = 87) [qlty:similar-code]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant