Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cartja committed Feb 27, 2024
1 parent 06cd4cf commit ecee552
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/Dashboard/VerifyIdentity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function AccordionItemSwedish(): JSX.Element | null {
title={
<FormattedMessage
description="accordion item swedish title"
defaultMessage="Swedish personal ID number or coordination number"
defaultMessage="Swedish personal ID or coordination number"
/>
}
additionalInfo={
Expand Down
2 changes: 1 addition & 1 deletion src/tests/BankID-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test("renders bankID as expected", async () => {
nav.click();
});
expect(screen.getByRole("heading", { name: "Choose your principal identification method" })).toBeInTheDocument();
const swedishMethodAccordion = screen.getByRole("button", { name: /Swedish personal ID number/i });
const swedishMethodAccordion = screen.getByRole("button", { name: /Swedish personal ID or coordination number/i });
act(() => {
swedishMethodAccordion.click();
});
Expand Down
6 changes: 4 additions & 2 deletions src/tests/VerifyIdentity-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ test("renders verifyIdentity, non verified user", async () => {
render(<VerifyIdentity />);
expect(screen.getByRole("heading", { name: /Connect your identity to your eduID/i })).toBeInTheDocument();
// show two options for verification, swedish id and eu id
const swedishAccordion = screen.getByRole("button", { name: /swedish personal ID number With a digital ID-card/i });
const swedishAccordion = screen.getByRole("button", {
name: /swedish personal ID or coordination number With a digital ID-card/i,
});
expect(swedishAccordion).toBeEnabled();
const eidasAccordion = screen.getByRole("button", { name: /EU citizen/i });
expect(eidasAccordion).toBeEnabled();
Expand Down Expand Up @@ -55,7 +57,7 @@ test("renders verifyIdentity as expected, verified with eidas", async () => {
expect(screen.getByText(/19850101/i)).toBeInTheDocument();
// after eidas verification, still showing swedish identification options
expect(
screen.getByRole("button", { name: /swedish personal ID number With a digital ID-card/i })
screen.getByRole("button", { name: /swedish personal ID or coordination number With a digital ID-card/i })
).toBeInTheDocument();
});

Expand Down
8 changes: 4 additions & 4 deletions src/translation/extractedMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,10 @@
"developer_comment": "accordion item svipe title",
"string": "All other countries"
},
"Xi2uNT": {
"developer_comment": "accordion item swedish title",
"string": "Swedish personal ID or coordination number"
},
"XrBwSu": {
"developer_comment": "eidas freja instruction tip1",
"string": "Tip: Use the app to find your nearest agent"
Expand Down Expand Up @@ -2240,10 +2244,6 @@
"developer_comment": "use ladok - list item 2",
"string": "choose your institution from the drop down list - if it is available."
},
"ohAmxm": {
"developer_comment": "accordion item swedish title",
"string": "Swedish personal ID number or coordination number"
},
"oiMtbK": {
"developer_comment": "Terms of use (heading)",
"string": "Terms of use"
Expand Down

0 comments on commit ecee552

Please sign in to comment.