But we have had InternJS fully setup for our project and we’ve been happy with it [1]. So moving to yet another JS testing framework is the least we would want to do.

Getting InternJS up and running to test the Web-Components is not easy. I was lucky enough to stumble upon Chris Storm‘s blog posts (1, 2) around the same time I was looking in to this. Those posts helped me to get me on my foot. Although they are not fully functional.

The nature of problem is because of Shadow DOM. Each Web-Component is encapsulated in its own DOM and are completely independent from the rest and also the main DOM.
So even if you capture a reference to the element you want to test you suddenly face the following error from Intern:

stale element reference: element is not attached to the page document

Finally I was able to get a sample test running. It is pretty ugly but at least it could be a start.

The Solution

The problem is coming from WebDriver rather than Intern or Leadfoot. The issue is you can get a reference to the element, but WebDriver thinks that the reference is stale and is not attached to the document. As it only checks the DOM of the main document.

The solution is just a work around on WebDriver’s limitation. Here is a sample which could make it work, if you want to test lets say `id` attribute of that specific nested web-component element.

The above steps should work for majority of modules but it may not work for some.

3. If the module has a HTTPS reference explicitly in its package.json dependencies
Some modules specify the full URL in their dependencies other than just the name. If that is the case NPM would go and fetch the module from that URL . If the URL contains HHTPS although you have specified to use HHTP only but it would try to access HTTPS, so it would freeze there specially if your proxy server blocks that.

In this case:3.1 Clone the repository to your local machine

3.2 Modify the package.json file and replace any HTTPS with HTTP

3.3 Install the local module
To install the module located in your local hard drive, use NPM and instead of module’s name, specify the path:

npm install module/

This should fix most of the issues with installing a module behind a corporate proxy.

I usually have one Windows available in hand in a VM. Knowing windows, it would eat all the hard drive you dedicate to it. So at the setup time I decided to give it a flexible size but maximum of 25GB, which seemed fair for Windows 7. But now that I have had it for a while it got quite big and when I wanted to install a new application, I was running out of space.

Extending an existing drive is not possible, but the whole process to achieve what’s needed is very very simple. All you need to is:

Go to VM’s setting / storage and create a new bigger storage, which would be your only HDD

clone the hard drive from the old one to the new one. Here is the VirtualBox’s command:

In the guest OS, go to “Control Panel/ Administrative Tools/ Computer Management/ Storage” and you should be able to see the extra space as unallocated. Just extend the existing drive to the maximum to use it

[The following notes are a summary of what is mentioned in the video and they are not mine]

Work is not just about contributions and features. It’s not about what you do, it’s how you do it.

Figure out what you want to be doing!
Where you’re at… what are your skills. Depth is not enough. You have to have breadth. Also Social skills and soft-skills.

Identify success

Be specific about it – The path

Create if-then-else for all the obstacles.( if I couldn’t do it this weekend I will do it Sunday)

Schedule the time with yourself. Every month. to look where you are at and what you are doing.

Game Play

# Hard work
# Become indispensible to the team. Become the person who is most important to the organization. If it’s not you, so how could you become the one.
It’s not enough to do what you are told to do. You have to look to other places to contribute. Fill the gaps. Do the right things. It’s also important to do the right things.
# It’s your job to manage your manager. Asking the right questions and giving them the right questions that they need to be successful.
# Does your manager knows what you are doing?

Assessing performance

It’s about trust. How much you manager trusts you? You have to build trust.

– Do the hard work first.
– Use your time effectively.
– Work hardest in the office

Practice

Feedback

be precise with the questions: What was the one thing I could have done to make the project better.
Be open to feedback :

Don’t be defensive

Fight the urge to jump in and answer

Ask for clarification – What would you have done differently?

Listen for emotion

Be thankful

Change and adopt

Teaming Up

Who is the person you admire the most at your job?

What do they do and what do they do differently?

When people come to you, be open. Take the time to understand what they are saying.
Bring solutions to the table.
Empathy and attitude. You have the most control about how you feel about things.

Reverse – Take the time to put yourself in others shoes.
Long term – How you feel about the situation in a year from now. If you won’t care, there no reason to get upset
Chance for growth –

Communications

The tone and the words you use makes a difference.

Improve written messages.

Know your audience. VP of engineering, business person, or team-mates

Start the message with what’s important.

Be concise

“Let me know if you would like more info”.

Make it easy to understand for everyone.

Most successful people are the ones who are able to communicate with everyone and talk at a level that’s accessible for everyone.

Connecting

Making people feel important:

Be present (at conferences). If you’re in a meeting, engage and be in the meeting.

Repeat what you heard. You make people feel heard and important.

Ask questions.

Don’t interrupt

Collaboration

If you are not doing a good job, people don’t want to work with you and they won’t respect you.
Influence : No one cares about how much you know, until the know how much you care.
Improve relationships :
1 – Make list of the most important people in your team
2 – Make a list of people who you have best relationships with
How can you improve your relationships ?
You are the average of your 5 closest friends. and if your 5 closest friends at work are not the most important people. Improve your relationships.

Do you know 3 things you could do, to make your life and career better?

You can’t become the person who you want to be by staying who you are.