Skip to content

Commit

Permalink
[ACS-6234] Fix: GetProcessesCoreTests::getProcessesOrderedByIdDESC te…
Browse files Browse the repository at this point in the history
…st keeps failing (#2325)
  • Loading branch information
kmagdziarz authored Nov 17, 2023
1 parent 63ef313 commit 0d8b6ef
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@
import org.alfresco.rest.RestTest;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestProcessDefinitionModel;
import org.alfresco.rest.model.RestProcessModel;
import org.alfresco.rest.model.RestProcessModelsCollection;
import org.alfresco.utility.model.*;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Ignore;
import org.testng.annotations.Test;

import java.util.List;

/**
*
* @author Cristina Axinte
Expand Down Expand Up @@ -48,18 +44,16 @@ public void dataPreparation() throws Exception

@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
description = "Verify user gets all processes started by him ordered descending by id")
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION }, enabled = false)
@Ignore("Until ACS-6234 is done")
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION })
public void getProcessesOrderedByIdDESC()
{
RestProcessModelsCollection processes = restClient.authenticateUser(userWhoStartsTask).withParams("orderBy=id DESC")
.withWorkflowAPI().getProcesses();

restClient.assertStatusCodeIs(HttpStatus.OK);
processes.assertThat().entriesListIsNotEmpty();
List<RestProcessModel> processesList = processes.getEntries();
processesList.get(0).onModel().assertThat().field("id").is(process3.getId());
processesList.get(1).onModel().assertThat().field("id").is(task2.getProcessId());
processesList.get(2).onModel().assertThat().field("id").is(task1.getProcessId());
processes.assertThat().entriesListIsNotEmpty()
.and().entriesListIsSortedDescBy("id")
.and().entrySetContains("id", task1.getProcessId(), task2.getProcessId(), process3.getId());
}

@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
Expand Down

0 comments on commit 0d8b6ef

Please sign in to comment.