Skip to content

Demonstrate a way to split protractor tests across multiple files

Notifications You must be signed in to change notification settings

lodybo/jasmine-import-spec-files

Repository files navigation

Splitting Protractor tests across multiple files

!! EXPERIMENT !!

This purpose of this repo is to demonstrate a way to split protractor tests across multiple files. This is especially handy for large test suites, where tests can be split in single-purpose files.

Using ES6

The basis of this experiment is simple: there is a top-level module (called app.spec.ts) which defines a describe function that defines the top-level suite.

After that, a second file (_calculate.spec.ts, for this example following Sass filename conventions) that contains the second unit test. This test (including describe for the suite name) is wrapped in a function that gets export'ed. The top-level file import's that function and simply executes it.

Maybe there's a better way to do this, but this is a way.

Page Objects

About

Demonstrate a way to split protractor tests across multiple files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published