Skip to content

Commit

Permalink
fix system tests and translations work
Browse files Browse the repository at this point in the history
  • Loading branch information
anadis504 committed Mar 28, 2024
1 parent cc3ca26 commit 9a711aa
Show file tree
Hide file tree
Showing 28 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/ktunnel
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -euo pipefail

kubectl delete Deployment/factorial-analysis
# kubectl delete Deployment/factorial-analysis
# kubectl describe ReplicaSet/factorial-analysis # is this needed?
kubectl delete service factorial-analysis
# kubectl delete service factorial-analysis

ktunnel expose factorial-analysis 80:3008

Expand Down
9 changes: 8 additions & 1 deletion src/pages/iframe.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useCallback, useState } from "react"
import ReactDOM from "react-dom"
import { useTranslation } from "react-i18next"

import customViewState from "../../tests/test-data/custom-view-spec.json"
import Renderer from "../components/Renderer"
Expand All @@ -10,7 +11,10 @@ import {
CustomViewIframeState,
UserVariablesMap,
} from "../shared-module/exercise-service-protocol-types"
import { isSetStateMessage } from "../shared-module/exercise-service-protocol-types.guard"
import {
isSetLanguageMessage,
isSetStateMessage,
} from "../shared-module/exercise-service-protocol-types.guard"
import useExerciseServiceParentConnection from "../shared-module/hooks/useExerciseServiceParentConnection"
import { PrivateSpec } from "../util/spec-types/privateSpec"
import { PublicSpec } from "../util/spec-types/publicSpec"
Expand Down Expand Up @@ -50,6 +54,7 @@ export type Url = {
}

const Iframe: React.FC<React.PropsWithChildren<unknown>> = () => {
const { i18n } = useTranslation()
const [state, setState] = useState<State | null>(null)

const callback = useCallback((messageData: unknown, port: MessagePort) => {
Expand Down Expand Up @@ -104,6 +109,8 @@ const Iframe: React.FC<React.PropsWithChildren<unknown>> = () => {
console.error("Unknown view type received from parent")
}
})
} else if (isSetLanguageMessage(messageData)) {
i18n.changeLanguage(messageData.data)
} else {
// eslint-disable-next-line i18next/no-literal-string
console.error("Frame received an unknown message from message port")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9a711aa

Please sign in to comment.