-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b13c0fc
commit 54b351d
Showing
4 changed files
with
53 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { renderFile } from "ejs"; | ||
import { join } from "path"; | ||
|
||
describe("button configuration renders correctly", () => { | ||
const templatePath = join(__dirname, "..", "views", "login_selection.ejs"); | ||
|
||
test("does not render element", async () => { | ||
const html = await renderFile(templatePath, { | ||
login_gov_enabled: false, | ||
mhv_logon_enabled: false, | ||
ds_logon_enabled: false, | ||
id_me_login_link: "something", | ||
}); | ||
expect(html).not.toMatch(/DS Logon/); | ||
expect(html).not.toMatch(/My HealtheVet/); | ||
}); | ||
|
||
test("does render element", async () => { | ||
const html = await renderFile(templatePath, { | ||
login_gov_enabled: true, | ||
mhv_logon_enabled: true, | ||
ds_logon_enabled: true, | ||
id_me_login_link: "something", | ||
mhv_login_link: "something", | ||
dslogon_login_link: "something", | ||
login_gov_login_link: "something", | ||
}); | ||
expect(html).toMatch(/DS Logon/); | ||
expect(html).toMatch(/My HealtheVet/); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters