Skip to content

mdmintz/sails-demo-app

Repository files navigation

⛵ A Sails.js web app with UI tests. ✅

(You'll need npm to run the web app, and Python 3 to run the UI tests with SeleniumBase.)

SeleniumBase Test for the SailsJS Demo App

This app was initially generated by:

npm install sails -g
sails new sails_demo_app --fast

⛵ To complete the setup, run:

npm install

⛵ To start the server, run:

node app.js
# - OR - #
sails lift

⛵ To view the website, go to: http://localhost:1337

(The app will stay up while the server is running.)

Test Environment Setup / Running Tests

(In a separate terminal / command prompt.)

🔵 Go to the ui_tests/ folder:

cd ui_tests/

🔵 Create a Python virtual environment:

# Linux / macOS instructions
python3 -m venv sbase_env
source sbase_env/bin/activate

# Windows instructions
py -m venv sbase_env
call sbase_env\\Scripts\\activate

🔵 Install SeleniumBase + Chromedriver

pip install seleniumbase --upgrade
seleniumbase install chromedriver

🔵 Run the tests

pytest -v --rs --crumbs --dashboard

✅ Here's what all those options do:

  • -v : Display each test on a separate line.
  • --rs : Reuse the browser session between tests.
  • --crumbs : Clear cookies between tests using --rs.
  • --dashboard : Output test results to dashboard.html.

SeleniumBase Links

Sails Links

Sails Version info

This app was generated using Sails v1.4.0 on Jan 10, 2021.

This project's boilerplate is based on an expanded seed app provided by the Sails core team to make it easier for you to build on top of ready-made features like authentication, enrollment, email verification, and billing.

About

Sails.js demo app. Tested with SeleniumBase.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published