ok
Some checks failed
CI / validate (push) Has been cancelled

This commit is contained in:
isopropilick
2026-08-27 15:00:50 -06:00
parent b35387d841
commit 896c3a121a
19 changed files with 569 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { Given, Then, When } from '@wdio/cucumber-framework';
import { expect } from '@wdio/globals';
import { getElement } from '../selectors/actionHelper.js';
Given('the user is on the login page', async () => {
await browser.url('/login');
});
When(/^the user logs in with (\\w+) and (.+)$/, async (username: string, password: string) => {
await (await getElement('loginPage.inputUsername')).setValue(username);
await (await getElement('loginPage.inputPassword')).setValue(password);
await (await getElement('loginPage.submitButton')).click();
});
Then('the user should see a flash message containing {string}', async (message: string) => {
await expect(await getElement('securePage.flashAlert')).toHaveText(expect.stringContaining(message));
});
Then('the login form should no longer be visible', async () => {
await getElement('loginPage.inputUsername', false);
});