diff --git a/README.txt b/README.txt
old mode 100644
new mode 100755
index 94d3551..1592065
--- a/README.txt
+++ b/README.txt
@@ -1,30 +1,11 @@
-
-Save_draft adds a 'Save as Draft' Button to the node_form for content types,
-allowing the user to click the 'Save as Draft' button to save the node as a
-draft.  This helps improve usability, as the content creator no longer has to
-search for the published checkbox as they can just click the 'Save as Draft'
-Button.
+Save Draft module adds a 'Save as Draft' Button to the node_form for content types, allowing the user to click the 'Save as Draft' button to save the node as a draft. This helps improve usability, as the content creator no longer has to search for the published checkbox as they can just click the 'Save as Draft' button.
 
 Install
 -------
 
 1) Copy the save_draft folder to the modules folder in your installation.
 
-2) For Drupal 6: Enable the module using Administer -> Site building -> Modules
-   (/admin/build/modules) and for Drupal 7, go to admin/modules.
+2) Enable the module using Manage -> Extend (/admin/modules).
 
 3) Now when you create a new node, a 'Save as Draft' button will be
-   added to the form.
-
-
-Developers
-----------
-If your module adds a button to the node form module and are using the
-"Skip required validation" option you can allow your button to also skip
-required validation by adding the #skip_required_validation property to your
-button. For example, if you are adding a button 'my_button' to the form actions
-you would add this property also:
-$form['actions']['my_button']['#skip_required_validation'] = TRUE;
-
-Note: Once the module is enabled, all the content types have "save draft" button
-enabled and the published checkbox in the node create form will be hidden.
+   added to the form.
\ No newline at end of file
diff --git a/css/save_draft.css b/css/save_draft.css
new file mode 100644
index 0000000..d9f782a
--- /dev/null
+++ b/css/save_draft.css
@@ -0,0 +1,6 @@
+/**
+ * Hides the normal "Published" checkbox on the node edit form.
+ */
+.form-item-status-value {
+  display: none;
+}
\ No newline at end of file
diff --git a/save_draft.info b/save_draft.info
deleted file mode 100644
index 9b8d9b9..0000000
--- a/save_draft.info
+++ /dev/null
@@ -1,4 +0,0 @@
-name = Save Draft
-description = Adds a 'Save as Draft' button to content types.
-core = 7.x
-files[] = save_draft.test
diff --git a/save_draft.info.yml b/save_draft.info.yml
new file mode 100644
index 0000000..39cdafe
--- /dev/null
+++ b/save_draft.info.yml
@@ -0,0 +1,4 @@
+name: 'Save Draft'
+description: 'Adds a ''Save as Draft'' button to content types'
+core: 8.x
+type: module
diff --git a/save_draft.install b/save_draft.install
deleted file mode 100644
index 0908d74..0000000
--- a/save_draft.install
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-/**
- * @file
- * Install, update and uninstall functions for the save draft module.
- */
-
-/**
- * Implements hook_uninstall().
- */
-function save_draft_uninstall() {
-  foreach (node_type_get_names('names') as $type => $type_name) {
-    variable_del('save_draft_enabled_' . $type);
-    variable_del('save_draft_skip_required_' . $type);
-    variable_del('save_draft_show_message_' . $type);
-  }
-}
diff --git a/save_draft.js b/save_draft.js
deleted file mode 100644
index 347af8d..0000000
--- a/save_draft.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-(function ($) {
-
-/**
- * Show summaries of selected options within tabs.
- */
-  Drupal.behaviors.saveDraftFieldsetSummaries = {
-    attach: function (context) {
-      // Remove publication status from the "Content promotion options" vertical
-      // tab.
-      $('fieldset.node-promotion-options', context).drupalSetSummary(function (context) {
-        var vals = [];
-
-        $('input:checked', context).parent().each(function () {
-          vals.push(Drupal.checkPlain($.trim($(this).text())));
-        });
-        if (vals.length) {
-          return vals.join(', ');
-        }
-        else {
-          return Drupal.t('Not promoted');
-        }
-      });
-
-      // Display save draft settings summary on the node options fieldet.
-      $('fieldset#edit-save-draft', context).drupalSetSummary(function (context) {
-        var vals = [];
-
-        // Add summary text for each checked option.
-        $('input:checked', context).next('label').each(function () {
-          vals.push(Drupal.checkPlain($(this).text()));
-        });
-
-        // For the case of the "Enabled" checkbox also handle the disabled state.
-        if (!$('#edit-save-draft-enabled', context).is(':checked')) {
-          vals.unshift(Drupal.t('Disabled'));
-        }
-        return vals.join(', ');
-      });
-    }
-  };
-
-})(jQuery);
diff --git a/save_draft.libraries.yml b/save_draft.libraries.yml
new file mode 100644
index 0000000..a2e6d58
--- /dev/null
+++ b/save_draft.libraries.yml
@@ -0,0 +1,5 @@
+save_draft:
+  version: 1.x
+  css:
+    theme:
+      css/save_draft.css: {}
\ No newline at end of file
diff --git a/save_draft.module b/save_draft.module
old mode 100644
new mode 100755
index 9ccdfc8..63e4d83
--- a/save_draft.module
+++ b/save_draft.module
@@ -2,274 +2,66 @@
 
 /**
  * @file
- * Main file for the Save Draft module, which adds a 'Save as draft' button
- * to content types.
+ * Main file for the Save Draft module, which adds a 'Save as draft' button to content types.
  */
 
