Skip to content

Commit

Permalink
try grabbing text and comparing expected error
Browse files Browse the repository at this point in the history
  • Loading branch information
haraprasadj committed Jun 27, 2024
1 parent f80e1ea commit c10be88
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions services/apis/fence/fenceTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,15 +515,8 @@ module.exports = {
}
// }
} else {
try {
I.seeTextEquals('Bad Request', 'h2');
} catch (err) {
try {
I.seeTextEquals('Unauthorized', 'h2');
} catch (err) {
console.log('Expected to see Bad Request or Unauthorized on the page');
}
}
let errorMessage = await I.grabTextFrom('//div[@class="error-page__status-code-text"]/h2');
expect(errorMessage).to.be.oneOf(["Bad Request", "Unauthorized"]);
}
// I.saveScreenshot('consent_auth_code_flow.png');
const urlStr = await I.grabCurrentUrl();
Expand Down

0 comments on commit c10be88

Please sign in to comment.