push
github
72 of 100 branches covered (72.0%)
Branch coverage included in aggregate %.
54 of 648 new or added lines in 27 files covered. (8.33%)
54 existing lines in 21 files now uncovered.405 of 1642 relevant lines covered (24.67%)
8.88 hits per line
1 |
import PanelComponent from './panel.jsx'; |
|
2 |
|
|
3 |
class StoryListComponent { |
× |
NEW
|
oninit({ attrs: { app } }) {
|
× |
5 |
this.app = app;
|
× |
6 |
} |
× |
7 |
|
|
8 |
async selectStory(storyItemElement) { |
× |
9 |
await this.app.selectStory(Number(storyItemElement.dataset.index));
|
× |
10 |
await this.app.save();
|
× |
11 |
PanelComponent.closeAllPanels(); |
× |
12 |
} |
× |
13 |
|
|
14 |
view() { |
× |
NEW
|
return (
|
× |
NEW
|
<div className="story-list-container">
|
× |
NEW
|
<h2>Story List</h2> |
× |
NEW
|
<ul |
× |
NEW
|
className="story-list"
|
× |
NEW
|
onclick={({ target }) => this.selectStory(target.closest('.story-list-item'))} |
× |
21 |
> |
|
NEW
|
{this.app.stories.map((storyMetadata, s) => {
|
× |
NEW
|
return (
|
× |
NEW
|
<li className="story-list-item" data-index={s}>
|
× |
NEW
|
{storyMetadata.name} |
× |
NEW
|
</li> |
× |
27 |
); |
|
NEW
|
})} |
× |
NEW
|
</ul> |
× |
NEW
|
</div> |
× |
31 |
); |
|
UNCOV
32
|
} |
× |
UNCOV
33
|
} |
× |
34 |
|
|
35 |
export default StoryListComponent; |
× |