mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix app crash opening Install Chart dock tab (#6782)
* Change type of RequestHelmChartValues to be AsyncResult Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fixing tests Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Linter fix Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
8b752981a0
commit
e0bccfabd4
4 files changed
+35
-23
No files matched your search
+20
-15
@@ -240,9 +240,10 @@ describe("installing helm chart from new tab", () => {
|
||||
|
||||
describe("when default configuration and versions resolve", () => {
|
||||
beforeEach(async () => {
|
||||
await requestHelmChartValuesMock.resolve(
|
||||
"some-default-configuration",
|
||||
);
|
||||
await requestHelmChartValuesMock.resolve({
|
||||
callWasSuccessful: true,
|
||||
response: "some-default-configuration",
|
||||
});
|
||||
|
||||
await requestHelmChartVersionsMock.resolve([
|
||||
HelmChart.create({
|
||||
@@ -537,9 +538,10 @@ describe("installing helm chart from new tab", () => {
|
||||
|
||||
describe("when configuration and versions resolve", () => {
|
||||
beforeEach(async () => {
|
||||
await requestHelmChartValuesMock.resolve(
|
||||
"some-other-default-configuration",
|
||||
);
|
||||
await requestHelmChartValuesMock.resolve({
|
||||
callWasSuccessful: true,
|
||||
response: "some-other-default-configuration",
|
||||
});
|
||||
|
||||
await requestHelmChartVersionsMock.resolve([]);
|
||||
});
|
||||
@@ -702,9 +704,10 @@ describe("installing helm chart from new tab", () => {
|
||||
|
||||
describe("when default configuration resolves", () => {
|
||||
beforeEach(async () => {
|
||||
await requestHelmChartValuesMock.resolve(
|
||||
"some-default-configuration-for-other-version",
|
||||
);
|
||||
await requestHelmChartValuesMock.resolve({
|
||||
callWasSuccessful: true,
|
||||
response: "some-default-configuration-for-other-version",
|
||||
});
|
||||
});
|
||||
|
||||
it("renders", () => {
|
||||
@@ -847,9 +850,10 @@ describe("installing helm chart from new tab", () => {
|
||||
)
|
||||
.selectOption("some-other-version");
|
||||
|
||||
await requestHelmChartValuesMock.resolve(
|
||||
"some-default-configuration-for-other-version",
|
||||
);
|
||||
await requestHelmChartValuesMock.resolve({
|
||||
callWasSuccessful: true,
|
||||
response: "some-default-configuration-for-other-version",
|
||||
});
|
||||
|
||||
expect(installButton).not.toHaveAttribute("disabled");
|
||||
});
|
||||
@@ -920,9 +924,10 @@ describe("installing helm chart from new tab", () => {
|
||||
)
|
||||
.selectOption("some-other-version");
|
||||
|
||||
await requestHelmChartValuesMock.resolve(
|
||||
"some-default-configuration-for-other-version",
|
||||
);
|
||||
await requestHelmChartValuesMock.resolve({
|
||||
callWasSuccessful: true,
|
||||
response: "some-default-configuration-for-other-version",
|
||||
});
|
||||
|
||||
const input = rendered.getByTestId(
|
||||
"monaco-editor-for-some-first-tab-id",
|
||||
|
||||
+4
-3
@@ -149,9 +149,10 @@ describe("installing helm chart from previously opened tab", () => {
|
||||
|
||||
describe("when configuration and version resolves", () => {
|
||||
beforeEach(async () => {
|
||||
await requestHelmChartValuesMock.resolve(
|
||||
"some-default-configuration",
|
||||
);
|
||||
await requestHelmChartValuesMock.resolve({
|
||||
callWasSuccessful: true,
|
||||
response: "some-default-configuration",
|
||||
});
|
||||
|
||||
await requestHelmChartVersionsMock.resolve([
|
||||
HelmChart.create({
|
||||
|
||||
Reference in new issue
Block a user