Remove Explorer.isEmulator (#256)

This commit is contained in:
Steve Faulkner
2020-10-09 11:18:50 -05:00
committed by GitHub
parent 5191ae3f3a
commit 14cdf19efb
26 changed files with 47 additions and 63 deletions

View File

@@ -13,8 +13,7 @@ import ko from "knockout";
describe("ScaleComponent", () => {
const nonNationalCloudContainer = new Explorer({
notificationsClient: undefined,
isEmulator: false
notificationsClient: undefined
});
nonNationalCloudContainer.getPlatformType = () => PlatformType.Portal;
nonNationalCloudContainer.isRunningOnNationalCloud = () => false;
@@ -89,8 +88,7 @@ describe("ScaleComponent", () => {
it("autoScale enabled", () => {
const newContainer = new Explorer({
notificationsClient: undefined,
isEmulator: false
notificationsClient: undefined
});
newContainer.databaseAccount({

View File

@@ -19,6 +19,7 @@ import {
import { getMaxRUs, getMinRUs, hasDatabaseSharedThroughput } from "../SettingsUtils";
import * as AutoPilotUtils from "../../../../Utils/AutoPilotUtils";
import { Text, TextField, Stack, Label, MessageBar, MessageBarType } from "office-ui-fabric-react";
import { configContext, Platform } from "../../../../ConfigContext";
export interface ScaleComponentProps {
collection: ViewModels.Collection;
@@ -43,7 +44,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
private isEmulator: boolean;
constructor(props: ScaleComponentProps) {
super(props);
this.isEmulator = this.props.container.isEmulator;
this.isEmulator = configContext.platform === Platform.Emulator;
}
public isAutoScaleEnabled = (): boolean => {

View File

@@ -106,8 +106,7 @@ describe("SubSettingsComponent", () => {
it("partitionKey not visible", () => {
const newContainer = new Explorer({
notificationsClient: undefined,
isEmulator: false
notificationsClient: undefined
});
newContainer.isPreferredApiCassandra = ko.computed(() => true);