This is a working example of using Selenium
, TypeScript
and Page Object Pattern.
These are real test cases that run against a Fider instance.
Check out a running example of the application at http://demo.fider.io.
The tests are available in both TDD and BDD style.
.
├── lib/
├── pages/
├── specs/
├── tests/
└── config.ts
lib
: Think of this as a "framework". Ideally should be a separate module distributed onnpm
pages
: These are yourPage Object
models. Each Page of your application should have a PageObject that maps all the elements and actionsspecs
: All your BDD-style tests goes heretests
: All your TDD-style/classic tests goes hereconfig.ts
: General configuration and settings that are read by tests
Unauthenticated users
should NOT be see Description field
and Submit button
after typing the title.
Authenticated users
should be able to submit new ideas by clicking on Submit button
after typing the title.
After new idea is submitted, user should be redirect to the new idea's display page.
- TDD: tests/test.ts
- BDD: specs/spec.ts