Skip to content

Commit

Permalink
Adjust page click order for test login
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenchristian1telus committed Oct 1, 2024
1 parent 46445b8 commit a24590b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openshift/config/lighthouse/lighthouse-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ async function runLighthouse(url, options, config = null) {

await page.goto(url, { waitUntil: 'networkidle0' }); // Use the APP_HOST_URL environment variable

page.click('a.sysadmin-login');

// Check that the username and password are set and are strings
if (typeof username !== 'string' || typeof password !== 'string') {
throw new Error('TESTER_USERNAME (' + username + ') and TESTER_PASSWORD must be set and must be strings');
Expand All @@ -85,7 +87,6 @@ async function runLighthouse(url, options, config = null) {

// Wait for both the click and navigation
await Promise.all([
page.click('a.sysadmin-login'),
page.click('#admin-login button[type="submit"]'),
page.waitForNavigation({timeout: 60000}),
]);
Expand Down

0 comments on commit a24590b

Please sign in to comment.