Skip to content

Commit

Permalink
Merge pull request #1829 from appsmithorg/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
mohanarpit committed Nov 20, 2020
2 parents 2a3f8d9 + 6487508 commit bb3231d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ jobs:
CYPRESS_TESTUSERNAME2: ${{ secrets.CYPRESS_TESTUSERNAME2 }}
CYPRESS_TESTPASSWORD2: ${{ secrets.CYPRESS_TESTPASSWORD1 }}
APPSMITH_DISABLE_TELEMETRY: true
APPSMITH_GOOGLE_MAPS_API_KEY: ${{ secrets.APPSMITH_GOOGLE_MAPS_API_KEY }}
POSTGRES_PASSWORD: postgres
run: |
./cypress/setup-test.sh
Expand All @@ -213,6 +214,8 @@ jobs:
CYPRESS_TESTPASSWORD1: ${{ secrets.CYPRESS_TESTPASSWORD1 }}
CYPRESS_TESTUSERNAME2: ${{ secrets.CYPRESS_TESTUSERNAME2 }}
CYPRESS_TESTPASSWORD2: ${{ secrets.CYPRESS_TESTPASSWORD1 }}
APPSMITH_DISABLE_TELEMETRY: true
APPSMITH_GOOGLE_MAPS_API_KEY: ${{ secrets.APPSMITH_GOOGLE_MAPS_API_KEY }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
with:
browser: chrome
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ export const RichtextEditorComponent = (
useEffect(() => {
if (
editorInstance !== null &&
props.defaultValue !== editorContent.current
(editorContent.current.length === 0 ||
editorContent.current !== props.defaultValue)
) {
setTimeout(() => {
const content = props.defaultValue
? props.defaultValue.replace(/\n/g, "<br/>")
: props.defaultValue;
editorInstance.setContent(props.defaultValue, { format: "html" });
editorInstance.setContent(content, {
format: "html",
});
}, 200);
}
}, [props.defaultValue]);
Expand Down
15 changes: 15 additions & 0 deletions contributions/docs/TestAutomation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,18 @@ Config add your registered username and password.
```
12. Once the cypress.json file is ready, we can actually run tests from the cypress client.
13. Cypress supports Chrome/Firefox/electron browsers. Select a suitable browser and check the status of your tests.

## How do I add environment variables required for Cypress tests?

**Note:** This can only be done by the project maintainers. Please contact one of them if you require this step to be accomplished.

1. Go to [https://github.com/appsmithorg/appsmith/settings/secrets/actions](https://github.com/appsmithorg/appsmith/settings/secrets/actions).
2. Click on "New Repository Secret"
3. Add the secret key & value here. These values will be masked in the CI output logs incase they are printed out.
4. Save the value.
5. In the file `.github/workflows/client.yml`, find the steps named: "Setting up the cypress tests" & "Run the cypress test". These steps are responsible for setting up & executing the Cypress tests.
6. Add the env variable there in the form:
```
YOUR_SECRET_KEY: ${{ secrets.APPSMITH_YOUR_SECRET_KEY }}
```
7. Commit & push the file `.github/workflows/client.yml` to the default branch (`release`). Please remember that the changes to the build file will not take effect unless they are committed against the default branch.

0 comments on commit bb3231d

Please sign in to comment.