/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation. All rights reserved. This program and
 * the accompanying materials are made available under the terms of the Eclipse
 * Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: Actuate Corporation - initial API and implementation
 ******************************************************************************/

package org.eclipse.birt.report.tests.model.regression;

import org.eclipse.birt.report.model.api.DesignFileException;
import org.eclipse.birt.report.model.api.LabelHandle;
import org.eclipse.birt.report.model.api.StyleHandle;
import org.eclipse.birt.report.tests.model.BaseTestCase;

/**
 * Regression description:
 * <p>
 * Description: Page break compatibility issue for left and right.
 * <p>
 * Steps to reproduce:
 * <ol>
 * <li>Open some old design files with page break set to left or right.
 * <li>Preview
 * </ol>
 * <p>
 * <b>Expected result:</b>
 * <p>
 * Since left and right are not supported now, they should be identified as
 * always.
 * <p>
 * <b>Actual result:</b>
 * <p>
 * They were omitted.
 * <p>
 * Test description:
 * <p>
 * Open an old report, the report contains a label with page break before/after
 * set to left and right respectively, make sure they are correctly parsed and
 * provide compatibility
 * <p>
 */
public class Regression_136519 extends BaseTestCase
{

	private final static String INPUT = "regression_136519.xml"; //$NON-NLS-1$

	protected void setUp( ) throws Exception
	{
		super.setUp( );
		removeResource( );
		
		// retrieve two input files from tests-model.jar file
		copyResource_INPUT( INPUT , INPUT );
		
	}
	/**
	 * @throws DesignFileException
	 */
	
	public void test_regression_136519( ) throws DesignFileException
	{
		openDesign( INPUT );
		LabelHandle label = (LabelHandle) designHandle.findElement( "l1" ); //$NON-NLS-1$
		
		assertEquals( "left", label.getStringProperty( StyleHandle.PAGE_BREAK_AFTER_PROP )); //$NON-NLS-1$
		assertEquals( "right", label.getStringProperty( StyleHandle.PAGE_BREAK_BEFORE_PROP )); //$NON-NLS-1$
	}
}

@@ -363,15 +363,8 @@
 html
-%0A * %0A *
  Con
@@ -395,16 +395,19 @@
 ration -
+%0A *
  initial
@@ -1675,112 +1675,13 @@
  );%0A
-%09%09%0A%09%09// retrieve two input files from tests-model.jar file%0A%09%09copyResource_INPUT( INPUT , INPUT );%0A%09%09
 %0A
+
 %09%7D%0A
+%0A
 %09/**
@@ -1718,18 +1718,17 @@
 on%0A%09 */%0A
-%09
 %0A
+
 %09public 
@@ -1895,18 +1895,16 @@
 -NLS-1$%0A
-%09%09
 %0A%09%09asser
@@ -1913,20 +1913,22 @@
 quals( %22
-left
+always
 %22, label
@@ -1978,24 +1978,25 @@
 AFTER_PROP )
+ 
 ); //$NON-NL
@@ -2017,21 +2017,22 @@
 quals( %22
-right
+always
 %22, label
@@ -2087,16 +2087,17 @@
 E_PROP )
+ 
 ); //$NO

fix failure test case