Skip to content

Commit

Permalink
Hides parent field if not available in generic relationship select (#…
Browse files Browse the repository at this point in the history
…3850)

* hides parent field if not available

* Fix flaky test for multi profiles and alerts for props (#3847)

* add test id for close button

* close alert before moving on

* fix all alerts to use taost props

* update test to wait after each profile creation

* remove alert in console

* wait for interface to be ready

* correctly wait before query creation

* fix check after comment creation

* update verifiactions tests + increase timeout for proposed changes

* increase timeout for proposed change

* update objects in test to avoid concurrent testing on the same objects

* update locators for hover

* fix metadata test after parent select removal

* remove test since select is removed
  • Loading branch information
pa-lem authored Jul 17, 2024
1 parent 2106d09 commit 5152f12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const RelationshipField = ({
}}
/>

{selectedKind && (
{selectedKind && parentRelationship && (
<FormField
key={`${name}_parent`}
name={name}
Expand All @@ -126,7 +126,7 @@ const RelationshipField = ({
{...field}
{...props}
peer={parentRelationship?.peer}
disabled={props.disabled || !parentRelationship || !selectedKind?.id}
disabled={props.disabled || !selectedKind?.id}
onChange={setSelectedParent}
className="mt-2"
/>
Expand Down
7 changes: 3 additions & 4 deletions frontend/app/tests/e2e/objects/object-metadata.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.describe("Object metadata", () => {
await page.getByRole("link", { name: "All Device(s)" }).click();

// Access device details
await page.getByRole("link", { name: "atl1-core1" }).click();
await page.getByRole("link", { name: "atl1-core2" }).click();

// Acces type metadata
const typeRow = await page.getByText("TypeMX204");
Expand All @@ -29,7 +29,6 @@ test.describe("Object metadata", () => {

// Owner should be empty
await expect(page.getByTestId("select-input").nth(0)).toHaveValue("");
await expect(page.getByTestId("select-input").nth(2)).toHaveValue("");

// Is visible should be checked
await expect(page.getByLabel("is visible *")).toBeChecked();
Expand Down Expand Up @@ -59,7 +58,7 @@ test.describe("Object metadata", () => {
await page.getByRole("link", { name: "All Device(s)" }).click();

// Access device details
await page.getByRole("link", { name: "atl1-core1" }).click();
await page.getByRole("link", { name: "atl1-core2" }).click();

// Acces type metadata
const typeRowUpdated = await page.getByText("TypeMX204");
Expand All @@ -69,7 +68,7 @@ test.describe("Object metadata", () => {

// Source should be Account + Pop-Builder
await expect(page.getByTestId("select-input").nth(0)).toHaveValue("Account");
await expect(page.getByTestId("select-input").nth(2)).toHaveValue("Architecture Team");
await expect(page.getByTestId("select-input").nth(1)).toHaveValue("Architecture Team");

// Is protected should be checked
await expect(page.getByLabel("is protected *")).toBeChecked();
Expand Down

0 comments on commit 5152f12

Please sign in to comment.