Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New tests #559

Merged
merged 29 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8c8d284
updated user search
Jackson-Williams-15 Apr 19, 2024
0d8a510
deleted duplicate test
Jackson-Williams-15 Apr 19, 2024
499ea53
update discover pagination test
Jackson-Williams-15 Apr 19, 2024
41a23db
update post card test
Jackson-Williams-15 Apr 19, 2024
b4066b0
updated filters test
Jackson-Williams-15 Apr 20, 2024
bd8997d
fixed post card test
Jackson-Williams-15 Apr 20, 2024
abaa6dd
Merge branch 'DiscoverBehavioralTesting' into newTests
Jackson-Williams-15 Apr 21, 2024
929daec
delete account test
Jackson-Williams-15 Apr 21, 2024
c784d55
change username test
Jackson-Williams-15 Apr 21, 2024
beba7ae
discover post searching
Jackson-Williams-15 Apr 21, 2024
1353403
add a friend test
Jackson-Williams-15 Apr 21, 2024
55b46f4
message a friend
Jackson-Williams-15 Apr 21, 2024
417daa2
Merge remote-tracking branch 'origin/main' into newTests
Jackson-Williams-15 Apr 22, 2024
f22a0f7
Merge from main
epadams Apr 22, 2024
11aaba5
Added most tests, only Create and Edit remain
epadams Apr 22, 2024
2cb8cf1
Update README and package.json
epadams Apr 22, 2024
a3a2411
create post test and fixed password for post card test
Jackson-Williams-15 Apr 22, 2024
042b0e6
Fixed conflicts
epadams Apr 22, 2024
3560e5c
Update README
epadams Apr 22, 2024
5180a82
new create post test
Jackson-Williams-15 Apr 22, 2024
ee06e3c
Merge branch 'newTests' of https://github.com/SCCapstone/PalmettoProg…
Jackson-Williams-15 Apr 22, 2024
8366c35
updated create post test
Jackson-Williams-15 Apr 22, 2024
e70ece6
edit post test
Jackson-Williams-15 Apr 22, 2024
ade518b
Merge remote-tracking branch 'origin/main' into newTests
Jackson-Williams-15 Apr 22, 2024
368a144
Added all tests to suite
epadams Apr 22, 2024
fd56c9e
fixed add a friend test and edit post test
Jackson-Williams-15 Apr 22, 2024
dca1247
updated post card test
Jackson-Williams-15 Apr 23, 2024
dca7992
fixed message friend test
Jackson-Williams-15 Apr 23, 2024
e0fee68
Update README and test suite
epadams Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions FU.SPA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,42 +57,35 @@ Add the following to your `hosts` file (`/etc/hosts` on Linux and `C:\Windows\Sy
127.0.0.1 fu-api
127.0.0.1 fu-spa

To test with a clean API and SPA run

npm run selenium-test:clean
**Note: there are currently issues with running tests on the command line. This includes some tests not properly
running and tests being completely unable to run with the Chrome driver. Run them through Selenium IDE for
the best experience.**

To startup a clean API and SPA for test development, run

npm run container-setup

To stop run
To stop containers, run

npm run container-teardown

To start just the API for SPA development, run

npm run api-start

To pause the container press `CTRL-C`. To resume it run the above command. To stop and remove the container run
To pause the container press `CTRL-C`. To resume it run the above command. To stop and remove the container, run

npm run api-teardown

To run tests, go to the Selenium IDE extension in your browser of choice, load the `tests/Forces_Unite.side` project file, and run the tests. You can run tests indivdually
or run them all together in the `default` test suite.

### Developing Selenium Tests

Tests are located in `FU.SPA/tests`.

To add initial testing data, add API calls to `tests/setup-tests.js`. The file can be run manually with `node tests/setup-tests.js`. If run manually, the `API_BASE_URL` environment variable must be set. See [here](https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs) for details.

To run behavioral tests with a API and SPA already running, run

npm run selenium-test

or

selenium-side-runner tests/*.side -c browserName=firefox

You can also change the browserName option to chrome/chromium if you want to test that browser engine instead.

### Coding Style

Prettier and ESLint are used to enforce a consistent coding style.
1 change: 1 addition & 0 deletions FU.SPA/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"format-check": "npx prettier . --check",
"selenium-test": "npx selenium-side-runner tests/Forces_Unite.side -c browserName=firefox",
"selenium-test:clean": "npm run container-setup && npm run selenium-test && npm run container-teardown",
"selenium-test:suite": "npx selenium-side-runner tests/Forces_Unite.side -c browserName=firefox -f ",
"container-setup": "npm run container-teardown && docker compose -f tests/docker-compose.yml up --build -d",
"container-teardown": "docker compose -f tests/docker-compose.yml down",
"api-start": "docker compose -f ../FU.API/FU.API/docker-compose.yml up --build",
Expand Down
Loading
Loading