From 3e6fd7e8fd419ed999fe38ee48519dae98988081 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 14 May 2018 21:14:41 +0200 Subject: [ticket/15664] Ajaxify ext actions in ACP PHPBB3-15664 --- tests/functional/extension_acp_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/functional/extension_acp_test.php') diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index ce0f4911e3..68c33ae863 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -195,7 +195,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('.errorbox')->text()); + $this->assertContains('Are you sure that you wish to delete the data associated with “phpBB Moo Extension”?', $crawler->filter('#main')->text()); } public function test_actions() @@ -206,7 +206,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('enable')->form(); + $form = $crawler->selectButton('confirm')->form(); $crawler = self::submit($form); $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('.successbox')->text()); @@ -216,7 +216,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('disable')->form(); + $form = $crawler->selectButton('confirm')->form(); $crawler = self::submit($form); $this->assertContainsLang('EXTENSION_DISABLE_SUCCESS', $crawler->filter('.successbox')->text()); @@ -226,7 +226,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('delete_data')->form(); + $form = $crawler->selectButton('confirm')->form(); $crawler = self::submit($form); $this->assertContainsLang('EXTENSION_DELETE_DATA_SUCCESS', $crawler->filter('.successbox')->text()); -- cgit v1.2.1 From ab0dae600335eb66a31c951e27954accac208296 Mon Sep 17 00:00:00 2001 From: rxu Date: Sat, 28 Jul 2018 16:32:24 +0700 Subject: [ticket/15725] Fix installing ext in tests for master branch PHPBB3-15725 --- tests/functional/extension_acp_test.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/functional/extension_acp_test.php') diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index 68c33ae863..a8d5ace4cf 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -233,5 +233,10 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case // Attempt to enable invalid extension $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=barfoo&sid=' . $this->sid); $this->assertContainsLang('EXTENSION_DIR_INVALID', $crawler->filter('.errorbox')->text()); + + // Test installing/uninstalling extension altogether + $this->logout(); + $this->install_ext('vendor/moo'); + $this->uninstall_ext('vendor/moo'); } } -- cgit v1.2.1 From ebac54aa9e705e99a562d2fe2c0f57bc6af8dd32 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 30 Dec 2018 11:36:08 +0100 Subject: [ticket/14948] Adjust calls for twig and phpunit updates PHPBB3-14948 --- tests/functional/extension_acp_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/functional/extension_acp_test.php') diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index a8d5ace4cf..b398a73e3f 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -37,7 +37,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case self::$helper->restore_original_ext_dir(); } - public function setUp() + public function setUp(): void { parent::setUp(); -- cgit v1.2.1 From 975fe1e153c35d7079d06655c43303b04a6502a7 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Wed, 27 Mar 2019 12:09:55 +0100 Subject: [ticket/15257] Provide extension not enableable messages PHPBB3-15257 --- tests/functional/extension_acp_test.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/functional/extension_acp_test.php') diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index b398a73e3f..9a326dba68 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -86,7 +86,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&sid=' . $this->sid); $this->assertCount(1, $crawler->filter('.ext_enabled')); - $this->assertCount(6, $crawler->filter('.ext_disabled')); + $this->assertCount(7, $crawler->filter('.ext_disabled')); $this->assertContains('phpBB Foo Extension', $crawler->filter('.ext_enabled')->eq(0)->text()); $this->assertContainsLang('EXTENSION_DISABLE', $crawler->filter('.ext_enabled')->eq(0)->text()); @@ -165,9 +165,14 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid); $this->assertContains($this->lang('EXTENSION_ENABLE_CONFIRM', 'phpBB Moo Extension'), $crawler->filter('#main')->text()); - // Correctly submit the enable form + // Correctly submit the enable form, default not enableable message $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor3%2Ffoo&sid=' . $this->sid); $this->assertContainsLang('EXTENSION_NOT_ENABLEABLE', $crawler->filter('.errorbox')->text()); + + // Custom reason messages returned by not enableable extension + $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor5%2Ffoo&sid=' . $this->sid); + $this->assertContains('Reason 1', $crawler->filter('.errorbox')->text()); + $this->assertContains('Reason 2', $crawler->filter('.errorbox')->text()); } public function test_disable_pre() -- cgit v1.2.1