Learn
- Clean Code, YouTube
- PHP: The Right Way, link
- Udemy courses
- Design Pattern, Doc
- Postman for testing API, YouTube
Todo - Project repo, doc
- Local Taverna
- Study Taverna Rest Service
- Could use beanshell to retrieve webapp
Done - Project
- Update Prototype link
Todo
- Add-additional-info-to-preview-#428
- Pass unit test for
FormattedDatasetLinkPreview
- Try to pass the acceptance test
Done
Blocker
Retrieve citation detail in text in dataset page
- Fix
Text
cross browser performance problem by changing it to <a></a>
tag
- Pass the behat test by triggering
onClick
event.
/**
* @When /^I click "([^"]*)"$/
* To trigger onclick event
*/
public function iClick($arg1)
{
$element = $this->minkContext->getSession()->getPage()->find('css', "a[id='$arg1']" );
$element->click();
}
- Add-delete-button-#457
- When press
Save
, it will return `Non-type error'
- To fix it by changing
FindByAttribute
to FindByPk
in AdminFileController
- Add
File Attribute Id
row in adminFile/view/id
to visualize
<?php
$sample_id = FileSample::model()->find('file_id=:file_id', array(':file_id'=>$model->id));
if(isset($sample_id))
{
$sample_name= Sample::model()->find('id=:id',array(':id'=>$sample_id->sample_id));
$attributes = FileAttributes::model()->findAll('file_id=:file_id', array(':file_id'=>$sample_id->file_id));
}
$name="Not Set";
if(isset($sample_id)&&isset($sample_name))
{
$name=$sample_name->name;
}
if(isset($sample_id)&&isset($attributes))
{
$attribute_id = "";
foreach ($attributes as $attribute)
{
$attribute_id .= $attribute->id." ";
}
}
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'id',
'dataset_id',
'name',
'location',
'extension',
'size',
'description',
'date_stamp',
'format_id',
'type_id',
array(
'name'=>'Sample',
'value'=> $name,
),
array(
'name'=>'FileAttributeID',
'value'=>$attribute_id,
)
),
)); ?>
- Show all file attributes, if more than one, into that row
- Implement two acceptance tests
I should see field with value
and I should see field without value
/**
* @Then I should see field :arg1 with value :arg2
*/
public function iShouldSeeFieldWithValue($arg1, $arg2)
{
PHPUnit_Framework_Assert::assertNotNull(
$row = $this->minkContext->getSession()->getPage()->find('css', sprintf('table tr:contains("%s""$s")', $arg1, $arg2))
);
}
/**
* @Then I should see field :arg1 without value :arg2
*/
public function iShouldSeeFieldWithoutValue($arg1, $arg2)
{
$row = $this->minkContext->getSession()->getPage()->find('css', sprintf('table tr:contains("%s""$s")', $arg1, $arg2));
$value = preg_match('/<td>\d*\s<\/td>/', $row->getHtml());
PHPUnit_Framework_Assert::assertEquals(0, $value);
}
Reference