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
1 /*
2 * This software is in the public domain under CC0 1.0 Universal plus a
3 * Grant of Patent License.
4 *
5 * To the extent possible under law, author(s) have dedicated all
6 * copyright and related and neighboring rights to this software to the
7 * public domain worldwide. This software is distributed without any
8 * warranty.
9 *
10 * You should have received a copy of the CC0 Public Domain Dedication
11 * along with this software (see the LICENSE.md file). If not, see
12 * <http://creativecommons.org/publicdomain/zero/1.0/>.
13 */
14 package org.moqui.mcp
15
16 import groovy.transform.CompileStatic
17
18 /**
19 * MCP-specific ScreenTest interface for simulating screen web requests
20 * This is separate from the core Moqui ScreenTest system and tailored for MCP needs
21 */
22 @CompileStatic
23 interface McpScreenTest {
24 McpScreenTest rootScreen(String screenLocation)
25 McpScreenTest baseScreenPath(String screenPath)
26 McpScreenTest renderMode(String outputType)
27 McpScreenTest encoding(String characterEncoding)
28 McpScreenTest macroTemplate(String macroTemplateLocation)
29 McpScreenTest baseLinkUrl(String baseLinkUrl)
30 McpScreenTest servletContextPath(String scp)
31 McpScreenTest skipJsonSerialize(boolean skip)
32 McpScreenTest webappName(String wan)
33
34 McpScreenTestRender render(String screenPath, Map<String, Object> parameters, String requestMethod)
35 void renderAll(List<String> screenPathList, Map<String, Object> parameters, String requestMethod)
36
37 List<String> getNoRequiredParameterPaths(Set<String> screensToSkip)
38
39 long getRenderCount()
40 long getErrorCount()
41 long getRenderTotalChars()
42 long getStartTime()
43 }
...\ No newline at end of file ...\ No newline at end of file
1 /*
2 * This software is in the public domain under CC0 1.0 Universal plus a
3 * Grant of Patent License.
4 *
5 * To the extent possible under law, author(s) have dedicated all
6 * copyright and related and neighboring rights to this software to the
7 * public domain worldwide. This software is distributed without any
8 * warranty.
9 *
10 * You should have received a copy of the CC0 Public Domain Dedication
11 * along with this software (see the LICENSE.md file). If not, see
12 * <http://creativecommons.org/publicdomain/zero/1.0/>.
13 */
14 package org.moqui.mcp
15
16 import groovy.transform.CompileStatic
17 import org.moqui.screen.ScreenRender
18
19 /**
20 * MCP-specific ScreenTestRender interface for screen rendering results
21 * This is separate from the core Moqui ScreenTest system and tailored for MCP needs
22 */
23 @CompileStatic
24 interface McpScreenTestRender {
25 ScreenRender getScreenRender()
26 String getOutput()
27 Object getJsonObject()
28 long getRenderTime()
29 Map getPostRenderContext()
30 List<String> getErrorMessages()
31
32 boolean assertContains(String text)
33 boolean assertNotContains(String text)
34 boolean assertRegex(String regex)
35 }
...\ No newline at end of file ...\ No newline at end of file