package com.persado.oss.quality.stevia.tests;

/*
 * #%L
 * Stevia QA Framework - Core
 * %%
 * Copyright (C) 2013 - 2014 Persado
 * %%
 * Copyright (c) Persado Intellectual Property Limited. All rights reserved.
 *  
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *  
 * * Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *  
 * * Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *  
 * * Neither the name of the Persado Intellectual Property Limited nor the names
 * of its contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *  
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 * #L%
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.testng.annotations.Test;

import com.persado.oss.quality.stevia.annotations.RunsConditionsWithController;
import com.persado.oss.quality.stevia.annotations.RunsWithController;
import com.persado.oss.quality.stevia.pageObjects.GoogleHomePage;
import com.persado.oss.quality.stevia.pageObjects.PersadoHomePage;
import com.persado.oss.quality.stevia.selenium.core.controllers.SeleniumWebController;
import com.persado.oss.quality.stevia.spring.SteviaTestBase;

@Component
public class TestGoogleSearch extends SteviaTestBase {

	@Autowired
	GoogleHomePage googleHome;

	@Autowired
	PersadoHomePage persadoHome;

	/**
	 * this test checks loading of sizzle css and verification of contains
	 */
	@Test
	public void searchPersadoInGoogle() {
		googleHome.inputSearchText("persado");
		googleHome.controller().pressLinkNameAndWaitForPageToLoad("Persado | Global leader in Marketing Language Engineering");
		persadoHome.checkPersadoTitle();
	}

	
	@RunsConditionsWithController(preConditionMethods = { "precondition1", "precondition2" }, postConditionMethods = { "postCondition1" } )
	@Test
	public void testExecutionOfPreconditions() {
		System.out.println("TEST METHOD CODE");
	}
	
	public void precondition1() {
		System.out.println("TEST precondition1 CODE");

	}
	
	public void precondition2() {
		System.out.println("TEST precondition2 CODE");
	}

	public void postCondition1() {
		System.out.println("TEST postCondition1 CODE");
	}
}

@@ -1981,78 +1981,8 @@
 er;%0A
-import com.persado.oss.quality.stevia.annotations.RunsWithController;%0A
 impo
@@ -2114,95 +2114,8 @@
 ge;%0A
-import com.persado.oss.quality.stevia.selenium.core.controllers.SeleniumWebController;%0A
 impo

test imports fix