# integrate
**Repository Path**: mirrors_HubSpot/integrate
## Basic Information
- **Project Name**: integrate
- **Description**: Confirm that your application works.
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-24
- **Last Updated**: 2026-03-01
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
Integrate
=========
Library and application for integration testing at the UI level.
"It's like your computer is haunted by a helpful ghost!"

Watch Integrate in action here:
Integrate test example
What makes Integrate different
------------
* Integrate is designed to help you easily run and debug tests in your browser.
* Its visual cursor makes developing new tests fast and fun.
* Integrate's full-stack approach does not require writing testable code.
* Its JavaScript API allows most tests to be written without callbacks.
* It features a timing model which runs tests as fast as possible while still handling a reasonable threshold of unexpected application slowness.
Quick Start
-----------
You can write your first Integrate test by creating a new HTML file hosted from your app's server like this:
```html
My Integrate Test
```
The CDN links used above can of course be replaced with self-hosted versions.
Documentation
-------------
This documentation assumes that your TestBuilder instance is stored as a variable called `test`, just like in the Quick Start above.
### test.run()
Your Integrate test will do nothing until you call `test.run()` on it. When you call `test.run()`, all of the test steps you have queued up in your TestBuilder will execute, one at a time.
### test.click(selector)
Locates the selector on the page, tests whether an element with that selector is
visible, and simulates a click event on it.
### test.click(someFunc)
```
test.click(function($page) {
$page.find("#some-selector").closest(".wrapper");
})
````
`click` also can take a function which returns the jQuery object to click. The
function is passed a jQuery object containing the entire page (but not the
integrate UI).
### test.assert(selector)
Locates the selector on the page and tests whether an element with that selector
is visible.
### test.assert(selector, substring)
Locates the selector on the page and tests whether `substring` is present inside
of its visible text (or, in the case of an `` element, its `value`
attribute).
### test.assert(someFunc)
`assert` can also be passed a function which should return `true` if the
assertion passes and `false` if it fails:
```
test.assert(function($page) {
$page.find("#some-selector").hasClass("foo");
})
```
The test will fail if the function returns `false` 40 times in a row, but
will continue immediately the first time the function returns true.
Note that unlike the other forms of `assert`, this method can match hidden
elements.
### test.waitFor(someFunc, maxSeconds = 10)
`waitFor` functions just like `assert`, except that instead of trying the
assertion a fixed number of times, it keeps trying until `maxSeconds` has
elapsed. **Use this only when your test depends on significant server-side
processing.** Most of the time, the fast failure that `assert` provides is more
desirable than a slow test.
`waitFor(selector, maxSeconds)` and `waitFor(selector, substring, maxSeconds)`
are also supported.
### test.assertValue(selector, substring)
Locates the selector on the page, tests whether it's visible, and checks whether
the first visible element's value matches the substring. This can be used for
``, `