@@ -57,7 +57,7 @@ |
||
57 | 57 | * * Tab/Section::name=Text Of Setting (will ensure that the correct section is navigated to, uses setting name (exact), not ID) |
58 | 58 | * * name=Text Of Setting (will not navigate, uses setting name (exact) not ID) |
59 | 59 | * |
60 | - * @param $identifier |
|
60 | + * @param string $identifier |
|
61 | 61 | * @param $value |
62 | 62 | * @throws \Magium\InvalidInstructionException |
63 | 63 | */ |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Magium\Magento\Actions\Admin\Configuration; |
4 | 4 | |
5 | -use Facebook\WebDriver\WebDriverElement; |
|
6 | -use Facebook\WebDriver\WebDriverSelect; |
|
7 | 5 | use Magium\Magento\AbstractMagentoTestCase; |
8 | 6 | use Magium\Magento\Navigators\Admin\SystemConfiguration; |
9 | 7 | use Magium\Magento\Themes\Admin\ThemeConfiguration; |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $xpath = ''; |
78 | 78 | if (count($xpath) === 2) { |
79 | 79 | $nav = explode('/', $parts[0]); |
80 | - $xpath = $this->themeConfiguration->getSystemConfigSectionDisplayCheckXpath($nav[1]) . '/descendant::'; |
|
80 | + $xpath = $this->themeConfiguration->getSystemConfigSectionDisplayCheckXpath($nav[1]).'/descendant::'; |
|
81 | 81 | } |
82 | 82 | $xpath .= $this->themeConfiguration->getSystemConfigSettingLabelXpath($matches[1]); |
83 | 83 | $labelElement = $this->webDriver->byXpath($xpath); |
@@ -2,10 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Magium\Magento\Actions\Cart; |
4 | 4 | |
5 | -use Magium\Actions\WaitForPageLoaded; |
|
6 | 5 | use Magium\Magento\Extractors\Catalog\Cart\AddToCart; |
7 | 6 | use Magium\Magento\Extractors\Catalog\Product\ConfigurableProductOptions; |
8 | -use Magium\Magento\Extractors\Catalog\Product\Swatch; |
|
9 | 7 | use Magium\Magento\Extractors\Catalog\Product\Option; |
10 | 8 | use Magium\Magento\Extractors\Catalog\Product\SwatchValue; |
11 | 9 | use Magium\Magento\Extractors\Catalog\Product\Value; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | // The options are sorted by their entry into the setOption() method. Need to have it ordered by the page order |
62 | 62 | |
63 | 63 | if (!$elementOption instanceof Option) { |
64 | - throw new InvalidConfigurableOptionException('Missing the attribute: ' . $attributeName); |
|
64 | + throw new InvalidConfigurableOptionException('Missing the attribute: '.$attributeName); |
|
65 | 65 | } |
66 | 66 | $element = $elementOption->getValue($this->getOption($attributeName)); |
67 | 67 | if (!$element instanceof Value) { |
@@ -57,7 +57,9 @@ |
||
57 | 57 | $attributes = $this->option->getOptionNames(); |
58 | 58 | foreach ($attributes as $attributeName) { |
59 | 59 | $elementOption = $this->option->getOption($attributeName); |
60 | - if (!$elementOption) continue; |
|
60 | + if (!$elementOption) { |
|
61 | + continue; |
|
62 | + } |
|
61 | 63 | // The options are sorted by their entry into the setOption() method. Need to have it ordered by the page order |
62 | 64 | |
63 | 65 | if (!$elementOption instanceof Option) { |
@@ -6,8 +6,6 @@ |
||
6 | 6 | use Magium\Magento\Actions\Checkout\Steps\LogInCustomer; |
7 | 7 | use Magium\Magento\Actions\Checkout\Steps\PaymentMethod; |
8 | 8 | use Magium\Magento\Actions\Checkout\Steps\PlaceOrder; |
9 | -use Magium\Magento\Actions\Checkout\Steps\ReviewOrder; |
|
10 | -use Magium\Magento\Actions\Checkout\Steps\SelectCustomerCheckout; |
|
11 | 9 | use Magium\Magento\Actions\Checkout\Steps\ShippingAddress; |
12 | 10 | use Magium\Magento\Actions\Checkout\Steps\ShippingMethod; |
13 | 11 | use Magium\Magento\Extractors\Checkout\CartSummary; |
@@ -5,7 +5,6 @@ discard block |
||
5 | 5 | use Magium\Magento\Actions\Checkout\Steps\BillingAddress; |
6 | 6 | use Magium\Magento\Actions\Checkout\Steps\PaymentMethod; |
7 | 7 | use Magium\Magento\Actions\Checkout\Steps\PlaceOrder; |
8 | -use Magium\Magento\Actions\Checkout\Steps\ReviewOrder; |
|
9 | 8 | use Magium\Magento\Actions\Checkout\Steps\SelectGuestCheckout; |
10 | 9 | use Magium\Magento\Actions\Checkout\Steps\ShippingAddress; |
11 | 10 | use Magium\Magento\Actions\Checkout\Steps\ShippingMethod; |
@@ -14,7 +13,6 @@ discard block |
||
14 | 13 | use Magium\Magento\Navigators\Checkout\Checkout; |
15 | 14 | use Magium\Magento\Navigators\Checkout\CheckoutStart; |
16 | 15 | use Magium\Magento\Themes\OnePageCheckout\AbstractThemeConfiguration; |
17 | -use Magium\Magento\Themes\OnePageCheckout\ThemeConfiguration as OnePageCheckoutTheme; |
|
18 | 16 | |
19 | 17 | class GuestCheckout extends AbstractCheckout |
20 | 18 | { |
@@ -6,8 +6,6 @@ discard block |
||
6 | 6 | use Magium\Magento\Actions\Checkout\Steps\NewCustomerPassword; |
7 | 7 | use Magium\Magento\Actions\Checkout\Steps\PaymentMethod; |
8 | 8 | use Magium\Magento\Actions\Checkout\Steps\PlaceOrder; |
9 | -use Magium\Magento\Actions\Checkout\Steps\ReviewOrder; |
|
10 | -use Magium\Magento\Actions\Checkout\Steps\SelectCustomerCheckout; |
|
11 | 9 | use Magium\Magento\Actions\Checkout\Steps\SelectRegisterNewCustomerCheckout; |
12 | 10 | use Magium\Magento\Actions\Checkout\Steps\ShippingAddress; |
13 | 11 | use Magium\Magento\Actions\Checkout\Steps\ShippingMethod; |
@@ -16,7 +14,6 @@ discard block |
||
16 | 14 | use Magium\Magento\Navigators\Checkout\Checkout; |
17 | 15 | use Magium\Magento\Navigators\Checkout\CheckoutStart; |
18 | 16 | use Magium\Magento\Themes\OnePageCheckout\AbstractThemeConfiguration; |
19 | -use Magium\Magento\Themes\OnePageCheckout\ThemeConfiguration as OnePageCheckoutTheme; |
|
20 | 17 | |
21 | 18 | class RegisterNewCustomerCheckout extends AbstractCheckout |
22 | 19 | { |
@@ -43,6 +43,9 @@ |
||
43 | 43 | return $this->messages; |
44 | 44 | } |
45 | 45 | |
46 | + /** |
|
47 | + * @param string $message |
|
48 | + */ |
|
46 | 49 | public function addMessage($message) |
47 | 50 | { |
48 | 51 | $this->messages[] = $message; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @param $nodePath |
30 | - * @return WebDriverElement |
|
30 | + * @return null|\Facebook\WebDriver\Remote\RemoteWebElement |
|
31 | 31 | */ |
32 | 32 | |
33 | 33 | public function getNode($nodePath) |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | $previousExpandXpath = ''; |
59 | 59 | $element = null; |
60 | 60 | foreach ($parts as $part) { |
61 | - $xpath .= '/' . $this->theme->getXTreeChildXpath($part); |
|
62 | - if(!$this->webDriver->elementExists($xpath, WebDriver::BY_XPATH)) { |
|
61 | + $xpath .= '/'.$this->theme->getXTreeChildXpath($part); |
|
62 | + if (!$this->webDriver->elementExists($xpath, WebDriver::BY_XPATH)) { |
|
63 | 63 | if ($previousExpandXpath) { |
64 | 64 | $this->testCase->assertElementExists($previousExpandXpath, WebDriver::BY_XPATH); |
65 | 65 | $this->webDriver->byXpath($previousExpandXpath)->click(); |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | $this->testCase->assertElementExists($xpath, WebDriver::BY_XPATH); |
71 | 71 | $element = $this->webDriver->byXpath($xpath); |
72 | 72 | if (!$element->isDisplayed()) { |
73 | - throw new ElementNotVisibleException('Node element is not visible and cannot be made visible: ' . $part); |
|
73 | + throw new ElementNotVisibleException('Node element is not visible and cannot be made visible: '.$part); |
|
74 | 74 | } |
75 | - $previousExpandXpath = $xpath . $this->theme->getXTreeChildNodeExpandPrefixXpath(); |
|
75 | + $previousExpandXpath = $xpath.$this->theme->getXTreeChildNodeExpandPrefixXpath(); |
|
76 | 76 | $xpath .= $this->theme->getXTreeChildNodePrefixXpath(); |
77 | 77 | } |
78 | 78 | $this->node = $element; |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Magium\Magento\Extractors\Catalog\LayeredNavigation\FilterTypes; |
4 | 4 | |
5 | -use Facebook\WebDriver\WebDriverBy; |
|
6 | -use Facebook\WebDriver\WebDriverElement; |
|
7 | 5 | use Magium\Magento\Extractors\Catalog\LayeredNavigation\FilterValue; |
8 | 6 | use Magium\Magento\Extractors\Catalog\LayeredNavigation\UnparseableValueException; |
9 | 7 |
@@ -44,8 +44,8 @@ |
||
44 | 44 | /* @var $elements \DOMElement[] */ |
45 | 45 | $returnElements = []; |
46 | 46 | foreach ($elements as $element) { |
47 | - $elementDocument = new \DOMDocument(); |
|
48 | - $html =$element->C14N(); |
|
47 | + $elementDocument = new \DOMDocument(); |
|
48 | + $html = $element->C14N(); |
|
49 | 49 | $elementDocument->loadXML($html); |
50 | 50 | $elementXpath = new \DOMXPath($elementDocument); |
51 | 51 | $titleElements = $elementXpath->query(sprintf('//*[@%s]', $this->theme->getLayeredNavigationSwatchTitleAttribute())); |
@@ -15,7 +15,9 @@ |
||
15 | 15 | { |
16 | 16 | $xpath = new \DOMXPath($this->document); |
17 | 17 | $xpathQuery = $this->theme->getLayeredNavigationSwatchAppliesXpath($this->title); |
18 | - if (!$xpathQuery) return false; |
|
18 | + if (!$xpathQuery) { |
|
19 | + return false; |
|
20 | + } |
|
19 | 21 | $elements = $xpath->query($xpathQuery); |
20 | 22 | return $elements->length > 0; |
21 | 23 | } |
@@ -80,6 +80,9 @@ |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | |
83 | + /** |
|
84 | + * @param string $type |
|
85 | + */ |
|
83 | 86 | public function addFilterType($type) |
84 | 87 | { |
85 | 88 | $type = $this->filterTypeName($type); |
@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | { |
56 | 56 | $returnType = $type; |
57 | 57 | if (strpos($type, '\\') === false) { |
58 | - $returnType = $this->baseNamespace . '\\' . $type; |
|
58 | + $returnType = $this->baseNamespace.'\\'.$type; |
|
59 | 59 | if (!class_exists($returnType)) { |
60 | 60 | $returnType = $type; |
61 | 61 | if (!class_exists($returnType)) { |
62 | - throw new InvalidFilterException('Filter type must exist: ' . $returnType); |
|
62 | + throw new InvalidFilterException('Filter type must exist: '.$returnType); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | } |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | |
70 | 70 | protected function validateFilterType($returnType) |
71 | 71 | { |
72 | - if ($returnType == $this->baseNamespace . '\AbstractFilterType') { |
|
72 | + if ($returnType == $this->baseNamespace.'\AbstractFilterType') { |
|
73 | 73 | return true; |
74 | 74 | } |
75 | 75 | $reflection = new \ReflectionClass($returnType); |
76 | - if (!$reflection->isSubclassOf($this->baseNamespace . '\AbstractFilterType')) { |
|
77 | - throw new InvalidFilterException('Filter type must extend AbstractFilterType: ' . $returnType); |
|
76 | + if (!$reflection->isSubclassOf($this->baseNamespace.'\AbstractFilterType')) { |
|
77 | + throw new InvalidFilterException('Filter type must extend AbstractFilterType: '.$returnType); |
|
78 | 78 | } |
79 | 79 | return true; |
80 | 80 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $this->filterValues[$filterKey]; |
132 | 132 | } |
133 | 133 | |
134 | - throw new MissingFilterException('Could not find the filter: ' . $filter); |
|
134 | + throw new MissingFilterException('Could not find the filter: '.$filter); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | public function extract() |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | break; |
168 | 168 | } |
169 | 169 | } else { |
170 | - throw new InvalidFilterException('Filter type does not extend AbstractFilterType: ' . $type); |
|
170 | + throw new InvalidFilterException('Filter type does not extend AbstractFilterType: '.$type); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | } |