Skip to content

Commit

Permalink
add simple docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ch3yne committed Mar 18, 2024
1 parent 13a4759 commit 37064ac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/webui.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,15 @@ Design draft preview:
| Catalog | _`View`_ ✔ / _`Create`_ ✔ / _`Edit`_ ✔ / _`Delete`_ ✔ |
| Schema | _`View`_ ✔ / _`Create`_ ✘ / _`Edit`_ ✘ / _`Delete`_ ✘ |
| Table | _`View`_ ✔ / _`Create`_ ✘ / _`Edit`_ ✘ / _`Delete`_ ✘ |

## E2E test
End-to-end testing for web frontends is conducted using the [Selenium](https://www.selenium.dev/documentation/) testing framework, which is Java-based.

Test cases can be found in the project directory: `integration-test/src/test/java/com/datastrato/gravitino/integration/test/web/ui`, where the `pages` directory is designated for storing definitions of frontend elements, among others.
The root directory contains the actual steps for the test cases.

:::tip
While writing test cases, running them in a local environment may not pose any issues. However, due to the limited performance capabilities of GitHub Actions, scenarios involving delayed DOM loading—such as the time taken for a popup animation to open—can result in test failures.

To circumvent this issue, it is necessary to manually insert a delay operation, for instance, by adding such as `Thread.sleep(sleepTimeMillis)`. This ensures that the test waits for the completion of the delay animation before proceeding with the next operation, thereby avoiding the problem.
:::
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ public boolean verifyShowMetalakeDetails(String name) {

public boolean verifyEmptyMetalake() {
try {
// To prevent errors in actions, it is necessary to wait for the completion of frontend delay
// animations before proceeding with the next step of operation verification.
Thread.sleep(sleepTimeMillis);
String xpath =
"//div[@data-refer='metalake-table-grid']//div[contains(@class, 'MuiDataGrid-overlay')]";
Expand Down

0 comments on commit 37064ac

Please sign in to comment.