Skip to content
Snippets Groups Projects
Commit c6262dde authored by Fran Garcia-Linares's avatar Fran Garcia-Linares
Browse files

Add tests.

parent 2a9b91d8
No related branches found
No related tags found
No related merge requests found
......@@ -169,6 +169,7 @@ class RandomDataPlugin extends PluginBase implements ProjectBrowserSourceInterfa
'field_module_categories' => [$categories[$category]],
'field_security_advisory_coverage' => $security_values[$security]['id'],
'field_project_machine_name' => $machine_name,
'is_compatible' => (bool) ($i % 4),
'project_usage' => [],
'project_usage_total' => rand(0, 100000),
'flag_project_star_user_count' => rand(0, 100),
......
......@@ -126,4 +126,18 @@ class ProjectBrowserPluginTest extends WebDriverTestBase {
$assert_session->responseContains('puzzle-piece-placeholder.svg');
}
/**
* Tests the not-compatible flag.
*/
public function testNotCompatibleButton(): void {
$assert_session = $this->assertSession();
$page = $this->getSession()->getPage();
$this->drupalGet('admin/modules/browse');
$assert_session->waitForElementVisible('css', '#project-browser .project');
$assert_session->pageTextContains('Results');
$disabled_button = $page->find('css', '.button.is-disabled');
$this->assertEquals('Not compatible', $disabled_button->getText());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment