Skip to content

Commit

Permalink
docs edits (#353)
Browse files Browse the repository at this point in the history
* include changes from 5a76c14
remove // -> italics

* CONTRIBUTING symlink
  • Loading branch information
alexfarrill authored Nov 21, 2022
1 parent 71a5a2b commit b8964c1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 96 deletions.
87 changes: 0 additions & 87 deletions docs/CONTRIBUTING.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/CONTRIBUTING.md
20 changes: 12 additions & 8 deletions packages/web/pages/docs/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ For development, you may want to have a demo next app that pulls in your changes

### Run embedded jest tests for the preview server

During the smoke test process described below, the jest tests in `scripts/e2e_test/jest_tests` are copied into the directory where each target framework is installed and run. Before testing them in the framework install context, however, you will want to make sure they pass on the latest build by running `yarn build` and then `yarn e2e:jest` in the mailing project root.
During the framework test process described below, the jest tests in `scripts/e2e_test/jest_tests` are copied into the directory where each target framework is installed and run. Before testing them in the framework install context, however, you will want to make sure they pass on the latest build by running `yarn build` and then `yarn e2e:jest` in the mailing project root.

## Smoke tests
## Framework tests

The directory `scripts/e2e_test` contains smoke tests targeting supported frameworks that should be run before every public npm release. Each test uses the `yarn create` command to create new projects from their `create-*` starter kits and then runs the cypress cli tests contained in `packages/cli/cypress` and the jest tests contained in `scripts/e2e_test/jest_tests`.
The directory `scripts/e2e_test` contains framework tests targeting supported frameworks that should be run before every public npm release. Each test uses the `yarn create` command to create new projects from their `create-*` starter kits and then runs the cypress cli tests contained in `packages/cli/cypress` and the jest tests contained in `scripts/e2e_test/jest_tests`.

The frameworks currently covered by the tests are:

Expand All @@ -69,18 +69,22 @@ The frameworks currently covered by the tests are:
- In the project root, run `asdf install` to install ruby 3.1.2
- In the directory `scripts/e2e_test`, run `bundle install` to install the required ruby gems

**Run the smoke tests**
**Run the framework tests**

- In the project root, run `yarn e2e` to run the full smoke test suite, including cypress and jest tests.
- In the project root, run `yarn test:e2e` to run the full framework test suite, including cypress and jest tests for all supported frameworks.

This will instantiate each framework, add mailing with yalc, and then run the cypress tests contained in `packages/cli/cypress` and the jest tests contained in `scripts/e2e_test/jest_tests`.

The script supports some options for running:
**Run the framework tests with advanced options**

- `--only=redwood_ts` to run the tests only on the specified framework. See TestRunner::E2E_CONFIG for a list of frameworks that are currently supported.
The underlying ruby script `bundle exec ruby e2e/cli.rb` supports some options for running:

- `--app=redwood_ts` to run the tests only on the specified framework. See `e2e/app.rb` for the list of supported frameworks
- `--skip-build` to skip the yarn build part of the script, useful when debugging something unrelated to the build
- `--update-snapshot` if you need to update the snapshots in the framework tests. This will run jest with the `-u` option and then copy
- `--rerun` to skip the framework install part of the script, useful when debugging something in your cypress tests unrelated to the build or the framework install. This will use the framework installs that are present in the runs/latest directory, i.e. the assumption is you've run a test against some framework(s) and you now want to re-running them after adjusting your cypress tests.
the updated snapshots back to mailing.

**Cache the framework installs for faster runs**

- Use the `--save-cache` flag to save each framework install (before mailing is added) to the `cache` directory. Subsequent test runs will use the cache instead of running `yarn create` and `yarn install`, which will speed things up 🏎 If you need to reset the cache, e.g. if you want to test a newer version of the framework or if the framework install process changes, you can delete the cache directory or the subdirectory containing the specific framework you are targeting.
- Use the `--save-cache` flag to save each framework install (before mailing is added) to the `cache` directory. Subsequent test runs will start with a copy of the cache instead of running `yarn create` and `yarn install`, which will speed things up 🏎 If you need to resetthe cache, e.g. if you want to test a newer version of the framework or if the framework install process changes, you can delete the cache directory or the subdirectory containing the specific framework you are targeting.
2 changes: 1 addition & 1 deletion packages/web/pages/docs/lists.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Mailing Lists make sure your users only get the emails they want. With Lists, yo

We hope you and your users will enjoy using Lists!

// This paid feature is part of [Mailing Platform](/docs/platform)
_This paid feature is part of [Mailing Platform](/docs/platform)_

## Usage with sendMail

Expand Down

2 comments on commit b8964c1

@vercel
Copy link

@vercel vercel bot commented on b8964c1 Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./packages/web

web-sofn.vercel.app
web-git-main-sofn.vercel.app
web-rho-puce.vercel.app
www.mailing.run
mailing.run

@vercel
Copy link

@vercel vercel bot commented on b8964c1 Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.