-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-table): table loading indicator (#9214)
* feat(ui5-table): table loading indicator * feat(ui5-table): table loading indicator * feat(ui5-table): table loading indicator The loading/loadingDelay properties are added to show a busy indicator component on the table which blocks the interaction while it is shown.
- Loading branch information
Showing
6 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Test Page - Table Navigation</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<meta charset="utf-8"> | ||
<script src="%VITE_BUNDLE_PATH%" type="module"></script> | ||
</head> | ||
<body> | ||
<div class="section"> | ||
<input id="before-table1"> | ||
<ui5-table id="table1" loading loadingDelay="0"> | ||
<ui5-table-header-row slot="headerRow"> | ||
<ui5-table-header-cell id="colA"><span>ColumnA</span></ui5-table-header-cell> | ||
</ui5-table-header-row> | ||
<ui5-table-row> | ||
<ui5-table-cell><ui5-label>Cell A</ui5-label></ui5-table-cell> | ||
</ui5-table-row> | ||
</ui5-table> | ||
<input id="after-table1"> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { assert } from "chai"; | ||
|
||
describe("Table - loading", async () => { | ||
before(async () => { | ||
await browser.url(`test/pages/TableLoading.html`); | ||
}); | ||
|
||
it("tests busy indicator is displayed", async () => { | ||
const before = await browser.$("#before-table1"); | ||
const table = await browser.$("#table1"); | ||
const after = await browser.$("#after-table1"); | ||
const loading = await table.shadow$("#loading"); | ||
|
||
assert.ok(await loading.isExisting(), "The busy indicator is displayed"); | ||
|
||
await before.click(); | ||
assert.ok(await before.isFocused(), "The input before the table1 is focused."); | ||
|
||
await before.keys("Tab"); | ||
let res = await browser.executeAsync(done => { | ||
done(document.getElementById("table1").shadowRoot.querySelector("#loading").matches(":focus")); | ||
}); | ||
assert.ok(res, "Busy indicator is focused"); | ||
|
||
await browser.keys("Tab"); | ||
assert.ok(await after.isFocused(), "The input after the table1 is focused."); | ||
}); | ||
}); |