Skip to content

Commit

Permalink
FACES-1784 Test failure in Primefaces4PortletTest due to refactoring …
Browse files Browse the repository at this point in the history
…of PrimeFaces 4.0 p:fileUpload component
  • Loading branch information
ngriffin7a committed Feb 5, 2014
1 parent 632d0db commit 963b7be
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jboss.arquillian.junit.InSequence;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
Expand Down Expand Up @@ -683,6 +684,14 @@ public void fileUpload() throws Exception {
}

logger.log(Level.INFO, "entering in " + getPathToJerseyFile() + " for fileUploadChooser ...");

// This was the magic that fixed the primefaces4 fileupload component the transform needed to be set to 'none'
((JavascriptExecutor)browser).executeScript("arguments[0].style.transform = 'none';", fileUploadChooser);

// when transform is NOT set to 'none' then we get:
// fileUploadChooser.getCssValue(transform) = matrix(4, 0, 0, 4, -300, 0)
logger.log(Level.INFO, "fileUploadChooser.getCssValue(transform) = " + fileUploadChooser.getCssValue("transform"));

fileUploadChooser.sendKeys(getPathToJerseyFile());

Thread.sleep(50);
Expand Down

0 comments on commit 963b7be

Please sign in to comment.