Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
pa-lem committed Sep 18, 2024
1 parent 110ccee commit be6cd8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function RelationshipsButtons() {
<ButtonWithTooltip
disabled={!permission.write.allow}
tooltipEnabled
tooltipContent={permission.write.message ?? "Edit object"}
tooltipContent={permission.write.message ?? "Add relationship"}
onClick={() => setShowAddDrawer(true)}
data-testid="open-relationship-form-button">
<Icon icon="mdi:plus" className="mr-1.5" aria-hidden="true" /> Add{" "}
Expand Down
4 changes: 3 additions & 1 deletion frontend/app/tests/e2e/objects/object-relationships.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ test.describe("/objects/:objectKind/:objectid - relationship tab", () => {
await test.step("Navigate to relationship tab of an object", async () => {
await page.goto("/objects/InfraPlatform");
await page.getByRole("link", { name: "Cisco IOS", exact: true }).click();
await page.getByText("Devices5").click();
});

await test.step("all buttons are disabled", async () => {
await expect(page.getByTestId("edit-button")).toBeDisabled();
await expect(page.getByTestId("manage-groups")).toBeDisabled();
await expect(page.getByTestId("delete-button")).toBeDisabled();

await page.getByText("Devices5").click();
await expect(page.getByTestId("open-relationship-form-button")).toBeDisabled();
});
});
Expand Down

0 comments on commit be6cd8e

Please sign in to comment.