Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9afd425
commit 15f42cf
Showing
3 changed files
with
47 additions
and
16 deletions.
There are no files selected for viewing
37 changes: 33 additions & 4 deletions
37
...rc/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/CleanupPoliciesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,54 @@ | ||
package com.evolveum.midpoint.testing.schrodinger.scenarios; | ||
|
||
import com.codeborne.selenide.Selenide; | ||
|
||
import com.evolveum.midpoint.schrodinger.MidPoint; | ||
import com.evolveum.midpoint.testing.schrodinger.AbstractSchrodingerTest; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
import java.io.File; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class CleanupPoliciesTest extends AbstractSchrodingerTest { | ||
|
||
public static final File CLOSED_TASKS_XML = new File("./src/test/resources/component/objects/tasks/closed-tasks.xml"); | ||
|
||
@Override | ||
protected List<File> getObjectListToImport(){ | ||
return Collections.singletonList(CLOSED_TASKS_XML); | ||
} | ||
|
||
@Test | ||
public void test00100closedTasksCleanup() { | ||
basicPage | ||
.listTasks() | ||
.table() | ||
.assertCurrentTableContains("ClosedTask1") | ||
.assertCurrentTableContains("ClosedTask2") | ||
.and() | ||
.cleanupPolicy() | ||
.closedTasksCleanupInterval("P6M"); | ||
basicPage | ||
.closedTasksCleanupInterval("P6M") | ||
.and() | ||
.clickSave() | ||
.feedback() | ||
.assertSuccess() | ||
.and() | ||
.listTasks() | ||
.table() | ||
.search() | ||
.byName() | ||
.inputValue("Cleanup task") | ||
.inputValue("Cleanup") | ||
.updateSearch() | ||
.and() | ||
.clickByName("Cleanup task") | ||
.clickByName("Cleanup") | ||
.clickRunNow(); | ||
Selenide.sleep(MidPoint.TIMEOUT_LONG_1_M); | ||
basicPage | ||
.listTasks() | ||
.table() | ||
.assertCurrentTableDoesntContain("ClosedTask1") | ||
.assertCurrentTableDoesntContain("ClosedTask2"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters