function testSimpleSetting(
        settingName, initialSettingValue, updatedSettingValue, ticketKey,
        initialTicketValue, updatedTicketValue) {
      return initialize()
          .then(function(args) {
            const originalTicket = JSON.parse(args.printTicket);
            assertEquals(initialTicketValue, originalTicket[ticketKey]);
            nativeLayer.resetResolver('getPreview');
            assertEquals(
                initialSettingValue, page.getSettingValue(settingName));
            page.setSetting(settingName, updatedSettingValue);
            return nativeLayer.whenCalled('getPreview');
          })
          .then(function(args) {
            assertEquals(
                updatedSettingValue, page.getSettingValue(settingName));
            const ticket = JSON.parse(args.printTicket);
            assertEquals(updatedTicketValue, ticket[ticketKey]);
            assertEquals(2, ticket.requestID);
          });
    }
/**
     * @param {string} settingName The name of the setting to test.
     * @param {boolean | string} initialSettingValue The default setting value.
     * @param {boolean | string} updatedSettingValue The setting value to update
     *     to.
     * @param {string} ticketKey The field in the print ticket that corresponds
     *     to the setting.
     * @param {boolean | string | number} initialTicketValue The ticket value
     *     corresponding to the default setting value.
     * @param {boolean | string | number} updatedTicketValue The ticket value
     *     corresponding to the updated setting value.
     * @return {!Promise} Promise that resolves when the setting has been
     *     changed, the preview has been regenerated, and the print ticket and
     *     UI state have been verified.
     */
@param {string} settingName The name of the setting to test.
@param {boolean | string} initialSettingValue The default setting value.
@param {boolean | string} updatedSettingValue The setting value to update
to.
@param {string} ticketKey The field in the print ticket that corresponds
to the setting.
@param {boolean | string | number} initialTicketValue The ticket value
corresponding to the default setting value.
@param {boolean | string | number} updatedTicketValue The ticket value
corresponding to the updated setting value.
@return {!Promise} Promise that resolves when the setting has been
changed, the preview has been regenerated, and the print ticket and
UI state have been verified.
@param { string } settingName The name of the setting to test . @param { boolean | string } initialSettingValue The default setting value . @param { boolean | string } updatedSettingValue The setting value to update to . @param { string } ticketKey The field in the print ticket that corresponds to the setting . @param { boolean | string | number } initialTicketValue The ticket value corresponding to the default setting value . @param { boolean | string | number } updatedTicketValue The ticket value corresponding to the updated setting value . @return { !Promise } Promise that resolves when the setting has been changed the preview has been regenerated and the print ticket and UI state have been verified .
function testSimpleSetting(
        settingName, initialSettingValue, updatedSettingValue, ticketKey,
        initialTicketValue, updatedTicketValue) {
      return initialize()
          .then(function(args) {
            const originalTicket = JSON.parse(args.printTicket);
            assertEquals(initialTicketValue, originalTicket[ticketKey]);
            nativeLayer.resetResolver('getPreview');
            assertEquals(
                initialSettingValue, page.getSettingValue(settingName));
            page.setSetting(settingName, updatedSettingValue);
            return nativeLayer.whenCalled('getPreview');
          })
          .then(function(args) {
            assertEquals(
                updatedSettingValue, page.getSettingValue(settingName));
            const ticket = JSON.parse(args.printTicket);
            assertEquals(updatedTicketValue, ticket[ticketKey]);
            assertEquals(2, ticket.requestID);
          });
    }
function testSimpleSetting ( settingName , initialSettingValue , updatedSettingValue , ticketKey , initialTicketValue , updatedTicketValue ) { return initialize ( ) . then ( function ( args ) { const originalTicket = JSON . parse ( args . printTicket ) ; assertEquals ( initialTicketValue , originalTicket [ ticketKey ] ) ; nativeLayer . resetResolver ( 'getPreview' ) ; assertEquals ( initialSettingValue , page . getSettingValue ( settingName ) ) ; page . setSetting ( settingName , updatedSettingValue ) ; return nativeLayer . whenCalled ( 'getPreview' ) ; } ) . then ( function ( args ) { assertEquals ( updatedSettingValue , page . getSettingValue ( settingName ) ) ; const ticket = JSON . parse ( args . printTicket ) ; assertEquals ( updatedTicketValue , ticket [ ticketKey ] ) ; assertEquals ( 2 , ticket . requestID ) ; } ) ; }
@param {string} settingName The name of the setting to test.
@param { string } settingName The name of the setting to test .