package pt.fccn.sobre.arquivo.tests;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.FileNotFoundException;
import java.io.IOException;

import org.junit.Test;

import pt.fccn.saw.selenium.Retry;
import pt.fccn.saw.selenium.WebDriverTestBaseParalell;
import pt.fccn.sobre.arquivo.pages.CommonQuestionsPage;
import pt.fccn.sobre.arquivo.pages.ExamplesPage;
import pt.fccn.sobre.arquivo.pages.IndexSobrePage;

public class ExamplesTest extends WebDriverTestBaseParalell {

	public ExamplesTest(String os, String version, String browser, String deviceName, String deviceOrientation) {
		super( os, version, browser, deviceName, deviceOrientation );
	}
	
	@Test
	@Retry
	public void examplesTest( )  {
		System.out.print( "Running examples Test. \n");
		IndexSobrePage index = null;
		try{
			 index = new IndexSobrePage( driver );
		} catch( IOException e ) {
			fail("IOException -> IndexSobrePage");
		}
		
        System.out.println( "Going to the CommonQuestions" );
        try{
	        ExamplesPage examplePage = index.goToExamplePage( );
	        assertTrue("Failed The Common Question in Portuguese", examplePage.checkLinksExamples( "PT" ) );

	        //assertTrue("Failed The Common Question in English", examplePage. );
        } catch( FileNotFoundException e ) {
			fail("FileNotFoundException -> goToExamplePage");
		}
    }

}

@@ -990,31 +990,27 @@
  to the 
-CommonQuestions
+ExamplePage
 %22 );%0A   
@@ -1014,22 +1014,17 @@
         
-try%7B%0A%09
+%0A
         
@@ -1076,17 +1076,16 @@
 age( );%0A
-%09
         
@@ -1181,18 +1181,25 @@
 T%22 ) );%0A
+        
 %0A
-%09
         
@@ -1204,177 +1204,41 @@
   //
-assertTrue(%22Failed The Common Question in English%22, examplePage. );%0A        %7D catch( FileNotFoundException e ) %7B%0A%09%09%09fail(%22FileNotFoundException -%3E goToExamplePage%22);%0A%09%09%7D
+TODO english version missing%0A%09   
 %0A   

work progress v10