-
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.
* button toggle * ui test * lint fix * test fix * use ts * add dev ejs * remove test * test with cb * other ways
- Loading branch information
1 parent
be02ebe
commit 9547a52
Showing
7 changed files
with
113 additions
and
30 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 |
---|---|---|
|
@@ -147,4 +147,4 @@ | |
"jsonwebtoken": ">=9.0.0", | ||
"browserify-sign": ">=4.2.2" | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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 () => { | ||
renderFile( | ||
templatePath, | ||
{ | ||
login_gov_enabled: false, | ||
mhv_logon_enabled: false, | ||
ds_logon_enabled: false, | ||
id_me_login_link: "something", | ||
}, | ||
(err, html) => { | ||
expect(html).not.toMatch(/DS Logon/); | ||
expect(html).not.toMatch(/My HealtheVet/); | ||
expect(html).not.toMatch(/<title>Login.gov<\/title>/); | ||
expect(html).not.toMatch(/Other ways to verify/); | ||
} | ||
); | ||
}); | ||
|
||
test("does render element", async () => { | ||
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", | ||
}, | ||
(err, html) => { | ||
expect(html).toMatch(/DS Logon/); | ||
expect(html).toMatch(/My HealtheVet/); | ||
expect(html).toMatch(/<title>Login.gov<\/title>/); | ||
expect(html).toMatch(/Other ways to verify/); | ||
} | ||
); | ||
}); | ||
}); |
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
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