Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-6165 - Vue3 upgrade: fix src/components/data-external-tool tests #3026

Merged
merged 4 commits into from
Jan 22, 2024

Conversation

MartinSchuhmacher
Copy link
Contributor

@MartinSchuhmacher MartinSchuhmacher commented Jan 22, 2024

Short Description

Because of the vue3 upgrade we need to refactor the following tests (src/components/data-external-tool):

data-external-tool/ContextExternalToolConfigurationStatus.composable.unit.ts
data-external-tool/ContextExternalToolApi.composable.unit.ts
data-external-tool/ExternalToolElementDisplayState.composable.unit.ts
data-external-tool/ExternalToolLaunchState.composable.unit.ts
data-external-tool/ExternalToolApi.composable.unit.ts
data-external-tool/SchoolExternalToolApi.composable.unit.ts
data-external-tool/SchoolExternalToolUsage.composable.unit.ts

Links to Ticket and related Pull-Requests

BC-6165

Checklist before merging

  • QA: In addition to review, the code has been manually tested (if manual testing is possible)
  • PO: Any deviation from requirements was agreed with Product-Owner / ticket author / support-team
  • DEV: Every new component is implemented having accessibility in mind (e.g. aria-label, role property)

Notice: Please keep this Pull-Request as a Draft (or add WIP label), until it is ready to be reviewed

@MartinSchuhmacher MartinSchuhmacher self-assigned this Jan 22, 2024
@MartinSchuhmacher MartinSchuhmacher changed the base branch from main to BC-3844-vue3-webpack January 22, 2024 13:13
@MartinSchuhmacher MartinSchuhmacher added the waiting for review Someone should review this ASAP label Jan 22, 2024
@@ -25,8 +25,13 @@ describe("ExternalToolLaunchState.composable", () => {

afterEach(() => {
jest.clearAllMocks();

window.location.href = "";
Object.defineProperty(window, "location", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the defineProperty() in afterEach()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, should be set once outside, fixed that

@MartinSchuhmacher MartinSchuhmacher merged commit 91d3182 into BC-3844-vue3-webpack Jan 22, 2024
29 of 34 checks passed
@MartinSchuhmacher MartinSchuhmacher deleted the BC-6165-vue3-tests branch January 22, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for review Someone should review this ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants