Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarTodayViewPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarTodayViewPage.java	(revision 3782)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarTodayViewPage.java	(revision 4864)
@@ -3,5 +3,4 @@
 import org.expressolivre.cte.pages.common.Page;
 import org.openqa.selenium.WebDriver;
-
 
 /**
@@ -18,3 +17,16 @@
 	}
 
+	/**
+	 * Procura o "id" do compromisso baseado no titulo do mesmo.
+	 * 
+	 * @param title
+	 *            Titulo do compromisso.
+	 * @return "id" do compromisso.
+	 */
+	public String getAppointmentId(String title) {
+		String source = driver.getPageSource();
+		int i = source.indexOf("\"title\":\"" + title);
+		int j = source.indexOf("\"id\":", i);
+		return source.substring(j + 5, source.indexOf(",", j));
+	}
 }
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentViewPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentViewPage.java	(revision 4864)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentViewPage.java	(revision 4864)
@@ -0,0 +1,147 @@
+package org.expressolivre.cte.pages.calendar;
+
+import org.expressolivre.cte.pages.common.Page;
+import org.openqa.selenium.Alert;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+import org.testng.Assert;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jul 25, 2011 at 2:25:28 PM
+ * 
+ */
+public class AppointmentViewPage extends Page {
+
+	@FindBy(xpath = "//table[@id='calendar_viewevent_button_left']/tbody/tr/td[1]/nobr/form/div/input[@id='']")
+	private WebElement editButton;
+
+	@FindBy(xpath = "//table[@id='calendar_viewevent_button_left']/tbody/tr/td[2]/nobr/form/div/input[@id='']")
+	private WebElement readyButton;
+
+	@FindBy(xpath = "//table[@id='calendar_viewevent_button_center']/tbody/tr/td[1]/nobr/form/div/input[@id='']")
+	private WebElement alarmManagerButton;
+
+	@FindBy(xpath = "//table[@id='calendar_viewevent_button_center']/tbody/tr/td[2]/nobr/form/div/input[@id='']")
+	private WebElement exportButton;
+
+	@FindBy(xpath = "//table[@id='calendar_viewevent_button_right']/tbody/tr/td/nobr/form/div/input[@id='']")
+	private WebElement removeButton;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[1]/td[2]")
+	private WebElement title;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[2]/td[2]")
+	private WebElement startTime;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[3]/td[2]")
+	private WebElement endTime;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[4]/td[2]")
+	private WebElement priority;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[5]/td[2]")
+	private WebElement accessType;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[6]/td[2]")
+	private WebElement participants;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[7]/td[2]")
+	private WebElement createdBy;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[8]/td[2]")
+	private WebElement updatedOn;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[9]/td[2]")
+	private WebElement lastUpdateBy;
+
+	@FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[10]/td[2]")
+	private WebElement attachments;
+
+	public AppointmentViewPage(WebDriver driver) {
+		super(driver);
+		// TODO Auto-generated constructor stub
+	}
+
+	public void removeAppointment() {
+		this.removeButton.click();
+		Alert alert = driver.switchTo().alert();
+		Assert.assertEquals(
+				alert.getText(),
+				"Tem certeza que deseja remover esta entrada?\nIsto irÃ¡ remover esta entrada para todos usuÃ¡rios.");
+		alert.accept();
+	}
+
+	/**
+	 * @return the title
+	 */
+	public String getTitle() {
+		return title.getText();
+	}
+
+	/**
+	 * @return the startTime
+	 */
+	public String getStartTime() {
+		return startTime.getText();
+	}
+
+	/**
+	 * @return the endTime
+	 */
+	public String getEndTime() {
+		return endTime.getText();
+	}
+
+	/**
+	 * @return the priority
+	 */
+	public String getPriority() {
+		return priority.getText();
+	}
+
+	/**
+	 * @return the accessType
+	 */
+	public String getAccessType() {
+		return accessType.getText();
+	}
+
+	/**
+	 * @return the participants
+	 */
+	public String getParticipants() {
+		return participants.getText();
+	}
+
+	/**
+	 * @return the createdBy
+	 */
+	public String getCreatedBy() {
+		return createdBy.getText();
+	}
+
+	/**
+	 * @return the updatedOn
+	 */
+	public String getUpdatedOn() {
+		return updatedOn.getText();
+	}
+
+	/**
+	 * @return the lastUpdateBy
+	 */
+	public String getLastUpdateBy() {
+		return lastUpdateBy.getText();
+	}
+
+	/**
+	 * @return the attachments
+	 */
+	public String getAttachments() {
+		return attachments.getText();
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarPage.java	(revision 3782)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarPage.java	(revision 4864)
@@ -7,5 +7,5 @@
 import org.openqa.selenium.WebElement;
 import org.openqa.selenium.support.FindBy;
-
+import org.openqa.selenium.support.PageFactory;
 
 /**
@@ -26,14 +26,19 @@
 	}
 
-	public void openTodayView() {
+	public CalendarTodayViewPage openTodayView() {
 		super.clickElement(By
 				.xpath("//table[@id='calendar_head_table']/tbody/tr/td[2]/a/img"));
+		return PageFactory.initElements(driver, CalendarTodayViewPage.class);
 	}
 
 	public void openAppointmentPage(String date) {
-		System.out.println(Constants.URL
-				+ "/index.php?menuaction=calendar.uicalendar.add&date=" + date);
 		driver.get(Constants.URL
 				+ "/index.php?menuaction=calendar.uicalendar.add&date=" + date);
 	}
+
+	public AppointmentViewPage openAppointmentViewPage(String id) {
+		driver.get(Constants.URL
+				+ "/index.php?menuaction=calendar.uicalendar.view&cal_id=" + id);
+		return PageFactory.initElements(driver, AppointmentViewPage.class);
+	}
 }
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentPage.java	(revision 3782)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentPage.java	(revision 4864)
@@ -5,5 +5,4 @@
 import org.openqa.selenium.WebElement;
 import org.openqa.selenium.support.FindBy;
-
 
 /**
@@ -15,4 +14,8 @@
 public class AppointmentPage extends Page {
 
+	/** Mensagens de validacao do formulario. */
+	@FindBy(id = "formStatus")
+	private WebElement formStatus;
+
 	/** Tipo do evento. */
 	@FindBy(id = "cal[type]")
@@ -106,4 +109,11 @@
 
 	/**
+	 * @return Retorna o texto de validacao do formulario.
+	 */
+	public String getFormStatus() {
+		return this.formStatus.getText();
+	}
+
+	/**
 	 * @param type
 	 *            the type to set
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/filtro/ExcluirFiltroForaDoEscritorioTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/filtro/ExcluirFiltroForaDoEscritorioTestCase.java	(revision 4780)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/filtro/ExcluirFiltroForaDoEscritorioTestCase.java	(revision 4864)
@@ -24,4 +24,6 @@
 	@Test
 	public void excluirFiltroForaDoEscritorio() throws Exception {
+		mp.assertMessage(MSG_EMAIL_FILTRO_FORA_ESCRITORIO_ATIVADO);
+
 		MailFilterPage mfp = mp.editFilter();
 		mfp.selectOutOfOfficeFilterRule();
@@ -30,5 +32,10 @@
 		// Garantir que a regra foi excluida e nao aparece na tela.
 		Assert.assertFalse(mfp.isElementPresent(By.id("out_0")));
+
+		mp.waitLoading();
+
+		mp.isNotDisplayed(mp.waitFindElement(By.id("em_div_write_msg"), 5000,
+				1000));
+
 	}
-
 }
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/MailPreferencesTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/MailPreferencesTestCase.java	(revision 4780)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/MailPreferencesTestCase.java	(revision 4864)
@@ -6,5 +6,5 @@
 
 import org.apache.commons.lang.StringUtils;
-import org.expressolivre.cte.common.BaseTestCase;
+import org.expressolivre.cte.common.BaseEmailTestCase;
 import org.expressolivre.cte.common.Config;
 import org.expressolivre.cte.common.IOUtil;
@@ -19,5 +19,5 @@
  * 
  */
-public class MailPreferencesTestCase extends BaseTestCase {
+public class MailPreferencesTestCase extends BaseEmailTestCase {
 
 	/**
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/MailAdminPreferencesTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/MailAdminPreferencesTestCase.java	(revision 4627)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/email/MailAdminPreferencesTestCase.java	(revision 4864)
@@ -5,5 +5,5 @@
 
 import org.apache.commons.lang.StringUtils;
-import org.expressolivre.cte.common.BaseTestCase;
+import org.expressolivre.cte.common.BaseEmailTestCase;
 import org.expressolivre.cte.common.Config;
 import org.expressolivre.cte.pages.email.MailAdminPreferencesPage;
@@ -16,5 +16,5 @@
  * 
  */
-public class MailAdminPreferencesTestCase extends BaseTestCase {
+public class MailAdminPreferencesTestCase extends BaseEmailTestCase {
 
 	/**
@@ -39,7 +39,7 @@
 	}
 
-	private void setPreferences(MailAdminPreferencesPage prefs,
-			String pref) throws IllegalArgumentException,
-			IllegalAccessException, InvocationTargetException {
+	private void setPreferences(MailAdminPreferencesPage prefs, String pref)
+			throws IllegalArgumentException, IllegalAccessException,
+			InvocationTargetException {
 		// Percorre todos os metodos "setters" da classe
 		// ExpressoMailAdminPreferencesPage para mudar o valor de cada
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseCalendarTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseCalendarTestCase.java	(revision 3799)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseCalendarTestCase.java	(revision 4864)
@@ -6,5 +6,5 @@
 import org.expressolivre.cte.pages.common.HomePage;
 import org.openqa.selenium.support.PageFactory;
-import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 
 /**
@@ -24,5 +24,5 @@
 	 * inicializar componentes da pagina.
 	 */
-	@Test
+	@BeforeMethod
 	public void init() {
 		HomePage hp = PageFactory.initElements(driver, HomePage.class);
@@ -40,3 +40,22 @@
 		return PageFactory.initElements(driver, AppointmentPage.class);
 	}
+
+	public AppointmentPage adicionarCompromisso(String data, String tipo,
+			String titulo, String dataInicial, String horaInicial,
+			String minutoInicial, String dataFinal, String horaFinal,
+			String minutoFinal, String prioridade) {
+
+		AppointmentPage ap = newAppointment(data);
+		ap.setType(tipo);
+		ap.setTitle(titulo);
+		ap.setStartDate(dataInicial);
+		ap.setStartHour(horaInicial);
+		ap.setStartMinute(minutoInicial);
+		ap.setEndDate(dataFinal);
+		ap.setEndHour(horaFinal);
+		ap.setEndMinute(minutoFinal);
+		ap.setPriority(prioridade);
+
+		return ap;
+	}
 }
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseTestCase.java	(revision 4780)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseTestCase.java	(revision 4864)
@@ -5,6 +5,4 @@
 import org.expressolivre.cte.pages.common.LoginPage;
 import org.expressolivre.cte.pages.common.PreferencesPage;
-import org.expressolivre.cte.pages.email.MailAdminPreferencesPage;
-import org.expressolivre.cte.pages.email.MailPreferencesPage;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebDriver;
@@ -37,4 +35,14 @@
 	@BeforeSuite
 	public void beforeSuite() {
+		// Use code below to run through a proxy.
+		// Value for network.proxy.http_port should be integer (no quotes should
+		// be used) and network.proxy.type should be set as 1 (ProxyType.MANUAL,
+		// Manual proxy settings)
+		// FirefoxProfile profile = new FirefoxProfile();
+		// profile.setPreference("network.proxy.type", 1);
+		// profile.setPreference("network.proxy.http", "10.200.113.61");
+		// profile.setPreference("network.proxy.http_port", 3128);
+		// driver = new FirefoxDriver(profile);
+
 		driver = new FirefoxDriver();
 		driver.get(URL);
@@ -74,44 +82,4 @@
 		driver.get(URL_PREFERENCES);
 		return PageFactory.initElements(driver, PreferencesPage.class);
-	}
-
-	/**
-	 * Abre pagina de preferencias do modulo ExpressoMail
-	 * 
-	 * @return
-	 */
-	public MailPreferencesPage openEmailPreferencesPage() {
-		driver.get(URL_PREFERENCES_EMAIL);
-		return PageFactory.initElements(driver, MailPreferencesPage.class);
-	}
-
-	/**
-	 * Abre pagina de preferencias administrativas do modulo ExpressoMail.
-	 * 
-	 * @return
-	 */
-	public MailAdminPreferencesPage openEmailAdminPreferencesPage() {
-		driver.get(URL_PREFERENCES_EMAIL);
-		return PageFactory.initElements(driver, MailAdminPreferencesPage.class);
-	}
-
-	/**
-	 * Abre pagina de preferencias administrativas do modulo ExpressoMail.
-	 * 
-	 * @return
-	 */
-	public MailAdminPreferencesPage openEmailAdminDefaultPreferencesPage() {
-		driver.get(URL_DEFAULT_PREFERENCES_EMAIL);
-		return PageFactory.initElements(driver, MailAdminPreferencesPage.class);
-	}
-
-	/**
-	 * Abre pagina de preferencias administrativas do modulo ExpressoMail.
-	 * 
-	 * @return
-	 */
-	public MailAdminPreferencesPage openEmailAdminForcedPreferencesPage() {
-		driver.get(URL_FORCED_PREFERENCES_EMAIL);
-		return PageFactory.initElements(driver, MailAdminPreferencesPage.class);
 	}
 
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseEmailTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseEmailTestCase.java	(revision 4527)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/BaseEmailTestCase.java	(revision 4864)
@@ -2,5 +2,7 @@
 
 import org.expressolivre.cte.pages.common.HomePage;
+import org.expressolivre.cte.pages.email.MailAdminPreferencesPage;
 import org.expressolivre.cte.pages.email.MailPage;
+import org.expressolivre.cte.pages.email.MailPreferencesPage;
 import org.openqa.selenium.support.PageFactory;
 import org.testng.annotations.BeforeMethod;
@@ -30,3 +32,43 @@
 	}
 
+	/**
+	 * Abre pagina de preferencias do modulo ExpressoMail
+	 * 
+	 * @return
+	 */
+	public MailPreferencesPage openEmailPreferencesPage() {
+		driver.get(URL_PREFERENCES_EMAIL);
+		return PageFactory.initElements(driver, MailPreferencesPage.class);
+	}
+
+	/**
+	 * Abre pagina de preferencias administrativas do modulo ExpressoMail.
+	 * 
+	 * @return
+	 */
+	public MailAdminPreferencesPage openEmailAdminPreferencesPage() {
+		driver.get(URL_PREFERENCES_EMAIL);
+		return PageFactory.initElements(driver, MailAdminPreferencesPage.class);
+	}
+
+	/**
+	 * Abre pagina de preferencias administrativas do modulo ExpressoMail.
+	 * 
+	 * @return
+	 */
+	public MailAdminPreferencesPage openEmailAdminDefaultPreferencesPage() {
+		driver.get(URL_DEFAULT_PREFERENCES_EMAIL);
+		return PageFactory.initElements(driver, MailAdminPreferencesPage.class);
+	}
+
+	/**
+	 * Abre pagina de preferencias administrativas do modulo ExpressoMail.
+	 * 
+	 * @return
+	 */
+	public MailAdminPreferencesPage openEmailAdminForcedPreferencesPage() {
+		driver.get(URL_FORCED_PREFERENCES_EMAIL);
+		return PageFactory.initElements(driver, MailAdminPreferencesPage.class);
+	}
+
 }
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoTestCase.java	(revision 4864)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoTestCase.java	(revision 4864)
@@ -0,0 +1,57 @@
+package org.expressolivre.cte.calendar;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.expressolivre.cte.common.BaseCalendarTestCase;
+import org.expressolivre.cte.pages.calendar.AppointmentPage;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * Suite:[FUN03.2] Adicionar Compromisso
+ * 
+ * Caso de Teste: EL-938:Adicionar compromisso
+ * 
+ * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
+ * testcase&id=EL-938
+ * 
+ * Caso de Teste: EL-939:Adicionar compromisso do tipo privado
+ * 
+ * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
+ * testcase&id=EL-939
+ * 
+ * Caso de Teste: EL-1265:Adicionar compromisso do tipo restrito
+ * 
+ * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
+ * testcase&id=EL-1265
+ * 
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 8, 2011 at 9:36:08 AM
+ * 
+ */
+public class AdicionarCompromissoTestCase extends BaseCalendarTestCase {
+
+	@Parameters({ "tipo", "titulo", "horaInicial", "minutoInicial",
+			"horaFinal", "minutoFinal", "prioridade" })
+	@Test
+	public void adicionarCompromissoDataCorrente(
+			@Optional("Normal") String tipo, String titulo, String horaInicial,
+			String minutoInicial, String horaFinal, String minutoFinal,
+			@Optional("Normal") String prioridade) {
+
+		// Pega data corrente.
+		Calendar cal = Calendar.getInstance();
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+		SimpleDateFormat sdf2 = new SimpleDateFormat("dd/MM/yyyy");
+
+		AppointmentPage ap = super.adicionarCompromisso(
+				sdf.format(cal.getTime()), tipo, titulo,
+				sdf2.format(cal.getTime()), horaInicial, minutoInicial,
+				sdf2.format(cal.getTime()), horaFinal, minutoFinal, prioridade);
+
+		ap.saveAppointment();
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/RemoverCompromissoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/RemoverCompromissoTestCase.java	(revision 4864)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/RemoverCompromissoTestCase.java	(revision 4864)
@@ -0,0 +1,35 @@
+package org.expressolivre.cte.calendar;
+
+import org.expressolivre.cte.common.BaseCalendarTestCase;
+import org.expressolivre.cte.pages.calendar.AppointmentViewPage;
+import org.expressolivre.cte.pages.calendar.CalendarTodayViewPage;
+import org.testng.Assert;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * Caso de Teste: EL-970:Remover compromisso
+ * 
+ * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
+ * testcase&id=EL-970
+ * 
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jul 26, 2011 at 9:49:05 AM
+ * 
+ */
+public class RemoverCompromissoTestCase extends BaseCalendarTestCase {
+
+	@Parameters({ "titulo" })
+	@Test
+	public void exibirCompromisso(String titulo) {
+		CalendarTodayViewPage ctvp = super.openTodayView();
+		String id = ctvp.getAppointmentId(titulo);
+
+		AppointmentViewPage avp = cp.openAppointmentViewPage(id);
+		Assert.assertEquals(avp.getTitle(), titulo);
+
+		avp.removeAppointment();
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoDataFinalMenorDataInicialTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoDataFinalMenorDataInicialTestCase.java	(revision 4864)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoDataFinalMenorDataInicialTestCase.java	(revision 4864)
@@ -0,0 +1,57 @@
+package org.expressolivre.cte.calendar;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.expressolivre.cte.common.BaseCalendarTestCase;
+import org.expressolivre.cte.pages.calendar.AppointmentPage;
+import org.testng.Assert;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * Suite:[FUN03.2] Adicionar Compromisso
+ * 
+ * Caso de Teste: EL-947:Adicionar compromisso com data final menor que data
+ * inicial
+ * 
+ * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
+ * testcase&id=EL-947
+ * 
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jul 26, 2011 at 10:45:08 AM
+ * 
+ */
+public class AdicionarCompromissoDataFinalMenorDataInicialTestCase extends
+		BaseCalendarTestCase {
+
+	@Parameters({ "tipo", "titulo", "horaInicial", "minutoInicial",
+			"horaFinal", "minutoFinal", "prioridade" })
+	@Test
+	public void adicionarCompromissoComDataFinalMenorQueDataInicial(
+			@Optional("Normal") String tipo, String titulo, String horaInicial,
+			String minutoInicial, String horaFinal, String minutoFinal,
+			@Optional("Normal") String prioridade) {
+
+		// Pega data corrente.
+		Calendar cal = Calendar.getInstance();
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+		SimpleDateFormat sdf2 = new SimpleDateFormat("dd/MM/yyyy");
+
+		String dataInicial = sdf2.format(cal.getTime());
+		cal.add(Calendar.DATE, -1);
+		String dataFinal = sdf2.format(cal.getTime());
+
+		AppointmentPage ap = super.adicionarCompromisso(
+				sdf.format(cal.getTime()), tipo, titulo, dataInicial,
+				horaInicial, minutoInicial, dataFinal, horaFinal, minutoFinal,
+				prioridade);
+		ap.saveAppointment();
+
+		Assert.assertEquals("VocÃª informou uma data invÃ¡lida.",
+				ap.getFormStatus());
+
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoHoraFinalMenorHoraInicialTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoHoraFinalMenorHoraInicialTestCase.java	(revision 4864)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromissoHoraFinalMenorHoraInicialTestCase.java	(revision 4864)
@@ -0,0 +1,54 @@
+package org.expressolivre.cte.calendar;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.expressolivre.cte.common.BaseCalendarTestCase;
+import org.expressolivre.cte.pages.calendar.AppointmentPage;
+import org.testng.Assert;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * Suite:[FUN03.2] Adicionar Compromisso
+ * 
+ * Caso de Teste: EL-948:Adicionar compromisso com hora final menor que hora
+ * inicial
+ * 
+ * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
+ * testcase&id=EL-948
+ * 
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jul 26, 2011 at 10:34:08 AM
+ * 
+ */
+public class AdicionarCompromissoHoraFinalMenorHoraInicialTestCase extends
+		BaseCalendarTestCase {
+
+	@Parameters({ "tipo", "titulo", "horaInicial", "minutoInicial",
+			"horaFinal", "minutoFinal", "prioridade" })
+	@Test
+	public void adicionarCompromissoHoraFinalMenorQueHoraInicial(
+			@Optional("Normal") String tipo, String titulo, String horaInicial,
+			String minutoInicial, String horaFinal, String minutoFinal,
+			@Optional("Normal") String prioridade) {
+
+		// Pega data corrente.
+		Calendar cal = Calendar.getInstance();
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+		SimpleDateFormat sdf2 = new SimpleDateFormat("dd/MM/yyyy");
+
+		AppointmentPage ap = super.adicionarCompromisso(
+				sdf.format(cal.getTime()), tipo, titulo,
+				sdf2.format(cal.getTime()), horaInicial, minutoInicial,
+				sdf2.format(cal.getTime()), horaFinal, minutoFinal, prioridade);
+		ap.saveAppointment();
+
+		Assert.assertEquals(
+				"A hora de inicio nÃ£o pode ser maior do que a hora de tÃ©rmino.",
+				ap.getFormStatus());
+
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/ExibirCompromissoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/ExibirCompromissoTestCase.java	(revision 4864)
+++ /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/ExibirCompromissoTestCase.java	(revision 4864)
@@ -0,0 +1,43 @@
+package org.expressolivre.cte.calendar;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.expressolivre.cte.common.BaseCalendarTestCase;
+import org.expressolivre.cte.pages.calendar.AppointmentViewPage;
+import org.expressolivre.cte.pages.calendar.CalendarTodayViewPage;
+import org.testng.Assert;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * Caso de Teste: EL-964:Exibir compromisso
+ * 
+ * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
+ * testcase&id=EL-964
+ * 
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jul 25, 2011 at 10:37:43 AM
+ * 
+ */
+public class ExibirCompromissoTestCase extends BaseCalendarTestCase {
+
+	@Parameters({ "tipo", "titulo", "inicio", "fim", "prioridade" })
+	@Test
+	public void exibirCompromisso(String tipo, String titulo, String inicio,
+			String fim, String prioridade) {
+		CalendarTodayViewPage ctvp = super.openTodayView();
+		String id = ctvp.getAppointmentId(titulo);
+
+		Calendar cal = Calendar.getInstance();
+		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+		String today = sdf.format(cal.getTime());
+
+		AppointmentViewPage avp = cp.openAppointmentViewPage(id);
+		Assert.assertEquals(avp.getTitle(), titulo);
+		Assert.assertEquals(avp.getStartTime(), today + " - " + inicio);
+		Assert.assertEquals(avp.getEndTime(), today + " - " + fim);
+		Assert.assertEquals(avp.getPriority(), prioridade);
+	}
+}
Index: vel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromisso.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromisso.java	(revision 3799)
+++ 	(revision )
@@ -1,49 +1,0 @@
-package org.expressolivre.cte.calendar;
-
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-
-import org.expressolivre.cte.common.BaseCalendarTestCase;
-import org.expressolivre.cte.pages.calendar.AppointmentPage;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-/**
- * Suite:[FUN03.2] Adicionar Compromisso
- * 
- * Caso de Teste: EL-938:Adicionar compromisso
- * 
- * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
- * testcase&id=EL-938
- * 
- * @author L.F.Estivalet (Serpro)
- * 
- *         Created on Feb 8, 2011 at 9:36:08 AM
- * 
- */
-public class AdicionarCompromisso extends BaseCalendarTestCase {
-
-	@Parameters({ "titulo", "horaInicial", "minutoInicial", "horaFinal",
-			"minutoFinal" })
-	@Test(dependsOnMethods = { "init" })
-	public void test(String titulo, String horaInicial, String minutoInicial,
-			String horaFinal, String minutoFinal) {
-
-		// Pega data corrente.
-		Calendar cal = Calendar.getInstance();
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-		SimpleDateFormat sdf2 = new SimpleDateFormat("dd/MM/yyyy");
-
-		// Adiciona um compromisso para data atual.
-		AppointmentPage ap = super.newAppointment(sdf.format(cal.getTime()));
-		ap.setTitle(titulo);
-		ap.setStartDate(sdf2.format(cal.getTime()));
-		ap.setStartHour(horaInicial);
-		ap.setStartMinute(minutoInicial);
-		ap.setEndDate(sdf2.format(cal.getTime()));
-		ap.setEndHour(horaFinal);
-		ap.setEndMinute(minutoFinal);
-
-		ap.saveAppointment();
-	}
-}
Index: /devel/testlink/automation2.0/src/test/resources/config.properties
===================================================================
--- /devel/testlink/automation2.0/src/test/resources/config.properties	(revision 4780)
+++ /devel/testlink/automation2.0/src/test/resources/config.properties	(revision 4864)
@@ -9,11 +9,11 @@
 
 # Usuario normal
-#url=https://cte2.serpro.gov.br
+url=https://cte2.serpro.gov.br
+user=88758559000
+passwd=serpro
+
+#url=https://10.200.113.112/
 #user=88758559000
-#passwd=serpro
-
-url=https://10.200.113.112/
-user=88758559000
-passwd=senha123
+#passwd=senha123
 
 
Index: /devel/testlink/automation2.0/[FUN03.2] - AdicionarCompromisso.xml
===================================================================
--- /devel/testlink/automation2.0/[FUN03.2] - AdicionarCompromisso.xml	(revision 3799)
+++ /devel/testlink/automation2.0/[FUN03.2] - AdicionarCompromisso.xml	(revision 4864)
@@ -3,14 +3,99 @@
 <suite name="[FUN03.2] Adicionar Compromisso" >
 
-  <parameter name="titulo"  value="[Selenium] Compromisso hoje!"/>
-  <parameter name="horaInicial"  value="16"/>
-  <parameter name="minutoInicial"  value="00"/>
-  <parameter name="horaFinal"  value="17"/>
-  <parameter name="minutoFinal"  value="30"/>
-  <test name="Agendamento data corrente">
-    <classes>
-       <class name="org.expressolivre.cte.calendar.AdicionarCompromisso" />
-    </classes>
+  <test name="Adicionar compromisso normal data corrente">
+	  <parameter name="tipo"  value="Normal"/>
+	  <parameter name="titulo"  value="[Selenium] Compromisso normal data corrente"/>
+	  <parameter name="horaInicial"  value="9"/>
+	  <parameter name="minutoInicial"  value="00"/>
+	  <parameter name="horaFinal"  value="9"/>
+	  <parameter name="minutoFinal"  value="30"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.AdicionarCompromissoTestCase" />
+	  </classes>
   </test>
+
+  <test name="Adicionar compromisso restrito data corrente">
+	  <parameter name="tipo"  value="Restrito"/>
+	  <parameter name="titulo"  value="[Selenium] Compromisso restrito data corrente"/>
+	  <parameter name="horaInicial"  value="10"/>
+	  <parameter name="minutoInicial"  value="00"/>
+	  <parameter name="horaFinal"  value="10"/>
+	  <parameter name="minutoFinal"  value="30"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.AdicionarCompromissoTestCase" />
+	  </classes>
+  </test>
+
+  <test name="Adicionar compromisso privado data corrente">
+	  <parameter name="tipo"  value="Normal"/>
+	  <parameter name="titulo"  value="[Selenium] Compromisso privado data corrente"/>
+	  <parameter name="horaInicial"  value="11"/>
+	  <parameter name="minutoInicial"  value="00"/>
+	  <parameter name="horaFinal"  value="11"/>
+	  <parameter name="minutoFinal"  value="30"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.AdicionarCompromissoTestCase" />
+	  </classes>
+  </test>
+ 
+  <test name="Exibir compromisso normal data corrente">
+	  <parameter name="tipo"  value="Normal"/>
+	  <parameter name="titulo"  value="[Selenium] Compromisso normal data corrente"/>
+	  <parameter name="inicio"  value="09:00"/>
+	  <parameter name="fim"  value="09:30"/>
+	  <parameter name="prioridade"  value="Normal"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.ExibirCompromissoTestCase" />
+	  </classes>
+  </test>
+
+  <test name="Remover compromisso normal data corrente">
+	  <parameter name="titulo"  value="[Selenium] Compromisso normal data corrente"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.RemoverCompromissoTestCase" />
+	  </classes>
+  </test>
+
+  <test name="Remover compromisso privado data corrente">
+	  <parameter name="titulo"  value="[Selenium] Compromisso privado data corrente"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.RemoverCompromissoTestCase" />
+	  </classes>
+  </test>
+
+  <test name="Remover compromisso restrito data corrente">
+	  <parameter name="titulo"  value="[Selenium] Compromisso restrito data corrente"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.RemoverCompromissoTestCase" />
+	  </classes>
+  </test>
+
+  <test name="Adicionar compromisso com hora final menor que inicial">
+	  <parameter name="tipo"  value="Normal"/>
+	  <parameter name="titulo"  value="[Selenium] Compromisso hora final menor que inicial"/>
+	  <parameter name="horaInicial"  value="10"/>
+	  <parameter name="minutoInicial"  value="00"/>
+	  <parameter name="horaFinal"  value="9"/>
+	  <parameter name="minutoFinal"  value="30"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.AdicionarCompromissoHoraFinalMenorHoraInicialTestCase" />
+	  </classes>
+  </test>
+ 
+
+
+  <test name="Adicionar compromisso com data final menor que inicial">
+	  <parameter name="tipo"  value="Normal"/>
+	  <parameter name="titulo"  value="[Selenium] Compromisso data final menor que inicial"/>
+	  <parameter name="horaInicial"  value="10"/>
+	  <parameter name="minutoInicial"  value="00"/>
+	  <parameter name="horaFinal"  value="9"/>
+	  <parameter name="minutoFinal"  value="30"/>
+	  <classes>
+	     <class name="org.expressolivre.cte.calendar.AdicionarCompromissoDataFinalMenorDataInicialTestCase" />
+	  </classes>
+  </test>
+ 
+ 
   
 </suite>
