Skip to content
Snippets Groups Projects

Issue #3248928: Redirect or provide link to apply form for user who started update if accessing start form

Merged Issue #3248928: Redirect or provide link to apply form for user who started update if accessing start form
All threads resolved!
All threads resolved!
@@ -239,6 +239,8 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
* Tests deleting an existing update.
*/
public function testDeleteExistingUpdate() {
$conflict_message = 'Cannot begin an update because another Composer operation is currently in progress.';
$assert_session = $this->assertSession();
$page = $this->getSession()->getPage();
$this->setCoreVersion('9.8.0');
@@ -262,7 +264,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$page->pressButton('Cancel update');
$assert_session->addressEquals('/admin/reports/updates/automatic-update');
$assert_session->pageTextContains('The update was successfully cancelled.');
$assert_session->pageTextNotContains('Cannot begin an update because another Composer operation is currently in progress.');
$assert_session->pageTextNotContains($conflict_message);
// Ensure we can start another update after deleting the existing one.
$page->pressButton('Update');
$this->checkForMetaRefresh();
@@ -277,8 +279,14 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$account = $this->createUser([], NULL, TRUE);
$this->drupalLogin($account);
$this->drupalGet('/admin/reports/updates/automatic-update');
$assert_session->pageTextContains('Cannot begin an update because another Composer operation is currently in progress.');
$assert_session->pageTextContains($conflict_message);
$assert_session->buttonNotExists('Update');
// We should be able to delete the previous update, and then we should be
// able to start a new one.
$page->pressButton('Delete existing update');
$assert_session->pageTextContains('Staged update deleted');
$assert_session->pageTextNotContains($conflict_message);
$assert_session->buttonExists('Update');
}
/**
Loading