Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte committed Mar 17, 2024
1 parent ab571d1 commit c093cea
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions content/dev/testframework/_index.md
Expand Up @@ -6,10 +6,10 @@ layout: docs
---

The Test Framework resides within the `not_for_release/testFramework` directory. This directory is only really available
if you `checkout` the Zen Cart code using `git`. It is not available if you just download the Zen Cart code via a
`release` link.
if you `checkout` the Zen Cart code using `git`. It is not available if you just download the Zen Cart code as a zip file
via a `release` link.

ALERT: Running Zen Cart tests locally has the potential to **overwrite your Zen Cart database and destroy data.**
ALERT: Running Zen Cart tests locally has the potential to **overwrite your Zen Cart database and destroy local data.**

FIXME - work in progress

Expand Down Expand Up @@ -43,10 +43,10 @@ While unit tests allow testing of functions/classes and other small fragments of
testing of the application as a whole. The tests will typically access the application via URLs and test the resulting html returned by those URLs.
Feature tests can also interact with the application, by setting form values and submitting those forms.

NOTE: Current feature tests don't support javascript so interactions with pages that use javascript may not be possible.
NOTE: Current feature tests don't support javascript so interactions with pages that rely on javascript operating may not be possible.
It is planned in the future to allow interactions with pages that rely on javascript using something like `Selenium` or `Panther`.

WARNING: Feature tests rely on Re-creating the database on each separate test suite. This means it will destroy you database.
WARNING: Feature tests rely on Re-creating the database on each separate test suite. This means it will destroy your database.
However, given that you should only be testing on a local development environment, this shouldn't be a problem.

Feature tests can be run using
Expand All @@ -61,10 +61,9 @@ Feature tests can be run using
Feature tests override the standard `configure.php` files used by Zen Cart and require you to create new configure files just for testing purposes.

Your configure files should be created in the `not_for_release/testFramework/Support/configs` directory and will be named
`_USER_.store.configure.php` and `_USER_.admin.configure.php` where the `_USER_` must be replaced by the user that your local environment runs as (ie: the username that you're logged into your PC with).

`_USER_.store.configure.php` and `_USER_.admin.configure.php` where the `_USER_` is replaced by the user that your local environment runs as.

You can find that user by running the following from the root of your installation.
You can find that `user` by running the following from the root of your installation.

`php ./not_for_release/testFramework/detectUser.php`

Expand All @@ -73,8 +72,8 @@ These files are exactly the same format as standard Zen Cart `configure.php` fil

### Migrations and Seeders

As the functional tests rely on a populated database, the test framework uses the mysql install files and demo data found within
the zc_install folder, so this directory needs to be present.
As the functional tests rely on a populated database, the test framework uses the `mysql` install files and demo data found within
the `zc_install` folder, so this directory needs to be present.

There may be times though where you may want to alter the data to test a specific bug.
An example may be when a search is not finding a product that contains certain strings,
Expand All @@ -95,10 +94,10 @@ replacing `StoreWizardSeeder` with the name of your seeder class.
### Mail Server

By default the Test Framework disables the sending of emails.
This can be overridden by usng another configure fil
An eample exists at `not_for_release/testFramework/Support/configs/main.configure.php.example`
The example shows settings for using a local Mailpit instance. `
This can be overridden by usng another configure file
An example exists at `not_for_release/testFramework/Support/configs/main.configure.php.example`
The example shows settings for using a local `Mailpit` (an email server emulator) instance.
Note: Any misconfiguration here will likely result in failing tests.

As with other configure files nited above the actual configure file should be named ``
`_USER_.store.configure.php` with `_USER` being replaced by the user running the tests.
As with other configure files noted above the actual configure file should be named
`_USER_.store.configure.php` with `_USER_` being replaced by the user running the tests.

0 comments on commit c093cea

Please sign in to comment.