When you interview with CaseRails, we'll provide you with the following environment variables that you'll need to use to complete the tasks:
- TEST_LOGIN_URL
- TEST_LOGIN_PASSWORD
- TEST_LOGIN_EMAIL
Interview Task A: Run existing Protractor Tests
- In a shell (the "Main" shell), clone this repository:
git clone [email protected]:CaseRails/interview.git
- Install the requirements. Instructions here are for Mac OS X. For other OS's you're on your own. It should be very similar for Linux. No idea how this works on Windows.
- Install the selenium server:
cat brew_requirements.txt | xargs brew install
- Install the node requirements:
cat node_requirements.txt | xargs npm install -g
- Install the Python requirements:
1.
pip install virtualenvwrapper
2.mkvirtualenv interview
3.pip install -r requirements.txt
- Open a separate shell and run the selenium server:
selenium-server
- In the Main shell, export the environment variables so protractor knows where to login to and what credentials to use:
export TEST_LOGIN_URL=<the url we gave you>
export TEST_LOGIN_PASSWORD=<the password we gave you>
export TEST_LOGIN_EMAIL=<the username we gave you>
- In the Main shell, run the protractor tests:
protractor protractor.conf.js
- Take a screenshot of your Main shell showing that the protractor tests ran successfully.
Interview Task B:
- Create a new spec file
interview.js
in theprotractor/
directory. Refer to dev_intro.js for how this should look. - Edit protractor.conf.js so that your new spec runs after the dev_intro spec.
- To complete this task you'll need to modify the files
protractor.conf.js
,protractor/interview.js
, andprotractor/contacts_list.page.js
. - The interview spec should do the following:
- Start on the "Create Wizard" page, like the dev_intro spec.
- Find the "Contacts" button by its ID on the page. Do this by adding a 'contactsButton' member to the Create Wizard Page Object.
- Click it.
- Verify that the header at the top of the page says "Contacts"
- Find the "Manage" button by its ID on the page. Do this by adding a 'manageButton' member to the Contacts List Page Object.
- Click it.
- Verify that the header at the top of the page says "Manage"
- Run the protractor tests with
protractor protractor.conf.js
, and take a screenshot of your Main shell showing the protractor tests run successfully. - Get me your code, so that I can look at it and run it.
- Make a commit of the files you've changed.
- Create a patch file:
git format-patch origin
- Note - If you have made more than one commit, this will make multiple patch files.
- Email me the patch file(s) so that I can run your code and see if it works.