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

LPS-137357 Add graphQL integration test for reindex/statuses #105731

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -15,6 +15,8 @@
package com.liferay.portal.workflow.metrics.rest.resource.v1_0.test;

import com.liferay.arquillian.extension.junit.bridge.junit.Arquillian;
import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.json.JSONUtil;
import com.liferay.portal.kernel.test.rule.DataGuard;
import com.liferay.portal.search.test.util.SearchTestRule;
import com.liferay.portal.workflow.metrics.rest.client.dto.v1_0.ReindexStatus;
Expand Down Expand Up @@ -51,9 +53,13 @@ public void testGetReindexStatusesPage() throws Exception {
@Override
@Test
public void testGraphQLGetReindexStatusesPage() throws Exception {
JSONObject reindexStatusesJSONObject = JSONUtil.getValueAsJSONObject(
invokeGraphQLQuery(
new GraphQLField(
"reindexStatuses", new GraphQLField("totalCount"))),
"JSONObject/data", "JSONObject/reindexStatuses");

// TODO

Assert.assertEquals(0, reindexStatusesJSONObject.get("totalCount"));
}

@Rule
Expand Down
Expand Up @@ -3200,7 +3200,6 @@ definition {
}

@description = "LRQA-58272 Automate LPS-107777: Move Workflow Metrics reindex actions out of the Search Settings"
@ignore = "true"
@priority = "5"
test WorkflowMetricsReindex {
property portal.acceptance = "true";
Expand Down
Expand Up @@ -24,7 +24,7 @@ const useReindexActions = () => {
const schedule = useInterval();
const toaster = useToaster();

const {fetchData} = useFetch({url: '/indexes/reindex/status'});
const {fetchData} = useFetch({url: '/reindex/statuses'});
const {patchData} = usePatch({url: '/indexes/reindex'});

const getReindexStatus = (key) =>
Expand Down