From a867078c1d53e45f2d0378c785d6830b81551eb2 Mon Sep 17 00:00:00 2001
From: llaffont <llaffont@git-test.afi-sa.fr>
Date: Mon, 7 Oct 2013 15:52:35 +0000
Subject: [PATCH] Correction tests treeview

---
 .gitattributes                                      |  1 +
 application/modules/admin/views/scripts/popup.phtml | 12 ++++++++++++
 tests/library/ZendAfi/View/Helper/TreeViewTest.php  | 10 +++++-----
 3 files changed, 18 insertions(+), 5 deletions(-)
 create mode 100644 application/modules/admin/views/scripts/popup.phtml

diff --git a/.gitattributes b/.gitattributes
index f31e55b1a0b..d737112907c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -614,6 +614,7 @@ application/modules/admin/views/scripts/opds/index.phtml -text
 application/modules/admin/views/scripts/ouvertures/add.phtml -text
 application/modules/admin/views/scripts/ouvertures/edit.phtml -text
 application/modules/admin/views/scripts/ouvertures/index.phtml -text
+application/modules/admin/views/scripts/popup.phtml -text
 application/modules/admin/views/scripts/profil/_erreur_profil.phtml -text
 application/modules/admin/views/scripts/profil/_formProfil.phtml -text
 application/modules/admin/views/scripts/profil/_page_row.phtml -text
diff --git a/application/modules/admin/views/scripts/popup.phtml b/application/modules/admin/views/scripts/popup.phtml
new file mode 100644
index 00000000000..586cd1016f4
--- /dev/null
+++ b/application/modules/admin/views/scripts/popup.phtml
@@ -0,0 +1,12 @@
+<?php
+echo $this->render($this->actionScript);
+
+Class_ScriptLoader::getInstance()
+->renderStyleSheets()
+->renderJavaScripts();
+
+echo $this->headScript();
+echo $this->headLink(); 
+
+?>
+
diff --git a/tests/library/ZendAfi/View/Helper/TreeViewTest.php b/tests/library/ZendAfi/View/Helper/TreeViewTest.php
index c483d1a306f..a05a70ec61e 100644
--- a/tests/library/ZendAfi/View/Helper/TreeViewTest.php
+++ b/tests/library/ZendAfi/View/Helper/TreeViewTest.php
@@ -351,7 +351,7 @@ class TreeViewItemsWithWorkflowTest extends TreeViewItemsTestCase {
 	public function filterByStatusShouldContainDraftLink() {
 		$this->assertXpath(
 			$this->_html,
-			'//div[@class="treeViewSearchStatus"]/a[@rel="status-'
+			'//div[@class="treeViewSearchStatus"]/a[@data-filter="status-'
 																						. Class_Article::STATUS_DRAFT . '"]'
 		);
 	}
@@ -361,7 +361,7 @@ class TreeViewItemsWithWorkflowTest extends TreeViewItemsTestCase {
 	public function filterByStatusShouldContainValidationPendingLink() {
 		$this->assertXpath(
 			$this->_html,
-			'//div[@class="treeViewSearchStatus"]/a[@rel="status-'
+			'//div[@class="treeViewSearchStatus"]/a[@data-filter="status-'
 															. Class_Article::STATUS_VALIDATION_PENDING . '"]'
 		);
 	}
@@ -371,7 +371,7 @@ class TreeViewItemsWithWorkflowTest extends TreeViewItemsTestCase {
 	public function filterByStatusShouldContainValidatedLink() {
 		$this->assertXpath(
 			$this->_html,
-			'//div[@class="treeViewSearchStatus"]/a[@rel="status-'
+			'//div[@class="treeViewSearchStatus"]/a[@data-filter="status-'
 																				. Class_Article::STATUS_VALIDATED . '"]'
 		);
 	}
@@ -381,7 +381,7 @@ class TreeViewItemsWithWorkflowTest extends TreeViewItemsTestCase {
 	public function filterByStatusShouldContainArchivedLink() {
 		$this->assertXpath(
 			$this->_html,
-			'//div[@class="treeViewSearchStatus"]/a[@rel="status-'
+			'//div[@class="treeViewSearchStatus"]/a[@data-filter="status-'
 																				. Class_Article::STATUS_ARCHIVED . '"]'
 		);
 	}
@@ -390,7 +390,7 @@ class TreeViewItemsWithWorkflowTest extends TreeViewItemsTestCase {
 	public function filterByStatusShouldContainAllLink() {
 		$this->assertXpath(
 			$this->_html,
-			'//div[@class="treeViewSearchStatus"]/a[@rel="status-all"]'
+			'//div[@class="treeViewSearchStatus"]/a[@data-filter="status-all"]'
 		);
 	}
 }
-- 
GitLab