Bram's Dev Blog

home

100 Days of Code Day 67 - More Testing

30 Oct 2018

Intellij IDEA Locate file - Autoscroll from source

Something that’s been annoying me more and more, when jumping to different files in the DSpace 7 project tree is the following:

The problem is that even though the source editor opens the file, the project tree view (CMD+1), just stays where it is, with the previous file highlighted.

Locate current file in IntelliJ gave me the answer. Even though there is supposedly (not sure about Mac) a shortcut that shows you where the current file is in the hierarchy, even better is the “Autoscroll from Source” setting in the menu. Open another file? BAM, tree shows you immediately where you are.

Maybe if you often jump to files that are outside of your project tree (external dependencies, …) it might not be that handy, but for me it’s awesome right now.

Still stuck on the dependency injection problem

My npm test still produces:

FAILED TESTS:
  LangSwitchComponent
    ✖ should create
      Chrome 69.0.3497 (Mac OS X 10.12.6)
    Error: StaticInjectorError(DynamicTestModule)[LangSwitchComponent -> InjectionToken config]:
      StaticInjectorError(Platform: core)[LangSwitchComponent -> InjectionToken config]:
        NullInjectorError: No provider for InjectionToken config!

One problem is that I haven’t found a way to determine which dependency injection it’s exactly failing on. My guess would be the httpClient, referred to in [deps], but right now I haven’t found an example that shows me where this httpclient is created.

It also made me realize that we are currently not using a translation loader in the DSpace 7 app component, but that the language loading logic is just straight into the app component constructor. Created a new issue to follow up ont his.

Day 68 Plan

Solve the dependency injection problems for the tests

Future days - DSpace 7 Angular

Future days - Analyzer.atmire.com work

Future Days - Productivity

Future days - Jekyll http://bram-atmire.github.io/ site

Future Days - Atmire.com work

Investigate and work on search engine optimization (SEO) for the main atmire.com website.

Future Days - Learning just for learning

Sustainability challenge - Finish before Christmas

If I continue like October, I could hit day 68 by end of October and day 98 by end of November.