Skip to content

Commit

Permalink
AB#1064 Fix wdio tests for events
Browse files Browse the repository at this point in the history
  • Loading branch information
gjvoosten committed Jan 15, 2025
1 parent e471b74 commit 02005b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ const Navigation = ({
{(currentUser.isAdmin() ||
!_isEmpty(currentUser?.position?.organizationsAdministrated)) && (
<SidebarLink
id="my-events"
id="my-events-nav"
linkTo={{ pathname: "/events/mine" }}
handleOnClick={resetPages}
>
Expand Down
3 changes: 1 addition & 2 deletions client/tests/webdriver/baseSpecs/myEvents.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { expect } from "chai"
import Home from "../pages/home.page"
import MyEvents from "../pages/myEvents.page"
import Page from "../pages/page"

describe("Home page", () => {
describe("When checking the navigation items", () => {
Expand All @@ -25,7 +24,7 @@ describe("Home page", () => {

describe("My events page", () => {
beforeEach("Open the my events page", async() => {
await MyEvents.openAs(Page.DEFAULT_CREDENTIALS.adminUser)
await MyEvents.openAsAdminUser()
})

afterEach("On the my events page…", async() => {
Expand Down
12 changes: 4 additions & 8 deletions client/tests/webdriver/pages/myEvents.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ class MyEvents extends Page {
await super.open(PAGE_URL)
}

async openAs(user) {
await super.open(PAGE_URL, user)
}

async openAsOnboardUser() {
await super.openAsOnboardUser(PAGE_URL)
async openAsAdminUser() {
await super.openAsAdminUser(PAGE_URL)
}

async getMyEventSeries() {
return browser.$("#my-event-series")
return browser.$("#my-event-series table tbody tr td:first-child")
}

async getMyEvents() {
return browser.$("#my-events")
return browser.$("#my-events table tbody tr td:first-child")
}

async selectEventsSummary() {
Expand Down

0 comments on commit 02005b9

Please sign in to comment.