mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #5955 from kasimi/ticket/16449
[ticket/16449] Remove AJAX actions for extension management
This commit is contained in:
@@ -200,7 +200,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
||||
$this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
|
||||
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
|
||||
$this->assertContains('Are you sure that you wish to delete the data associated with “phpBB Moo Extension”?', $crawler->filter('#main')->text());
|
||||
$this->assertContains('Are you sure that you wish to delete the data associated with “phpBB Moo Extension”?', $crawler->filter('.errorbox')->text());
|
||||
}
|
||||
|
||||
public function test_actions()
|
||||
@@ -211,7 +211,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
||||
|
||||
// Correctly submit the enable form
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
|
||||
$form = $crawler->selectButton('confirm')->form();
|
||||
$form = $crawler->selectButton('enable')->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('.successbox')->text());
|
||||
|
||||
@@ -221,7 +221,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
||||
|
||||
// Correctly submit the disable form
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
|
||||
$form = $crawler->selectButton('confirm')->form();
|
||||
$form = $crawler->selectButton('disable')->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->assertContainsLang('EXTENSION_DISABLE_SUCCESS', $crawler->filter('.successbox')->text());
|
||||
|
||||
@@ -231,7 +231,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
||||
|
||||
// Correctly submit the delete data form
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
|
||||
$form = $crawler->selectButton('confirm')->form();
|
||||
$form = $crawler->selectButton('delete_data')->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->assertContainsLang('EXTENSION_DELETE_DATA_SUCCESS', $crawler->filter('.successbox')->text());
|
||||
|
||||
|
@@ -418,17 +418,18 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
|
||||
public function install_ext($extension)
|
||||
{
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
$ext_path = str_replace('/', '%2F', $extension);
|
||||
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
|
||||
$this->assertGreaterThan(1, $crawler->filter('div.main fieldset div input.button2')->count());
|
||||
$this->assertGreaterThan(1, $crawler->filter('div.main fieldset.submit-buttons input')->count());
|
||||
|
||||
$form = $crawler->selectButton('confirm')->form();
|
||||
$form = $crawler->selectButton($this->lang('EXTENSION_ENABLE'))->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$meta_refresh = $crawler->filter('meta[http-equiv="refresh"]');
|
||||
|
||||
@@ -448,17 +449,18 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
|
||||
public function disable_ext($extension)
|
||||
{
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
$ext_path = str_replace('/', '%2F', $extension);
|
||||
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
|
||||
$this->assertGreaterThan(1, $crawler->filter('div.main fieldset div input.button2')->count());
|
||||
$this->assertGreaterThan(1, $crawler->filter('div.main fieldset.submit-buttons input')->count());
|
||||
|
||||
$form = $crawler->selectButton('confirm')->form();
|
||||
$form = $crawler->selectButton($this->lang('EXTENSION_DISABLE'))->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$meta_refresh = $crawler->filter('meta[http-equiv="refresh"]');
|
||||
|
||||
@@ -478,17 +480,18 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
|
||||
public function delete_ext_data($extension)
|
||||
{
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
$ext_path = str_replace('/', '%2F', $extension);
|
||||
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
|
||||
$this->assertGreaterThan(1, $crawler->filter('div.main fieldset div input.button2')->count());
|
||||
$this->assertGreaterThan(1, $crawler->filter('div.main fieldset.submit-buttons input')->count());
|
||||
|
||||
$form = $crawler->selectButton('confirm')->form();
|
||||
$form = $crawler->selectButton($this->lang('EXTENSION_DELETE_DATA'))->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$meta_refresh = $crawler->filter('meta[http-equiv="refresh"]');
|
||||
|
||||
|
@@ -333,16 +333,17 @@ class phpbb_ui_test_case extends phpbb_test_case
|
||||
|
||||
public function install_ext($extension)
|
||||
{
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
$ext_path = str_replace('/', '%2F', $extension);
|
||||
|
||||
$this->visit('adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
|
||||
$this->assertNotEmpty(count($this->find_element('cssSelector', 'div.main fieldset div input.button2')));
|
||||
$this->assertNotEmpty(count($this->find_element('cssSelector', 'div.main fieldset.submit-buttons input.button2')));
|
||||
|
||||
$this->find_element('cssSelector', "input[value='Yes']")->submit();
|
||||
$this->add_lang('acp/extensions');
|
||||
$this->find_element('cssSelector', "input[value='" . $this->lang('EXTENSION_ENABLE') . "']")->submit();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -368,16 +369,17 @@ class phpbb_ui_test_case extends phpbb_test_case
|
||||
|
||||
public function disable_ext($extension)
|
||||
{
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
$ext_path = str_replace('/', '%2F', $extension);
|
||||
|
||||
$this->visit('adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
|
||||
$this->assertNotEmpty(count($this->find_element('cssSelector', 'div.main fieldset div input.button2')));
|
||||
$this->assertNotEmpty(count($this->find_element('cssSelector', 'div.main fieldset.submit-buttons input.button2')));
|
||||
|
||||
$this->find_element('cssSelector', "input[value='Yes']")->submit();
|
||||
$this->add_lang('acp/extensions');
|
||||
$this->find_element('cssSelector', "input[value='" . $this->lang('EXTENSION_DISABLE') . "']")->submit();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -403,16 +405,17 @@ class phpbb_ui_test_case extends phpbb_test_case
|
||||
|
||||
public function delete_ext_data($extension)
|
||||
{
|
||||
$this->add_lang('acp/extensions');
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
$ext_path = str_replace('/', '%2F', $extension);
|
||||
|
||||
$this->visit('adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
|
||||
$this->assertNotEmpty(count($this->find_element('cssSelector', 'div.main fieldset div input.button2')));
|
||||
$this->assertNotEmpty(count($this->find_element('cssSelector', 'div.main fieldset.submit-buttons input.button2')));
|
||||
|
||||
$this->find_element('cssSelector', "input[value='Yes']")->submit();
|
||||
$this->add_lang('acp/extensions');
|
||||
$this->find_element('cssSelector', "input[value='" . $this->lang('EXTENSION_DELETE_DATA') . "']")->submit();
|
||||
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user