Skip to content

Commit

Permalink
[behavioural_qc] test (aces#9300)
Browse files Browse the repository at this point in the history
Add tests for behavioural qc module
  • Loading branch information
kongtiaowang authored Oct 1, 2024
1 parent da74c86 commit dfa2ce3
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions modules/behavioural_qc/test/behavioural_qcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,57 @@ public function testPermissions(): void
"Behavioural Quality Control"
);
}
/**
* Tests that link to correct directions
*
* @return void
*/
public function testlinks(): void
{
$this->safeGet($this->url . "/behavioural_qc/");
$bodyText = $this->safeFindElement(
WebDriverBy::cssSelector(
" #dynamictable >".
" tbody > tr:nth-child(1) > td:nth-child(2) > a"
)
)->getAttribute('href');
// check Instrument link
$this->assertStringContainsString(
"radiology_review/?candID=300001",
$bodyText
);
$bodyText = $this->safeFindElement(
WebDriverBy::cssSelector(
" #dynamictable >".
" tbody > tr:nth-child(1) > td:nth-child(3) > a"
)
)->getAttribute('href');
// check Instrument link
$this->assertStringContainsString(
"300001",
$bodyText
);
$bodyText = $this->safeFindElement(
WebDriverBy::cssSelector(
" #dynamictable >".
" tbody > tr:nth-child(1) > td:nth-child(4) > a"
)
)->getAttribute('href');
// check Instrument link
$this->assertStringContainsString(
"300001",
$bodyText
);
$bodyText = $this->safeFindElement(
WebDriverBy::cssSelector(
" #dynamictable >".
" tbody > tr:nth-child(1) > td:nth-child(5) > a"
)
)->getAttribute('href');
// check Instrument link
$this->assertStringContainsString(
"instrument_list/?candID=300001",
$bodyText
);
}
}

0 comments on commit dfa2ce3

Please sign in to comment.