Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Mar 24, 2020
2 parents 60328c4 + da85524 commit 1773543
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
Expand Up @@ -192,6 +192,7 @@ public static AssignmentEditorDto createDtoFromObject(ObjectType object, UserDto
if (relation != null){
targetRef.setRelation(relation);
}
targetRef.asReferenceValue().setObject(object.asPrismObject());

AssignmentType assignment = new AssignmentType();
assignment.setTargetRef(targetRef);
Expand Down
Expand Up @@ -16,6 +16,8 @@
import org.apache.wicket.request.mapper.parameter.IPageParametersEncoder;
import org.apache.wicket.request.mapper.parameter.PageParametersEncoder;

import java.util.List;

/**
* Created by lazyman on 09/03/2017.
*/
Expand All @@ -41,6 +43,10 @@ protected boolean urlStartsWithMountedSegments(Url url) {
if (url == null) {
return false;
}
int segmentsSize = url.getSegments().size();
if (segmentsSize != 0 && StringUtils.isBlank(url.getSegments().get(segmentsSize-1))) {
url.getSegments().remove(segmentsSize-1);
}

if (!(pageParametersEncoder instanceof PageParametersEncoder)) {
LOG.trace("Matching using standard mounted mapper for '{}'", url);
Expand Down
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2010-2020 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.testing.schrodinger.page;

import com.evolveum.midpoint.schrodinger.component.common.FeedbackBox;
import com.evolveum.midpoint.schrodinger.page.login.FormLoginPage;
import com.evolveum.midpoint.testing.schrodinger.AbstractSchrodingerTest;

import org.testng.Assert;
import org.testng.annotations.Test;

import static com.codeborne.selenide.Selenide.open;

/**
* @author skublik
*/

public class HomePageTest extends AbstractSchrodingerTest {

@Test
public void test001OpenPageWithSlashOnEndOfUrl() {
open("/self/dashboard/");
//when request will be redirect to error page, then couldn't click on home menu button
basicPage.home();
}

@Test
public void test002OpenPageWithoutSlashOnEndOfUrl() {
open("/self/dashboard");
//when request will be redirect to error page, then couldn't click on home menu button
basicPage.home();
}
}
5 changes: 5 additions & 0 deletions testing/schrodingertest/testng-integration.xml
Expand Up @@ -98,4 +98,9 @@
<class name="com.evolveum.midpoint.testing.schrodinger.ImportTest"/>
</classes>
</test>
<test name="Schrodinger.page.HomePageTest" preserve-order="true" parallel="false" verbose="3" enabled="true">
<classes>
<class name="com.evolveum.midpoint.testing.schrodinger.page.HomePageTest"/>
</classes>
</test>
</suite>

0 comments on commit 1773543

Please sign in to comment.