Skip to content

Commit

Permalink
ATO-1063: Updates test matcher [deploy]
Browse files Browse the repository at this point in the history
Uses a new test matcher which does not have hardcoded values and instead
pulls from the environment variables
  • Loading branch information
Ryan-Andrews99 committed Sep 24, 2024
1 parent 484792b commit dd6094f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ Feature: A page where users can view the details associated with a client
Then they should see the value for the Client ID "P0_ZdXojEGDlaZEU8Q9Zlv-fo1s"

@ci @smoke
Scenario: The user wants to view the user name and password for end journey
Then they should see the text "Username: integration-user"
And they should see the text "Password: winter2021"
Scenario: The user wants to view the user name and password for integration environment
Then they should see the basic auth details for the integration environment

Rule: The the hidden content and the links which open in a new tab, are available for the user to view
@ci @smoke
Expand Down
6 changes: 6 additions & 0 deletions ui-automation-tests/support/steps/clients-steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@ Then("they should see that claims field is not present", async function (this: T
assert.ok("Claims field is not present, as expected.");
}
});

Then("they should see the basic auth details for the integration environment", async function (this: TestContext) {
const bodyText = await this.page.$eval("body", element => element.textContent);
assert.equal(bodyText?.includes(`Username: ${this.basicAuthUsername}`), true, `Body text does not contain '${this.basicAuthUsername}'`);
assert.equal(bodyText?.includes(`Password: ${this.basicAuthPassword}`), true, `Body text does not contain '${this.basicAuthPassword}'`);
});

0 comments on commit dd6094f

Please sign in to comment.