Lines of Code | 30 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** |
||
4 | import { By } from 'selenium-webdriver'; |
||
5 | import { WebDriverHelper as helper } from 'wp-e2e-webdriver'; |
||
6 | import { WPAdminWCSettings } from 'wc-e2e-page-objects'; |
||
7 | |||
8 | const ENABLE_SELECTOR = By.css( '#woocommerce_stripe_enabled' ); |
||
9 | const TEST_PUBLISHABLE_KEY_SELECTOR = By.css( '#woocommerce_stripe_test_publishable_key' ); |
||
10 | const TEST_PUBLISHABLE_SECRET_KEY_SELECTOR = By.css( '#woocommerce_stripe_test_publishable_secret_key' ); |
||
11 | |||
12 | |||
13 | export default class WPAdminWCSettingsCheckoutStripe extends WPAdminWCSettings { |
||
14 | constructor( driver, args = {} ) { |
||
15 | super( driver, args ); |
||
16 | } |
||
17 | |||
18 | checkEnable() { |
||
19 | return helper.setCheckbox( this.driver, ENABLE_SELECTOR ); |
||
20 | } |
||
21 | |||
22 | uncheckEnable() { |
||
23 | return helper.unsetCheckbox( this.driver, ENABLE_SELECTOR ); |
||
24 | } |
||
25 | |||
26 | setTestPublishableKey( testPublishableKey ) { |
||
27 | return helper.setWhenSettable( this.driver, TEST_PUBLISHABLE_KEY_SELECTOR, testPublishableKey ); |
||
28 | } |
||
29 | |||
30 | setTestPublishableSecretKey( testPublishableSecretKey ) { |
||
|
|||
31 | return helper.setWhenSettable( this.driver, TEST_PUBLISHABLE_SECRET_KEY_SELECTOR, testPublishableSecret ); |
||
32 | } |
||
33 | } |
||
34 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.