Skip to content

Commit ff1d57a

Browse files
committed
Updated e2e tests to use the updated selectors
1 parent f8c5fbb commit ff1d57a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

webapp/test/e2e/steps/register.steps.mjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ import assert from 'assert'
44
Given('the register page is open', async function () {
55
const page = this.page
66
if (!page) throw new Error('Page not initialized')
7-
await page.goto('http://localhost')
7+
await page.goto('http://localhost/register')
88
})
99

1010
When('I enter {string} as the username and submit', async function (username) {
1111
const page = this.page
1212
if (!page) throw new Error('Page not initialized')
13-
await page.fill('#username', username)
14-
await page.click('.submit-button')
13+
await page.fill('input[autocomplete="username"]', username)
14+
await page.fill('input[autocomplete="new-password"]', 'password123')
15+
await page.click('button[type="submit"]')
1516
})
1617

1718
Then('I should see a welcome message containing {string}', async function (expected) {
1819
const page = this.page
1920
if (!page) throw new Error('Page not initialized')
20-
await page.waitForSelector('.success-message', { timeout: 5000 })
21-
const text = await page.textContent('.success-message')
22-
assert.ok(text && text.includes(expected), `Expected success message to include "${expected}", got: "${text}"`)
21+
await page.waitForSelector('.MuiAlert-message', { timeout: 5000 })
22+
const text = await page.textContent('.MuiAlert-message')
23+
assert.ok(text && text.includes(expected), `Expected "${expected}", got: "${text}"`)
2324
})

0 commit comments

Comments
 (0)