#3464450: "Certain filters should"
Merge request reports
Activity
added 1 commit
- 24894ebb - only show those filters which are defined in source
added 14 commits
-
8ab72c81 - 1 commit from branch
project:2.0.x
- 8ab72c81...7e8ea793 - 3 earlier commits
- b0b4f3c6 - Add filters for maintenance, security, and development status
- ba5ced45 - Remove toArray()
- a8cd938d - Type hint toArray()
- 9f3846d0 - Remove toArray()
- 4a4cf976 - Type hint toArray()
- 9ecaa2ef - on second thought, go ahead and try jsonSerializable
- d4cfd7ac - Coding standards
- 9cd0cfcd - Add FILTERS constant
- a95709c3 - change the ui to show filters or not depending on the source
- ceb17504 - rename $newFilters to $sourceFilters
Toggle commit list-
8ab72c81 - 1 commit from branch
added 1 commit
- 987dd7dd - Make MultipleChoiceFilter take an array for $value
2 2 import { writable } from 'svelte/store'; 3 3 4 4 import { 5 DEFAULT_SOURCE_ID, SORT_OPTIONS, 5 DEFAULT_SOURCE_ID, SORT_OPTIONS, FILTERS, 6 6 } from './constants'; 7 7 8 // Store the selected tab. 9 const storedActiveTab = JSON.parse(sessionStorage.getItem('activeTab')) || DEFAULT_SOURCE_ID; 10 let activeFilters = []; 11 if (Object.keys(FILTERS).length > 0 && storedActiveTab in FILTERS) { changed this line in version 12 of the diff
2 2 import { writable } from 'svelte/store'; 3 3 4 4 import { 5 DEFAULT_SOURCE_ID, SORT_OPTIONS, 5 DEFAULT_SOURCE_ID, SORT_OPTIONS, FILTERS, 6 6 } from './constants'; 7 7 8 // Store the selected tab. 9 const storedActiveTab = JSON.parse(sessionStorage.getItem('activeTab')) || DEFAULT_SOURCE_ID; 10 let activeFilters = []; 11 if (Object.keys(FILTERS).length > 0 && storedActiveTab in FILTERS) { 12 activeFilters = FILTERS[storedActiveTab]; 13 } 14 export const sourceFilters = writable(activeFilters); 446 446 $this->assertEquals($results_before, $results_after); 447 447 } 448 448 449 /** 450 * Tests filters are displayed if they are defined by source. 451 */ 452 public function testFiltersShownIfDefinedBySource(): void { 453 $assert_session = $this->assertSession(); 454 $this->config('project_browser.admin_settings') 455 ->set('enabled_sources', ['recipes']) 456 ->save(); 457 $this->drupalGet('admin/modules/browse'); 458 459 // Recipes doesn't define any filters so no filters are displayed. 460 $this->assertNULL($assert_session->waitForElementVisible('css', 'search__form-filters-container')); Also -- this selector is invalid and will never be available. Surely this should be:
changed this line in version 13 of the diff
455 ->set('enabled_sources', ['recipes']) 456 ->save(); 457 $this->drupalGet('admin/modules/browse'); 458 459 // Recipes doesn't define any filters so no filters are displayed. 460 $this->assertNULL($assert_session->waitForElementVisible('css', 'search__form-filters-container')); 461 462 // Enable module for extra source plugin. 463 $this->container->get('module_installer')->install(['project_browser_devel']); 464 $this->config('project_browser.admin_settings')->set('enabled_sources', ['drupalorg_mockapi'])->save(TRUE); 465 466 $this->drupalGet('admin/modules/browse'); 467 // Drupal.org mockapi defines only two filters (actively maintained filter 468 // and security coverage filter). 469 // @see \Drupal\project_browser\Plugin\ProjectBrowserSource\MockDrupalDotOrg::getFilterDefinitions() 470 $this->assertTrue($assert_session->waitForText('Maintenance Status')); 463 $this->container->get('module_installer')->install(['project_browser_devel']); 464 $this->config('project_browser.admin_settings')->set('enabled_sources', ['drupalorg_mockapi'])->save(TRUE); 465 466 $this->drupalGet('admin/modules/browse'); 467 // Drupal.org mockapi defines only two filters (actively maintained filter 468 // and security coverage filter). 469 // @see \Drupal\project_browser\Plugin\ProjectBrowserSource\MockDrupalDotOrg::getFilterDefinitions() 470 $this->assertTrue($assert_session->waitForText('Maintenance Status')); 471 $assert_session->waitForElementVisible('css', self::MAINTENANCE_OPTION_SELECTOR); 472 $this->assertTrue($assert_session->waitForText('Security Advisory Coverage')); 473 $assert_session->waitForElementVisible('css', self::SECURITY_OPTION_SELECTOR); 474 // Make sure no other filters are displayed. 475 $this->assertFalse($assert_session->waitForText('Development Status')); 476 $this->assertNull($assert_session->waitForElementVisible('css', self::DEVELOPMENT_OPTION_SELECTOR)); 477 $this->assertFalse($assert_session->waitForText('Filter by category')); 478 $this->assertNull($assert_session->waitForElementVisible('css', 'div.search__form-filters-container > div.search__form-filters > section > fieldset > div')); added 1 commit
- 96b695e9 - allow test to decide which filters are defined by the source mockapi
added 28 commits
-
5f2c3994...51b4458a - 3 commits from branch
project:2.0.x
- 51b4458a...91db8cc6 - 15 earlier commits
- 8ca3e23e - phpcs
- 8b696a10 - phpcs
- 62b5578e - test done
- 97ba11f3 - phpcs fix
- 3bd88e46 - phpcs fix
- 499b9f81 - Make MultipleChoiceFilter take an array for $value
- 49a29f87 - address some feedback
- d15f8e8c - address feedback regarding test
- 5579b637 - allow test to decide which filters are defined by the source mockapi
- 122e4f5f - phpcs and phpstan fixes
Toggle commit list-
5f2c3994...51b4458a - 3 commits from branch
Please register or sign in to reply