Skip to content

Commit af5f7f6

Browse files
committed
cypress: ER diagram test
1 parent 602747b commit af5f7f6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { newExpectation } from "@utils/helpers";
2+
import { runTests } from "@utils/index";
3+
import { testDBHeader } from "@utils/sharedTests/dbHeaders";
4+
import {
5+
notExist,
6+
shouldBeVisible,
7+
shouldNotExist,
8+
} from "@utils/sharedTests/sharedFunctionsAndVariables";
9+
10+
const pageName = "ER Diagram";
11+
const connectionName = "CypressTestConnection";
12+
const dbName = "us-jails";
13+
const currentPage = `/database/${dbName}/schema/main`;
14+
const hasDocs = true;
15+
16+
describe(pageName, () => {
17+
const tests = [
18+
newExpectation(
19+
"should not find empty database",
20+
"[data-cy=db-data-table-empty]",
21+
notExist,
22+
),
23+
shouldNotExist("db-doc-markdown"),
24+
...testDBHeader(connectionName, dbName, hasDocs),
25+
shouldBeVisible("er-diagram-canvas"),
26+
shouldBeVisible("er-diagram-close-control-button"),
27+
shouldBeVisible("er-diagram-notation"),
28+
];
29+
runTests({ tests, currentPage, pageName });
30+
});

0 commit comments

Comments
 (0)