Skip to content

Commit

Permalink
DEV: Update test selectors for glimmer header
Browse files Browse the repository at this point in the history
In preparation for discourse/discourse#26467
  • Loading branch information
davidtaylorhq committed Apr 4, 2024
1 parent f2906e0 commit 2d0036e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/javascripts/acceptance/assigns-tab-user-menu-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ acceptance(

test("the assigns tab is not shown", async function (assert) {
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
assert.dom("#user-menu-button-assign-list").doesNotExist();
});
}
Expand All @@ -79,7 +79,7 @@ acceptance(

test("the assigns tab is not shown", async function (assert) {
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
assert.dom("#user-menu-button-assign-list").doesNotExist();
});
}
Expand Down Expand Up @@ -134,7 +134,7 @@ acceptance("Discourse Assign | user menu", function (needs) {

test("assigns tab", async function (assert) {
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
assert.dom("#user-menu-button-assign-list").exists("assigns tab exists");
assert
.dom("#user-menu-button-assign-list .d-icon-user-plus")
Expand All @@ -157,7 +157,7 @@ acceptance("Discourse Assign | user menu", function (needs) {

test("clicking on the assign tab when it's already selected navigates to the user's assignments page", async function (assert) {
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
await click("#user-menu-button-assign-list");
await click("#user-menu-button-assign-list");

Expand All @@ -170,7 +170,7 @@ acceptance("Discourse Assign | user menu", function (needs) {

test("displays unread assign notifications on top and fills the remaining space with read assigns", async function (assert) {
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
await click("#user-menu-button-assign-list");

const notifications = queryAll(
Expand Down Expand Up @@ -251,7 +251,7 @@ acceptance("Discourse Assign | user menu", function (needs) {

test("dismiss button", async function (assert) {
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
await click("#user-menu-button-assign-list");

assert
Expand Down Expand Up @@ -284,7 +284,7 @@ acceptance("Discourse Assign | user menu", function (needs) {
test("empty state", async function (assert) {
forceEmptyState = true;
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
await click("#user-menu-button-assign-list");

assert
Expand All @@ -307,7 +307,7 @@ acceptance("Discourse Assign | user menu", function (needs) {

test("renders the confirmation modal when dismiss assign notifications", async function (assert) {
await visit("/");
await click(".d-header-icons .current-user");
await click(".d-header-icons .current-user button");
await click("#user-menu-button-assign-list");
await click(".notifications-dismiss");
assert.false(markRead, "a request to the server is not made");
Expand Down

0 comments on commit 2d0036e

Please sign in to comment.