-/**
- * Save draft functionality is disabled.
- */
-define('SAVE_DRAFT_DISABLED', 0);
-
-/**
- * Save draft functionality is enabled.
- */
-define('SAVE_DRAFT_ENABLED', 1);
-
-/**
- * Implements hook_permission().
- */
-function save_draft_permission() {
-  return array(
-    'save draft' => array(
-      'title' => t('Save content as draft'),
-      'description' => t('Allows people with permission to view and edit their own unpublished content to change the published state of their content when saving it.'),
-    ),
-  );
-}
+use Drupal\Core\Form\FormStateInterface;
 
 /**
  * Implements hook_form_FORM_ID_alter().
- *
- * For users with permission to choose the published state of the node being
- * edited, improves the content editing workflow by removing the Published
- * checkbox and replacing the Save button with two buttons: the original for
- * saving the node as published, and a new one for saving the node as
- * unpublished.
  */
-function save_draft_form_node_form_alter(&$form, &$form_state) {
-  if (variable_get('save_draft_enabled_' . $form['#node']->type, SAVE_DRAFT_ENABLED) && save_draft_access($form, $form_state)) {
-    // Remove the status checkbox from the options fieldset, and adjust the
-    // fieldset accordingly.
-    if (isset($form['options']['status'])) {
-      $form['options']['status']['#access'] = FALSE;
-      $form['options']['#attributes']['class'] = array('node-promotion-options');
-      $form['options']['#attached'] = array(
-        'js' => array(
-          'vertical-tabs' => drupal_get_path('module', 'save_draft') . '/save_draft.js',
-        ),
-      );
-    }
-
-    // Add a validation handler to set $form_state['values']['status'] based on
-    // which button is clicked.
-    if (empty($form['#validate'])) {
-      $form['#validate'] = array();
-    }
-    array_unshift($form['#validate'], 'save_draft_validate');
-
-    // The form already has a $form['actions']['submit'] button, which we'll
-    // use for saving the node as published. Here, add a second button for
-    // saving the node as unpublished.
-    $form['actions']['draft'] = array(
-      '#type' => 'submit',
-      '#class' => 'form-submit',
-      '#submit' => array('save_draft_draft_button_submit'),
-      // Between the default Save and Preview buttons.
-      '#weight' => 9,
-    );
-
-    // Button labels when adding a new node.
-    if (!isset($form_state['node']->nid)) {
-      $form['actions']['submit']['#value'] = t('Publish');
-      $form['actions']['draft']['#value'] = t('Save as draft');
-    }
-    // Button labels when editing an existing draft.
-    elseif (!$form_state['node']->status) {
-      $form['actions']['submit']['#value'] = t('Publish');
-      $form['actions']['draft']['#value'] = t('Save as draft');
-      // Move the draft button before the submit button, so that the
-      // "Save" action is always first when editing existing content.
-      $form['actions']['draft']['#weight'] = 0;
-    }
-    // Button labels when editing an already published node.
-    else {
-      $form['actions']['submit']['#value'] = t('Save');
-      $form['actions']['draft']['#value'] = t('Unpublish');
-    }
-
-    if (variable_get('save_draft_skip_required_' . $form['#node']->type, FALSE)) {
-      // Add a flag to buttons that can skip required validation.
-      $form['actions']['draft']['#skip_required_validation'] = TRUE;
-      if (isset($form['actions']['preview'])) {
-        $form['actions']['preview']['#skip_required_validation'] = TRUE;
-      }
-      if (isset($form['actions']['delete'])) {
-        $form['actions']['delete']['#skip_required_validation'] = TRUE;
-      }
-      // Add an after build callback so we can modify the form before validation
-      // in the case that a button is clicked that can skip validation.
-      $form['#after_build'][] = 'save_draft_form_after_build';
-    }
+function save_draft_form_node_form_alter(&$form, FormStateInterface $form_state) {
+  if (!\Drupal::currentUser()->hasPermission('save draft')) {
+    return;
   }
-}
 
-/**
- * Submit handler for the save as draft button.
- *
- * Calls all submit handlers on the save button.
- */
-function save_draft_draft_button_submit($form, &$form_state) {
-  if (variable_get('save_draft_show_message_' . $form['#node']->type, FALSE)) {
-    if ($form_state['triggering_element']['#value'] == $form['actions']['draft']['#value']) {
-      drupal_set_message(t('Saved as draft.'));
-    }
-  }
+  // Add JS
+  $form['#attached']['library'][] = 'save_draft/save_draft';
 
-  foreach ($form['actions']['submit']['#submit'] as $submit) {
-    $submit($form, $form_state);
-  }
-}
+  // Get node info from form state.
+  $node = $form_state->getFormObject()->getEntity();
 
-/**
- * Handles save draft form validation.
- */
-function save_draft_validate($form, &$form_state) {
-  // Set the node to be published or unpublished depending on which button was
-  // clicked.
-  if ($form_state['triggering_element']['#value'] == $form['actions']['draft']['#value']) {
-    $form_state['values']['status'] = 0;
-  }
-  elseif ($form_state['triggering_element']['#value'] == $form['actions']['submit']['#value']) {
-    $form_state['values']['status'] = 1;
-  }
-}
-
-/**
- * Implements hook_form_FORM_ID_alter() for the node type form.
- */
-function save_draft_form_node_type_form_alter(&$form, &$form_state) {
-  $enabled = variable_get('save_draft_enabled_' . $form['#node_type']->type, SAVE_DRAFT_ENABLED);
-
-  $form['save_draft'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Enable "Save draft" button'),
-    '#weight' => 1,
-    '#collapsible' => TRUE,
-    '#collapsed' => !$enabled,
-    '#group' => 'additional_settings',
-    '#attached' => array(
-      'js' => array(
-        'save-draft' => drupal_get_path('module', 'save_draft') . '/save_draft.js',
-      ),
-    ),
+  $form['actions']['draft'] = array(
+    '#type' => 'submit',
+    '#class' => 'form-submit',
   );
 
-  $form['save_draft']['save_draft_enabled'] = array(
-    '#title' => t('Enabled'),
-    '#type' => 'checkbox',
-    '#description' => t('Enable save as draft functionality for this content type.'),
-    '#default_value' => $enabled,
-  );
+  $action = $node->isPublished() ? 'unpublish' : 'publish';
+  $submit = array_merge(array('save_draft_' . $action . '_submit'), $form['actions']['submit']['#submit']);
+  // Custom Submit function.
+  $form['actions']['draft']['#submit'] = $submit;
 
-  $form['save_draft']['save_draft_skip_required'] = array(
-    '#title' => t('Skip required validation'),
-    '#type' => 'checkbox',
-    '#description' => t('Allow users to save a draft without having entered a value for required fields. If unchecked, all required fields must be filled before a draft can be saved.'),
-    '#default_value' => variable_get('save_draft_skip_required_' . $form['#node_type']->type, FALSE),
-  );
-
-  $form['save_draft']['save_draft_show_message'] = array(
-    '#title' => t('Show message'),
-    '#type' => 'checkbox',
-    '#description' => t('Display a "Saved as draft" message to the user when they use the save draft button.'),
-    '#default_value' => variable_get('save_draft_show_message_' . $form['#node_type']->type, FALSE),
-  );
-}
-
-/**
- * Returns TRUE if the currently logged in user has permission to choose the
- *
- * published state for the node being edited.
- */
-function save_draft_access($form, &$form_state) {
-  // Determine if the user has access to publish / unpublish this node via the
-  // status checkbox.
-  $element = $form;
-  $access = TRUE;
-  foreach (array('options', 'status') as $key) {
-    if (!isset($element[$key])) {
-      $access = FALSE;
-      break;
+  if (!$node->isNew()) {
+    if ($node->isPublished()) {
+      $form['actions']['draft']['#value'] = t('Unpublish');
+      $form['actions']['draft']['#weight'] = '9';
+      $form['actions']['submit']['#value'] = t('Save');
     }
-    $element = $element[$key];
-    if ((isset($element['#access']) && !$element['#access']) || !empty($element['#disabled'])) {
-      $access = FALSE;
-      break;
+    else {
+      $form['actions']['draft']['#value'] = t('Save');
+      $form['actions']['draft']['#weight'] = '0';
+      $form['actions']['submit']['#value'] = t('Publish');
     }
   }
-
-  // If not, but the user has the 'save draft' permission, determine if the user
-  // has access to view and edit this node if it were unpublished. Don't allow a
-  // user to save a draft that they won't be able to get back to.
-  if (!$access && user_access('save draft')) {
-    $node = clone($form_state['node']);
-    $node->status = FALSE;
-
-    // This might be a new node, and node_access() throws PHP warnings if nid
-    // isn't defined.
-    if (!isset($node->nid)) {
-      $node->nid = NULL;
-    }
-
-    $access = node_access('update', $node) && node_access('view', $node);
+  else {
+    $form['actions']['draft']['#value'] = t('Save as draft');
+    $form['actions']['draft']['#weight'] = '9';
+    $form['actions']['submit']['#value'] = t('Publish');
   }
-
-  return $access;
-}
-
-/**
- * Implements hook_node_type_delete().
- */
-function save_draft_node_type_delete($info) {
-  variable_del('save_draft_enabled_' . $info->type);
 }
 
 /**
- * After build callback for the save draft module.
- *
- * This is used to modify the form after it has been submitted, but before it
- * has been validated.
- * This means we can remove required flags if someone has pressed the save draft
- * button.
- *
- * @param array $element
- *   An associative array containing the structure of a form element.
- *   In this case the form.
- * @param array $form_state
- *   The form state array.
- *
- * @return array
- *   An associative array containing the structure of a form element.
+ * Custom submit function to change published status based on which button
+ * was pressed.
  */
-function save_draft_form_after_build(array $element, array &$form_state) {
-  // Check that the form has been submitted.
-  if ($form_state['process_input']) {
-    // If the save draft button was pressed.
-    if (!empty($form_state['triggering_element']['#skip_required_validation'])) {
-      _save_draft_remove_required($element);
-    }
-  }
-  return $element;
+function save_draft_unpublish_submit(&$form, FormStateInterface $form_state) {
+  $form_state->setValue('status', ['value' => 0]);
 }
 
 /**
- * Make all elements of a form not required.
- *
- * This is used only when saving drafts, so that users can save an unfinished
- * form that is missing required values.
- *
- * @param array $elements
- *   An associative array containing the structure of a form.
+ * Custom submit function to change published status based on which button
+ * was pressed.
  */
-function _save_draft_remove_required(array &$elements) {
-  // Recurse through all children.
-  foreach (element_children($elements) as $key) {
-    if (isset($elements[$key]) && $elements[$key]) {
-      _save_draft_remove_required($elements[$key]);
-    }
-  }
-  if (!empty($elements['#required'])) {
-    $elements['#required'] = FALSE;
-  }
+function save_draft_publish_submit(&$form, FormStateInterface $form_state) {
+  $form_state->setValue('status', ['value' => 1]);
 }
diff --git a/save_draft.permissions.yml b/save_draft.permissions.yml
new file mode 100644
index 0000000..1d57958
--- /dev/null
+++ b/save_draft.permissions.yml
@@ -0,0 +1,3 @@
+'save draft':
+  title: 'Save content as draft'
+  description: 'Allows a user to save a draft of their content.'
diff --git a/save_draft.test b/save_draft.test
index 3bc2f8e..b82e6f7 100755
--- a/save_draft.test
+++ b/save_draft.test
@@ -1,32 +1,9 @@
 <?php
 
-/**
- * @file
- * Link base test file - contains common functions for testing links.
- */
-
 class SaveDraftTestCase extends DrupalWebTestCase {
 
-  protected $admin_user;
-  protected $save_draft_user;
-
-  protected $title_key;
-
-  protected $body_key;
-
-  /**
-   * Button text variables.
-   */
-  private $button_unpublish;
-  private $button_publish;
-  private $button_save_draft;
-  private $button_save;
-  private $button_preview;
-  private $button_delete;
+  protected $admin;
 
-  /**
-   * Return a basic info array .
-   */
   public static function getInfo() {
     return array(
       'name' => 'Save draft',
@@ -35,31 +12,13 @@ class SaveDraftTestCase extends DrupalWebTestCase {
     );
   }
 
-  /**
-   * Setup title, body and user.
-   */
   public function setUp() {
     parent::setUp(array('save_draft'));
-    $this->admin_user = $this->drupalCreateUser(array(
-      'administer nodes',
-      'bypass node access',
-    ));
-    $this->save_draft_user = $this->drupalCreateUser(array(
-      'create article content',
-      'edit any article content',
-      'view own unpublished content',
-      'save draft',
-    ));
-    $langcode = LANGUAGE_NONE;
+    $this->admin = $this->drupalCreateUser(array('create article content', 'edit any article content', 'save draft'));
+    $this->drupalLogin($this->admin);
+    $langcode = \Drupal\Core\Language\Language::LANGCODE_NOT_SPECIFIED;
     $this->title_key = "title";
     $this->body_key = "body[$langcode][0][value]";
-
-    $this->button_unpublish = t('Unpublish');
-    $this->button_publish = t('Publish');
-    $this->button_save_draft = t('Save as draft');
-    $this->button_save = t('Save');
-    $this->button_preview = t('Preview');
-    $this->button_delete = t('Delete');
   }
 
   /**
@@ -76,162 +35,39 @@ class SaveDraftTestCase extends DrupalWebTestCase {
    * Make sure nodes save with the right publication status.
    */
   public function testNodeSave() {
-    // Log in as a user who should see the save draft button.
-    $this->drupalLogin($this->save_draft_user);
-
-    // Testing with drafts enabled.
-    variable_set('save_draft_enabled_article', SAVE_DRAFT_ENABLED);
-
-    // Make sure the publish and save as draft buttons are present when adding a
-    // node.
-    $this->drupalGet('node/add/article');
-    $this->assertRaw('<input type="submit" id="edit-submit" name="op" value="' . $this->button_publish . '" class="form-submit" />', t('Publish button visible on node create.'));
-    $this->assertRaw('<input type="submit" id="edit-draft" name="op" value="' . $this->button_save_draft . '" class="form-submit" />', t('Save as draft button visible on node create.'));
     // Publish a node, and make sure it's published.
     $edit = $this->getNodeArray();
-    $this->drupalPost('node/add/article', $edit, $this->button_publish);
+    $this->drupalPost('node/add/article', $edit, t('Publish'));
     $node = $this->drupalGetNodeByTitle($edit[$this->title_key]);
     $this->assertEqual($node->status, NODE_PUBLISHED, t('Node saved correctly.'));
 
-    // Make sure the save and unpublish buttons are present when on a published
-    // node.
-    $this->drupalGet('node/' . $node->nid . '/edit');
-    $this->assertRaw('<input type="submit" id="edit-submit" name="op" value="' . $this->button_save . '" class="form-submit" />', t('Save button visible on published node edit.'));
-    $this->assertRaw('<input type="submit" id="edit-draft" name="op" value="' . $this->button_unpublish . '" class="form-submit" />', t('Unpublish button visible on published node edit.'));
     // Unpublish it, and make sure it's unpublished.
-    $this->drupalPost('node/' . $node->nid . '/edit', array(), $this->button_unpublish);
+    $this->drupalPost("node/$node->nid/edit", array(), t('Unpublish'));
     $node = node_load($node->nid, NULL, TRUE);
     $this->assertEqual($node->status, NODE_NOT_PUBLISHED, t('Node unpublished correctly.'));
 
     // Save a new node as a draft, and make sure it's unpublished.
     $edit = $this->getNodeArray();
-    $this->drupalPost('node/add/article', $edit, $this->button_save_draft);
+    $this->drupalPost('node/add/article', $edit, t('Save as draft'));
     $node = $this->drupalGetNodeByTitle($edit[$this->title_key]);
     $this->assertEqual($node->status, NODE_NOT_PUBLISHED, t('Node saved correctly as draft.'));
 
-    // Make sure the publish and save draft buttons are present when on an
-    // unpublished draft.
-    $this->drupalGet('node/' . $node->nid . '/edit');
-    $this->assertRaw('<input type="submit" id="edit-submit" name="op" value="' . $this->button_publish . '" class="form-submit" />', t('Publish button visible on draft node edit.'));
-    $this->assertRaw('<input type="submit" id="edit-draft" name="op" value="' . $this->button_save_draft . '" class="form-submit" />', t('Save draft button visible on draft node edit.'));
     // Publish the node, and make sure it's published.
-    $this->drupalPost('node/' . $node->nid . '/edit', array(), $this->button_publish);
+    $this->drupalPost("node/$node->nid/edit", array(), t('Publish'));
     $node = node_load($node->nid, NULL, TRUE);
     $this->assertEqual($node->status, NODE_PUBLISHED, t('Node published correctly.'));
-
-    // Testing with drafts disabled.
-    variable_set('save_draft_enabled_article', SAVE_DRAFT_DISABLED);
-
-    // Make sure the save draft button is not present when adding a node and
-    // drafts are disabled.
-    $this->drupalGet('node/add/article');
-    $this->assertRaw('<input type="submit" id="edit-submit" name="op" value="' . $this->button_save . '" class="form-submit" />', t('Save button visible on node create.'));
-    $this->assertNoRaw('<input type="submit" id="edit-draft" name="op" value="' . $this->button_save_draft . '" class="form-submit" />', t('Save draft button not visible on node create.'));
-    // Publish a node and edit it again.
-    $edit = $this->getNodeArray();
-    $this->drupalPost('node/add/article', $edit, $this->button_save);
-    $node = $this->drupalGetNodeByTitle($edit[$this->title_key]);
-    // Make sure the unpublish button is present when on a published node and
-    // drafts are disabled.
-    $this->drupalGet('node/' . $node->nid . '/edit');
-    $this->assertRaw('<input type="submit" id="edit-submit" name="op" value="' . $this->button_save . '" class="form-submit" />', t('Save button visible on published node edit.'));
-    $this->assertNoRaw('<input type="submit" id="edit-draft" name="op" value="' . $this->button_unpublish . '" class="form-submit" />', t('Save draft disabled successfully on published node edit.'));
   }
 
   /**
    * Make sure node validation still runs even after we've altered the form.
    */
   public function testNodeValidation() {
-    // Log in as an administrator, who should be able to see the save draft
-    // button and also edit the node's author.
-    $this->drupalLogin($this->admin_user);
-
-    // Enable save draft functionality.
-    variable_set('save_draft_enabled_article', SAVE_DRAFT_ENABLED);
-
-    // Test with & without required validation.
-    foreach (array(TRUE, FALSE) as $skip_required_validation) {
-      debug('Skip required validation: ' . ($skip_required_validation ? 'true' : 'false'));
-      variable_set('save_draft_skip_required_article', $skip_required_validation);
-
-      // Test clicking all the different buttons on the node add page.
-      foreach (array($this->button_publish, $this->button_save_draft, $this->button_preview) as $button_value) {
-        debug('Node add. Button value: ' . $button_value);
-        // Try to create a node with a nonexistent author.
-        $edit = $this->getNodeArray();
-        // Remove the title, which is a required field.
-        unset($edit[$this->title_key]);
-        // This username does not exist.
-        $edit['name'] = $this->randomName(8);
-        $this->drupalPost('node/add/article', $edit, $button_value);
-
-        // Username validation should always fail.
-        $this->assertRaw(t('The username %name does not exist.', array('%name' => $edit['name'])));
-        // Required validation for the title should have passed, unless we are
-        // clicking the Publish button, or skip_required_validation is FALSE, in
-        // which case title should be required.
-        // t() functions are like this to replicate how the string would
-        // normally be created.
-        if (!$skip_required_validation || $button_value == $this->button_publish) {
-          $this->assertRaw(t('!name field is required.', array('!name' => t('Title'))));
-        }
-        else {
-          $this->assertNoRaw(t('!name field is required.', array('!name' => t('Title'))));
-        }
-      }
-      // Test clicking all the different buttons on the node edit page of a
-      // published node.
-      foreach (array($this->button_save, $this->button_unpublish, $this->button_preview, $this->button_delete) as $button_value) {
-        debug('Published node edit. Button value: ' . $button_value);
-        $edit = $this->getNodeArray();
-        $this->drupalPost('node/add/article', $edit, $this->button_publish);
-        $node = $this->drupalGetNodeByTitle($edit[$this->title_key]);
-        // Remove the title, which is a required field.
-        $edit[$this->title_key] = '';
-        // This username does not exist.
-        $edit['name'] = $this->randomName(8);
-        $this->drupalPost('node/' . $node->nid . '/edit', $edit, $button_value);
-        // Username validation should always fail.
-        $this->assertRaw(t('The username %name does not exist.', array('%name' => $edit['name'])));
-        // Required validation for the title should have passed, unless we are
-        // clicking the Save button, or skip_required_validation is FALSE, in
-        // which case title should be required.
-        // t() functions are like this to replicate how the string would
-        // normally be created.
-        if (!$skip_required_validation || $button_value == $this->button_save) {
-          $this->assertRaw(t('!name field is required.', array('!name' => t('Title'))));
-        }
-        else {
-          $this->assertNoRaw(t('!name field is required.', array('!name' => t('Title'))));
-        }
-      }
-      // Test clicking all the different buttons on the node edit page of a
-      // draft node.
-      foreach (array($this->button_save_draft, $this->button_publish, $this->button_preview, $this->button_delete) as $button_value) {
-        debug('Draft node edit. Button value: ' . $button_value);
-        $edit = $this->getNodeArray();
-        $this->drupalPost('node/add/article', $edit, $this->button_save_draft);
-        $node = $this->drupalGetNodeByTitle($edit[$this->title_key]);
-        // Remove the title, which is a required field.
-        $edit[$this->title_key] = '';
-        // This username does not exist.
-        $edit['name'] = $this->randomName(8);
-        $this->drupalPost('node/' . $node->nid . '/edit', $edit, $button_value);
-        // Username validation should always fail.
-        $this->assertRaw(t('The username %name does not exist.', array('%name' => $edit['name'])));
-        // Required validation for the title should have passed, unless we are
-        // clicking the Publish button, or skip_required_validation is FALSE, in
-        // which case title should be required.
-        // t() functions are like this to replicate how the string would
-        // normally be created.
-        if (!$skip_required_validation || $button_value == $this->button_publish) {
-          $this->assertRaw(t('!name field is required.', array('!name' => t('Title'))));
-        }
-        else {
-          $this->assertNoRaw(t('!name field is required.', array('!name' => t('Title'))));
-        }
-      }
-    }
+    // Try to create a node with a nonexistent author.
+    $edit = $this->getNodeArray();
+    // This username does not exist.
+    $edit['name'] = $this->randomName(8);
+    $this->drupalPost('node/add/article', $edit, t('Publish'));
+    // We should not have been allowed to save the node.
+    $this->assertRaw(t('The username %name does not exist.', array('%name' => $edit['name'])));
   }
-
 }
diff --git a/src/SaveDraftTestCase.php b/src/SaveDraftTestCase.php
new file mode 100644
index 0000000..c843d6f
--- /dev/null
+++ b/src/SaveDraftTestCase.php
@@ -0,0 +1,74 @@
+<?php
+namespace Drupal\save_draft;
+
+class SaveDraftTestCase extends DrupalWebTestCase {
+
+  protected $admin;
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Save draft',
+      'description' => 'Make sure the node form still works with Save Draft enabled.',
+      'group' => 'Save draft',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp(array('save_draft'));
+    $this->admin = $this->drupalCreateUser(array('create article content', 'edit any article content', 'save draft'));
+    $this->drupalLogin($this->admin);
+    $langcode = \Drupal\Core\Language\Language::LANGCODE_NOT_SPECIFIED;
+    $this->title_key = "title";
+    $this->body_key = "body[$langcode][0][value]";
+  }
+
+  /**
+   * Return a basic $edit array that can be used to save a node.
+   */
+  public function getNodeArray() {
+    $edit = array();
+    $edit[$this->title_key] = $this->randomName(8);
+    $edit[$this->body_key] = $this->randomName(8);
+    return $edit;
+  }
+
+  /**
+   * Make sure nodes save with the right publication status.
+   */
+  public function testNodeSave() {
+    // Publish a node, and make sure it's published.
+    $edit = $this->getNodeArray();
+    $this->drupalPost('node/add/article', $edit, t('Publish'));
+    $node = $this->drupalGetNodeByTitle($edit[$this->title_key]);
+    $this->assertEqual($node->status, NODE_PUBLISHED, t('Node saved correctly.'));
+
+    // Unpublish it, and make sure it's unpublished.
+    $this->drupalPost("node/$node->nid/edit", array(), t('Unpublish'));
+    $node = node_load($node->nid, NULL, TRUE);
+    $this->assertEqual($node->status, NODE_NOT_PUBLISHED, t('Node unpublished correctly.'));
+
+    // Save a new node as a draft, and make sure it's unpublished.
+    $edit = $this->getNodeArray();
+    $this->drupalPost('node/add/article', $edit, t('Save as draft'));
+    $node = $this->drupalGetNodeByTitle($edit[$this->title_key]);
+    $this->assertEqual($node->status, NODE_NOT_PUBLISHED, t('Node saved correctly as draft.'));
+
+    // Publish the node, and make sure it's published.
+    $this->drupalPost("node/$node->nid/edit", array(), t('Publish'));
+    $node = node_load($node->nid, NULL, TRUE);
+    $this->assertEqual($node->status, NODE_PUBLISHED, t('Node published correctly.'));
+  }
+
+  /**
+   * Make sure node validation still runs even after we've altered the form.
+   */
+  public function testNodeValidation() {
+    // Try to create a node with a nonexistent author.
+    $edit = $this->getNodeArray();
+    // This username does not exist.
+    $edit['name'] = $this->randomName(8);
+    $this->drupalPost('node/add/article', $edit, t('Publish'));
+    // We should not have been allowed to save the node.
+    $this->assertRaw(t('The username %name does not exist.', array('%name' => $edit['name'])));
+  }
+}
