Skip to content
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

Fix WebViewsIT #5388

Merged
merged 1 commit into from
Mar 10, 2025
Merged

Fix WebViewsIT #5388

merged 1 commit into from
Mar 10, 2025

Conversation

DomGarguilo
Copy link
Member

In #5351 the URL parameter to request a page for a specific table changed from tableID to tableId. This PR updates the IT to the correct expected param tableId.

I also took this opportunity to make one var final in the test and remove an exception that wasn't being thrown.

@DomGarguilo DomGarguilo added this to the 4.0.0 milestone Mar 7, 2025
@DomGarguilo DomGarguilo self-assigned this Mar 7, 2025
// Using the mocks we can verify that the getModel method gets called via debugger
// however it's difficult to continue to mock through the jersey MVC code for the properly built
// response.
// Our silly HashMapWriter registered in the configure method gets wired in and used here.
Response output = target("tables/foo").request().get();
assertEquals(200, output.getStatus(), "should return status 200");
String responseBody = output.readEntity(String.class);
assertTrue(responseBody.contains("tableID=foo") && responseBody.contains("table=bar"));
assertTrue(responseBody.contains("tableId=foo") && responseBody.contains("table=bar"));
Copy link
Contributor

Choose a reason for hiding this comment

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

could a constant be used for tableId?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea I was thinking about this too. It seems like a good improvement. It would probably be helpful and make the code safer but would be a lot more changes. I'll merge this PR to get the test passing in the build and then create a follow on to add constants for all of the parameters in this category.

Copy link
Member Author

Choose a reason for hiding this comment

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

Created #5394 to track this.

@DomGarguilo DomGarguilo merged commit 2af8abf into apache:main Mar 10, 2025
8 checks passed
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.

2 participants