Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "protractor"
- Sure! What do you need?
Oh, it’s very simple, I just want to make a static webpage that shows a clock with the real time.
- Wait, why static? Why not dynamic?
I don’t know, I guess it’ll be easier.
- Well, maybe, but that’s boring, and if that’s boring you are not going to put in time, and if you’re not going to put in time, it’s going to be harder; so it’s better to start with something harder in order to make it easier.
You know that doesn’t make sense right?
Okay, so I want to parse this date first to make the clock be universal for all the regions.
- You’re not going to do that by yourself right? You know what they say, don’t repeat yourself!
But it’s just two lines.
- Don’t reinvent the wheel!
- One component per file!
- It happens, and you’ll get lost managing your files as well. You should use Webpack or Browserify for managing your modules.
- Yes, but some people still have previous versions of ECMAScript, so it wouldn’t be compatible.
Why is it called ECMAScript then?
- It’s called both ways. Anyways, after you install Webpack to manage your modules, you still need a module and dependency manager, such as bower, or node package manager or yarn.
What does that have to do with my page?
- So you can install AngularJS.
Oh, that’s great, so if I modify one sentence on a part of the page, it will automatically refresh the other part of the page which is related to the first one and viceversa?
- Exactly! Except two way data binding is not recommended, since you don’t want child components to edit the parent components of your app.
Then why make two way data binding in the first place?
- It’s backed up by Google. You just don’t get it do you?
I have installed AngularJS now, but it seems I have to redefine something called a... directive?
- AngularJS is old now, you should start using Angular, aka Angular 2.
But it’s the same name... wtf! Only 3 minutes have passed since we started talking, how are they in Angular 2 already?
- You mean 3.
Okay, I now know Angular 6.0, and use a component based architecture using only a one way data binding, I have read and started using the Design Patterns already described to solve my problem without reinventing the wheel using libraries such as lodash and D3 for a world map visualization of my clock as well as moment to parse the dates correctly. I also used ECMAScript 6 with Babel to secure backwards compatibility.
- That’s good.
- But did you use TypeScript?36
It took me way too long to understand the concepts of callbacks and promises... And all this while acting as a tester2
Received my first recruitment message on LinkedIn today. Generic as fuck "hey your profile looks nice, we have dis thing for you, come take a looksie".
Went ahead and read the whole thing, started laughing while reading requirements:
- own a degree in CS or related field: re-starting college next week
- extensive experience with automation processes: uuuh... I can write bash scripts and gulp tasks, how's that?
- extensive experience with Java, Angular, Selenium and Protractor: sure. Spent two weeks tinkering with those tools. Pretty much an expert already
- two years of experience: not even 6 months into my first job
And some other nonsense
Job would be in a very nice city, extended family lives nearby, actually a nice position. Too bad I am not looking for a job and my classes start on Monday 😂
But hey, at least people are looking at my profile! Yay!3
Finally managed to implement a proper E2E testing solution for our app with Protractor and Jasmine. Some basic tests (login and dashboard) are already working.
I'm just so happy to automate everything, going to cut down our manual testing time from 2h to about 20 to 30min if I'm estimating this correctly.
That's all. Just wanted to say I'm very happy with the results 😊5
I have 5 months working on a project that I was assigned and I have already worked with React with Redux, Sagas, Reselect, React Native, Jest, Protractor and PHP.4
What stack are you using to test your angular app and why?
We’re using Karma + Jasmine for writing unit tests, because it’s the default, and run them on GitLab CI in a Docker container. For UI testing we don’t use the default Protractor but Selenium, because we haven’t found a way to run Protractor tests with a dedicated webserver.1