* Running the tests only in the ember cli env hid the fact that the pending posts feature wasn't working in the legacy environment * Tests were using ember-cli-only APIs while there are widely used testing APIs in Discourse that support both ember envs * `ember-test-selectors` was in both dependencies and devDependencies in discourse/package.json * `qunit-dom` in package.json was not only unused but also defunct, as it wasn't pulled into the legacy env app A followup to #14501, and #15128.
20 lines
638 B
JavaScript
20 lines
638 B
JavaScript
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
|
import { skip } from "qunit";
|
|
import { visit } from "@ember/test-helpers";
|
|
|
|
acceptance("Sticky Avatars", function () {
|
|
skip("Adds sticky avatars when scrolling up", async function (assert) {
|
|
const container = document.getElementById("ember-testing-container");
|
|
container.scrollTo(0, 0);
|
|
|
|
await visit("/t/internationalization-localization/280");
|
|
container.scrollTo(0, 800);
|
|
container.scrollTo(0, 700);
|
|
|
|
assert.ok(
|
|
query("#post_5").parentElement.classList.contains("sticky-avatar"),
|
|
"Sticky avatar is applied"
|
|
);
|
|
});
|
|
});
|