4.17.3 • Published 3 years ago

e2e-shared-controdls v4.17.3

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

e2e-shared-controls

These controls are specifically for pages currently in ANGULARJS

If you are looking for our new e2e for React (Jest-Puppeteer), go to bfe2e-shared-controls

Maintainers

  • Bao Nhan Nguyen
  • Priya Kolwalkar
  • Lin Shi

Summary

A collection of shared controls to be used in e2e test cases.

Build

The project is written in TypeScript and compiled to JavaScript before publishing.

To rebuild manually:

grunt build

To watch for ts file changes and rebuild, use:

grunt watch

Test cases

Shared test components should have their own test cases too! They help discover issues in shared components early and reduce debugging effort for actual test cases which make use of this module. They can also serve as examples for how the components should be used in actual test cases.

The test cases do not need to cover actual functionality of webui apps, but should be enough to discover issue when UI element selectors becomes invalid due to UI update.

For example, if you have a function form.save() to click on a form's Save button, you don't need to verify that the function can successfully save the updated content (which should be the job of the corresponding app's e2e test cases). Instead you might want to have test cases to make sure the Save button is actually clicked and the page is redirected to its expected destination.

To run the test cases in production:

grunt e2e

To run the test cases in development:

grunt e2e-dev

If you want to run only one specfic test, use spec with the name of the testfile:

grunt e2e --spec=custom-pages.spec.js
grunt e2e-dev --spec=content-page.spec.js

SSH support

SSHClient class contains a set of methods to communicate with SSH clients. To use this feature to communicate with a client machine, the machine needs to have SSH enabled. On Linux and Mac, SSH should be available by default, you just need to make sure it can be accessed remotely. On Windows, you can enable SSH as follows:

  • Download and install freeSSHd: http://www.freesshd.com/freeSSHd.exe
  • Run freeSSHd as Administrator (no need to run it as service)
  • Add user with Shell and SFTP permission
  • Keep SFTP home path as default as C:\Users\{username}
  • You may need to unload and run freeSSHd as Administrator again
  • Verify that you can sftp to the machine and upload/download files

Known issues

OSX scroll bar

There is a known issue in OSX. Setting scroll bar to "Show scroll bar when scrolling" will introduce some issues when select html elements by using protractor/webdriver apis.

Please set it back to "Always display scroll bar" in System Preferences -> General