5b1380c7 by Ean Schuessler

Fix compilation error by creating MCP-specific screen test infrastructure

- Created McpScreenTest and McpScreenTestRender interfaces
- Rewrote CustomScreenTestImpl to implement MCP-specific interfaces instead of extending framework's buggy ScreenTestImpl
- Added all required interface methods for complete functionality
- Resolves @Override annotation error on non-existent makeWebFacade method
- Maintains MCP functionality while providing independent screen test capabilities
1 parent fefecf27
/*
* This software is in the public domain under CC0 1.0 Universal plus a
* Grant of Patent License.
*
* To the extent possible under law, author(s) have dedicated all
* copyright and related and neighboring rights to this software to the
* public domain worldwide. This software is distributed without any
* warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication
* along with this software (see the LICENSE.md file). If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
package org.moqui.mcp
import groovy.transform.CompileStatic
/**
* MCP-specific ScreenTest interface for simulating screen web requests
* This is separate from the core Moqui ScreenTest system and tailored for MCP needs
*/
@CompileStatic
interface McpScreenTest {
McpScreenTest rootScreen(String screenLocation)
McpScreenTest baseScreenPath(String screenPath)
McpScreenTest renderMode(String outputType)
McpScreenTest encoding(String characterEncoding)
McpScreenTest macroTemplate(String macroTemplateLocation)
McpScreenTest baseLinkUrl(String baseLinkUrl)
McpScreenTest servletContextPath(String scp)
McpScreenTest skipJsonSerialize(boolean skip)
McpScreenTest webappName(String wan)
McpScreenTestRender render(String screenPath, Map<String, Object> parameters, String requestMethod)
void renderAll(List<String> screenPathList, Map<String, Object> parameters, String requestMethod)
List<String> getNoRequiredParameterPaths(Set<String> screensToSkip)
long getRenderCount()
long getErrorCount()
long getRenderTotalChars()
long getStartTime()
}
\ No newline at end of file
/*
* This software is in the public domain under CC0 1.0 Universal plus a
* Grant of Patent License.
*
* To the extent possible under law, author(s) have dedicated all
* copyright and related and neighboring rights to this software to the
* public domain worldwide. This software is distributed without any
* warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication
* along with this software (see the LICENSE.md file). If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
package org.moqui.mcp
import groovy.transform.CompileStatic
import org.moqui.screen.ScreenRender
/**
* MCP-specific ScreenTestRender interface for screen rendering results
* This is separate from the core Moqui ScreenTest system and tailored for MCP needs
*/
@CompileStatic
interface McpScreenTestRender {
ScreenRender getScreenRender()
String getOutput()
Object getJsonObject()
long getRenderTime()
Map getPostRenderContext()
List<String> getErrorMessages()
boolean assertContains(String text)
boolean assertNotContains(String text)
boolean assertRegex(String regex)
}
\ No newline at end of file