): SelfServeDescriptor => {
const root = context.get("root");
context.delete("root");
const inputNames: string[] = [];
- const smartUiDescriptor: Descriptor = {
+ const smartUiDescriptor: SelfServeDescriptor = {
root: {
id: "root",
info: root?.info,
diff --git a/src/SelfServe/__snapshots__/SelfServeComponent.test.tsx.snap b/src/SelfServe/__snapshots__/SelfServeComponent.test.tsx.snap
new file mode 100644
index 000000000..ce478192b
--- /dev/null
+++ b/src/SelfServe/__snapshots__/SelfServeComponent.test.tsx.snap
@@ -0,0 +1,168 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`SelfServeComponent should render 1`] = `
+
+
+ "450",
+ "analyticalStore" => "false",
+ "database" => "db2",
+ }
+ }
+ descriptor={
+ Object {
+ "initialize": [MockFunction] {
+ "calls": Array [
+ Array [],
+ ],
+ "results": Array [
+ Object {
+ "type": "return",
+ "value": Promise {},
+ },
+ ],
+ },
+ "inputNames": Array [
+ "throughput",
+ "containerId",
+ "analyticalStore",
+ "database",
+ ],
+ "onSubmit": [MockFunction],
+ "root": Object {
+ "children": Array [
+ Object {
+ "id": "throughput",
+ "info": undefined,
+ "input": Object {
+ "dataFieldName": "throughput",
+ "defaultValue": 400,
+ "label": "Throughput (input)",
+ "max": 500,
+ "min": 400,
+ "placeholder": undefined,
+ "step": 10,
+ "type": "number",
+ "uiType": "Spinner",
+ },
+ },
+ Object {
+ "id": "containerId",
+ "info": undefined,
+ "input": Object {
+ "dataFieldName": "containerId",
+ "label": "Container id",
+ "placeholder": undefined,
+ "type": "string",
+ },
+ },
+ Object {
+ "id": "analyticalStore",
+ "info": undefined,
+ "input": Object {
+ "dataFieldName": "analyticalStore",
+ "defaultValue": true,
+ "falseLabel": "Disabled",
+ "label": "Analytical Store",
+ "placeholder": undefined,
+ "trueLabel": "Enabled",
+ "type": "boolean",
+ },
+ },
+ Object {
+ "id": "database",
+ "info": undefined,
+ "input": Object {
+ "choices": Array [
+ Object {
+ "key": "db1",
+ "label": "Database 1",
+ },
+ Object {
+ "key": "db2",
+ "label": "Database 2",
+ },
+ Object {
+ "key": "db3",
+ "label": "Database 3",
+ },
+ ],
+ "dataFieldName": "database",
+ "defaultKey": "db2",
+ "label": "Database",
+ "placeholder": undefined,
+ "type": "object",
+ },
+ },
+ ],
+ "id": "root",
+ "info": Object {
+ "link": Object {
+ "href": "https://aka.ms/azure-cosmos-db-pricing",
+ "text": "More Details",
+ },
+ "message": "Start at $24/mo per database",
+ },
+ },
+ }
+ }
+ onInputChange={[Function]}
+ />
+
+
+
+
+
+
+`;
diff --git a/test/selfServe/selfServeExample.spec.ts b/test/selfServe/selfServeExample.spec.ts
index de2e0ebf3..a753d73b9 100644
--- a/test/selfServe/selfServeExample.spec.ts
+++ b/test/selfServe/selfServeExample.spec.ts
@@ -12,13 +12,11 @@ describe("Self Serve", () => {
frame = await getTestExplorerFrame(
new Map([[TestExplorerParams.selfServeType, SelfServeType.example]])
);
- await frame.waitForSelector(".ms-Dropdown");
- const dropdownLabel = await frame.$eval(".ms-Dropdown-label", element => element.textContent);
- expect(dropdownLabel).toEqual("Regions");
- await frame.waitForSelector(".radioSwitchComponent");
- await frame.waitForSelector(".ms-TextField");
- await frame.waitForSelector(".ms-Slider ");
- await frame.waitForSelector(".ms-spinButton-input");
+ await frame.waitForSelector("#regions-dropown-input");
+ await frame.waitForSelector("#enableLogging-radioSwitch-input");
+ await frame.waitForSelector("#accountName-textBox-input");
+ await frame.waitForSelector("#dbThroughput-slider-input");
+ await frame.waitForSelector("#collectionThroughput-spinner-input");
} catch (error) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const testName = (expect as any).getState().currentTestName;