Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
C
commerce
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
commerce
Commits
27c4c784
Commit
27c4c784
authored
Nov 09, 2019
by
bojanz
Committed by
bojanz
Nov 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3093383
by bojanz: Fix the tests on Drupal 8.8-beta1
parent
2aecf668
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
18 deletions
+46
-18
modules/cart/tests/src/FunctionalJavascript/AddToCartFieldReplacementTest.php
...rc/FunctionalJavascript/AddToCartFieldReplacementTest.php
+5
-0
modules/checkout/tests/src/Functional/CheckoutOrderTest.php
modules/checkout/tests/src/Functional/CheckoutOrderTest.php
+5
-0
modules/order/tests/src/Functional/CustomerProfileTypeTest.php
...es/order/tests/src/Functional/CustomerProfileTypeTest.php
+8
-8
modules/order/tests/src/FunctionalJavascript/CustomerProfileTest.php
...er/tests/src/FunctionalJavascript/CustomerProfileTest.php
+7
-7
modules/payment/tests/src/FunctionalJavascript/PaymentCheckoutTest.php
...nt/tests/src/FunctionalJavascript/PaymentCheckoutTest.php
+1
-1
modules/store/tests/src/FunctionalJavascript/StoreTest.php
modules/store/tests/src/FunctionalJavascript/StoreTest.php
+0
-2
modules/tax/tests/src/FunctionalJavascript/TaxNumberTest.php
modules/tax/tests/src/FunctionalJavascript/TaxNumberTest.php
+5
-0
tests/src/Functional/CommerceBrowserTestBase.php
tests/src/Functional/CommerceBrowserTestBase.php
+5
-0
tests/src/Functional/UninstallTest.php
tests/src/Functional/UninstallTest.php
+5
-0
tests/src/FunctionalJavascript/CommerceWebDriverTestBase.php
tests/src/FunctionalJavascript/CommerceWebDriverTestBase.php
+5
-0
No files found.
modules/cart/tests/src/FunctionalJavascript/AddToCartFieldReplacementTest.php
View file @
27c4c784
...
...
@@ -39,6 +39,11 @@ class AddToCartFieldReplacementTest extends CartWebDriverTestBase {
'commerce_product'
,
];
/**
* {@inheritdoc}
*/
protected
$defaultTheme
=
'classy'
;
/**
* {@inheritdoc}
*/
...
...
modules/checkout/tests/src/Functional/CheckoutOrderTest.php
View file @
27c4c784
...
...
@@ -43,6 +43,11 @@ class CheckoutOrderTest extends CommerceBrowserTestBase {
'views_ui'
,
];
/**
* {@inheritdoc}
*/
protected
$defaultTheme
=
'classy'
;
/**
* {@inheritdoc}
*/
...
...
modules/order/tests/src/Functional/CustomerProfileTypeTest.php
View file @
27c4c784
...
...
@@ -68,8 +68,8 @@ class CustomerProfileTypeTest extends OrderBrowserTestBase {
$this
->
drupalGet
(
$profile_type
->
toUrl
(
'edit-form'
));
$checkbox
=
$this
->
getSession
()
->
getPage
()
->
findField
(
'commerce_order[customer_profile_type]'
);
$this
->
assertNotEmpty
(
$checkbox
);
$this
->
assert
True
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
True
(
$checkbox
->
getAttribute
(
'disabled'
));
$this
->
assert
NotEmpty
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
NotEmpty
(
$checkbox
->
getAttribute
(
'disabled'
));
$this
->
submitForm
([],
'Save'
);
// Confirm that saving the form doesn't unset the flag.
/** @var \Drupal\profile\Entity\ProfileTypeInterface $profile_type */
...
...
@@ -80,8 +80,8 @@ class CustomerProfileTypeTest extends OrderBrowserTestBase {
$this
->
drupalGet
(
'admin/config/people/profile-types/add'
);
$checkbox
=
$this
->
getSession
()
->
getPage
()
->
findField
(
'commerce_order[customer_profile_type]'
);
$this
->
assertNotEmpty
(
$checkbox
);
$this
->
assert
False
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
False
(
$checkbox
->
getAttribute
(
'disabled'
));
$this
->
assert
Empty
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
Empty
(
$checkbox
->
getAttribute
(
'disabled'
));
$this
->
submitForm
([
'label'
=>
'Customer (Shipping information)'
,
...
...
@@ -111,8 +111,8 @@ class CustomerProfileTypeTest extends OrderBrowserTestBase {
$this
->
drupalGet
(
$profile_type
->
toUrl
(
'edit-form'
));
$checkbox
=
$this
->
getSession
()
->
getPage
()
->
findField
(
'commerce_order[customer_profile_type]'
);
$this
->
assertNotEmpty
(
$checkbox
);
$this
->
assert
True
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
False
(
$checkbox
->
getAttribute
(
'disabled'
));
$this
->
assert
NotEmpty
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
Empty
(
$checkbox
->
getAttribute
(
'disabled'
));
// Confirm that the flag can't be unset once there's data.
$profile
=
Profile
::
create
([
...
...
@@ -131,8 +131,8 @@ class CustomerProfileTypeTest extends OrderBrowserTestBase {
$this
->
drupalGet
(
$profile_type
->
toUrl
(
'edit-form'
));
$checkbox
=
$this
->
getSession
()
->
getPage
()
->
findField
(
'commerce_order[customer_profile_type]'
);
$this
->
assertNotEmpty
(
$checkbox
);
$this
->
assert
True
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
True
(
$checkbox
->
getAttribute
(
'disabled'
));
$this
->
assert
NotEmpty
(
$checkbox
->
getAttribute
(
'checked'
));
$this
->
assert
NotEmpty
(
$checkbox
->
getAttribute
(
'disabled'
));
// Confirm that unsetting the flag removes the address field.
$profile
->
delete
();
...
...
modules/order/tests/src/FunctionalJavascript/CustomerProfileTest.php
View file @
27c4c784
...
...
@@ -83,7 +83,7 @@ class CustomerProfileTest extends OrderWebDriverTestBase {
$this
->
assertEquals
(
'RS'
,
$options
[
1
]
->
getValue
());
$this
->
assertEquals
(
'US'
,
$options
[
2
]
->
getValue
());
// Confirm that the store default is selected when available.
$this
->
assert
True
(
$options
[
1
]
->
getAttribute
(
'selected'
));
$this
->
assert
NotEmpty
(
$options
[
1
]
->
getAttribute
(
'selected'
));
// Confirm that it is possible to change the country and submit the form.
$this
->
getSession
()
->
getPage
()
->
fillField
(
'profile[address][0][address][country_code]'
,
'FR'
);
...
...
@@ -141,7 +141,7 @@ class CustomerProfileTest extends OrderWebDriverTestBase {
$this
->
assertEquals
(
$this
->
usAddress
[
'address_line1'
],
$options
[
0
]
->
getText
());
$this
->
assertEquals
(
$this
->
frenchAddress
[
'address_line1'
],
$options
[
1
]
->
getText
());
$this
->
assertEquals
(
'+ Enter a new address'
,
$options
[
2
]
->
getText
());
$this
->
assert
True
(
$options
[
0
]
->
getAttribute
(
'selected'
));
$this
->
assert
NotEmpty
(
$options
[
0
]
->
getAttribute
(
'selected'
));
// Confirm that the US profile is shown rendered.
$this
->
assertRenderedAddress
(
$this
->
usAddress
);
...
...
@@ -300,7 +300,7 @@ class CustomerProfileTest extends OrderWebDriverTestBase {
$this
->
assertEquals
(
$this
->
frenchAddress
[
'address_line1'
],
$options
[
1
]
->
getText
());
$this
->
assertEquals
(
'+ Enter a new address'
,
$options
[
2
]
->
getText
());
// Confirm that the address book profile is selected.
$this
->
assert
True
(
$options
[
1
]
->
getAttribute
(
'selected'
));
$this
->
assert
NotEmpty
(
$options
[
1
]
->
getAttribute
(
'selected'
));
$this
->
assertRenderedAddress
(
$this
->
frenchAddress
);
$this
->
submitForm
([],
'Submit'
);
...
...
@@ -348,7 +348,7 @@ class CustomerProfileTest extends OrderWebDriverTestBase {
$this
->
assertEquals
(
$new_french_address
[
'address_line1'
],
$options
[
1
]
->
getText
());
$this
->
assertEquals
(
$this
->
frenchAddress
[
'address_line1'
],
$options
[
2
]
->
getText
());
$this
->
assertEquals
(
'+ Enter a new address'
,
$options
[
3
]
->
getText
());
$this
->
assert
True
(
$options
[
2
]
->
getAttribute
(
'selected'
));
$this
->
assert
NotEmpty
(
$options
[
2
]
->
getAttribute
(
'selected'
));
$this
->
assertEquals
(
'_original'
,
$options
[
2
]
->
getValue
());
$this
->
assertRenderedAddress
(
$this
->
frenchAddress
);
...
...
@@ -419,7 +419,7 @@ class CustomerProfileTest extends OrderWebDriverTestBase {
$this
->
assertEquals
(
$this
->
frenchAddress
[
'address_line1'
]
.
' (updated version)'
,
$options
[
1
]
->
getText
());
$this
->
assertEquals
(
$this
->
frenchAddress
[
'address_line1'
]
.
' (original version)'
,
$options
[
2
]
->
getText
());
$this
->
assertEquals
(
'+ Enter a new address'
,
$options
[
3
]
->
getText
());
$this
->
assert
True
(
$options
[
2
]
->
getAttribute
(
'selected'
));
$this
->
assert
NotEmpty
(
$options
[
2
]
->
getAttribute
(
'selected'
));
$this
->
assertEquals
(
'_original'
,
$options
[
2
]
->
getValue
());
$this
->
assertRenderedAddress
(
$new_french_address
);
...
...
@@ -567,7 +567,7 @@ class CustomerProfileTest extends OrderWebDriverTestBase {
$this
->
assertEquals
(
'37 Rue du Sentier'
,
$options
[
0
]
->
getText
());
$this
->
assertEquals
(
'Cetinjska 13'
,
$options
[
1
]
->
getText
());
$this
->
assertEquals
(
'+ Enter a new address'
,
$options
[
2
]
->
getText
());
$this
->
assert
True
(
$options
[
1
]
->
getAttribute
(
'selected'
));
$this
->
assert
NotEmpty
(
$options
[
1
]
->
getAttribute
(
'selected'
));
// Confirm that a deleted address book profile is detected.
$new_address_book_profile
->
delete
();
...
...
@@ -577,7 +577,7 @@ class CustomerProfileTest extends OrderWebDriverTestBase {
$this
->
assertEquals
(
'37 Rue du Sentier'
,
$options
[
0
]
->
getText
());
$this
->
assertEquals
(
'Cetinjska 13'
,
$options
[
1
]
->
getText
());
$this
->
assertEquals
(
'+ Enter a new address'
,
$options
[
2
]
->
getText
());
$this
->
assert
True
(
$options
[
1
]
->
getAttribute
(
'selected'
));
$this
->
assert
NotEmpty
(
$options
[
1
]
->
getAttribute
(
'selected'
));
$this
->
assertEquals
(
'_original'
,
$options
[
1
]
->
getValue
());
$rendered_address
=
[
...
...
modules/payment/tests/src/FunctionalJavascript/PaymentCheckoutTest.php
View file @
27c4c784
...
...
@@ -236,7 +236,7 @@ class PaymentCheckoutTest extends CommerceWebDriverTestBase {
$this
->
assertNotNull
(
$radio_button
);
}
$default_radio_button
=
$page
->
findField
(
'Visa ending in 9999'
);
$this
->
assert
True
(
$default_radio_button
->
getAttribute
(
'checked'
));
$this
->
assert
NotEmpty
(
$default_radio_button
->
getAttribute
(
'checked'
));
/** @var \Drupal\commerce_payment\Entity\PaymentGatewayInterface $payment_gateway */
$payment_gateway
=
PaymentGateway
::
create
([
...
...
modules/store/tests/src/FunctionalJavascript/StoreTest.php
View file @
27c4c784
...
...
@@ -64,8 +64,6 @@ class StoreTest extends CommerceWebDriverTestBase {
}
$this
->
submitForm
(
$edit
,
t
(
'Save'
));
$this
->
assertSession
()
->
pageTextContains
(
"Saved the
$name
store."
);
$store_count
=
$this
->
getSession
()
->
getPage
()
->
findAll
(
'css'
,
'.view-commerce-stores tr td.views-field-name'
);
$this
->
assertEquals
(
2
,
count
(
$store_count
));
}
/**
...
...
modules/tax/tests/src/FunctionalJavascript/TaxNumberTest.php
View file @
27c4c784
...
...
@@ -44,6 +44,11 @@ class TaxNumberTest extends CommerceWebDriverTestBase {
'commerce_tax_test'
,
];
/**
* {@inheritdoc}
*/
protected
$defaultTheme
=
'classy'
;
/**
* {@inheritdoc}
*/
...
...
tests/src/Functional/CommerceBrowserTestBase.php
View file @
27c4c784
...
...
@@ -45,6 +45,11 @@ abstract class CommerceBrowserTestBase extends BrowserTestBase {
'commerce_store'
,
];
/**
* {@inheritdoc}
*/
protected
$defaultTheme
=
'stark'
;
/**
* A test user with administrative privileges.
*
...
...
tests/src/Functional/UninstallTest.php
View file @
27c4c784
...
...
@@ -47,6 +47,11 @@ class UninstallTest extends BrowserTestBase {
'commerce_payment'
,
];
/**
* {@inheritdoc}
*/
protected
$defaultTheme
=
'stark'
;
/**
* Tests module uninstallation.
*/
...
...
tests/src/FunctionalJavascript/CommerceWebDriverTestBase.php
View file @
27c4c784
...
...
@@ -53,6 +53,11 @@ abstract class CommerceWebDriverTestBase extends WebDriverTestBase {
'commerce_store'
,
];
/**
* {@inheritdoc}
*/
protected
$defaultTheme
=
'stark'
;
/**
* A test user with administrative privileges.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment