Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mdmintz/sails-demo-app

Sails.js demo app. Tested with SeleniumBase.
https://github.com/mdmintz/sails-demo-app

sails sails-js sailsjs seleniumbase

Last synced: about 1 month ago
JSON representation

Sails.js demo app. Tested with SeleniumBase.

Awesome Lists containing this project

README

        

## ⛵ A [Sails.js](https://sailsjs.com) web app with UI tests. ✅



SeleniumBase GitHub Actions
Tested with SeleniumBase

(You'll need [npm](https://www.npmjs.com/get-npm) to run the web app, and [Python 3](https://www.python.org/downloads/) to run the UI tests with [SeleniumBase](https://github.com/seleniumbase/SeleniumBase).)

SeleniumBase Test for the SailsJS Demo App

#### This app was initially generated by:

```bash
npm install sails -g
sails new sails_demo_app --fast
```

#### ⛵ To complete the setup, run:

```bash
npm install
```

#### ⛵ To start the server, run:

```bash
node app.js
# - OR - #
sails lift
```

#### ⛵ To view the website, go to: [http://localhost:1337](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:

```bash
cd ui_tests/
```

#### 🔵 Create a Python virtual environment:

```bash
# 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

```bash
pip install seleniumbase --upgrade
seleniumbase install chromedriver
```

#### 🔵 Run the tests

```bash
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

+ [SeleniumBase GitHub Repo](https://github.com/seleniumbase/SeleniumBase)
+ [SeleniumBase Docs Site](https://seleniumbase.io/)

### Sails Links

+ [Sails framework documentation](https://sailsjs.com/get-started)
+ [Version notes / upgrading](https://sailsjs.com/documentation/upgrading)
+ [Deployment tips](https://sailsjs.com/documentation/concepts/deployment)
+ [Community support options](https://sailsjs.com/support)

### 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](https://sailsjs.com/about) to make it easier for you to build on top of ready-made features like authentication, enrollment, email verification, and billing.