# Acceptance test content is present on page

**URL:** <https://meta.discourse.org/t/acceptance-test-content-is-present-on-page/57292>\
**Category:** Development\
**Created:** [Février 13, 2017, 2:48 UTC](https://meta.discourse.org/t/acceptance-test-content-is-present-on-page/57292 "2017-02-13T02:48:10Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![rimian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rimian/32/120658_2.png) [@rimian](https://meta.discourse.org/u/rimian)\
**Post date:** [Février 13, 2017, 2:48 UTC](https://meta.discourse.org/t/acceptance-test-content-is-present-on-page/57292/1 "2017-02-13T02:48:10Z")

</div>

What’s the best way to (QUnit) assert an element on the page has some content in it?

This passes:

```plaintext
ok($.trim($('.foo').text()) == 'bar', 'content bar renders on page');

```

But isn’t very practical. Is there a better way?

---

_[View the full topic](https://meta.discourse.org/t/acceptance-test-content-is-present-on-page/57292)._
