UI: (internal) rename close button to close on incoming shares
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -128,7 +128,7 @@ def test_incoming_shares(
|
||||
).to_be_checked()
|
||||
|
||||
# 6. Verify "shared by admin" and button visibility in the collection article
|
||||
page.click('#incomingsharingscene button[data-name="cancel"]')
|
||||
page.click('#incomingsharingscene button[data-name="close"]')
|
||||
expect(page.locator("#incomingsharingscene")).to_be_hidden()
|
||||
|
||||
article = page.locator("article:not(.hidden)").first
|
||||
@@ -179,5 +179,5 @@ def test_no_incoming_shares_message(
|
||||
page.locator('#incomingsharingscene [data-name="nosharesmessage"]')
|
||||
).to_have_text("No incoming shares")
|
||||
|
||||
page.click('#incomingsharingscene button[data-name="cancel"]')
|
||||
page.click('#incomingsharingscene button[data-name="close"]')
|
||||
expect(page.locator("#incomingsharingscene")).to_be_hidden()
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
</table>
|
||||
<p class="hidden" data-name="nosharesmessage">No incoming shares</p>
|
||||
<form>
|
||||
<button type="button" class="green" data-name="cancel">Close</button>
|
||||
<button type="button" class="green" data-name="close">Close</button>
|
||||
</form>
|
||||
<span class="error hidden" data-name="error"></span>
|
||||
</section>
|
||||
|
||||
@@ -40,7 +40,7 @@ export class IncomingSharingScene {
|
||||
this._password = password;
|
||||
|
||||
this._html_scene = get_element_by_id("incomingsharingscene");
|
||||
this._cancel_btn = get_element(this._html_scene, "[data-name=cancel]");
|
||||
this._close_btn = get_element(this._html_scene, "[data-name=close]");
|
||||
this._error_element = get_element(this._html_scene, "[data-name=error]");
|
||||
this._tbody = get_element(this._html_scene, "tbody[data-name=incomingsharesbody]");
|
||||
this._template = get_element(this._tbody, "[data-name=incomingsharerowtemplate]");
|
||||
@@ -144,14 +144,14 @@ export class IncomingSharingScene {
|
||||
|
||||
show() {
|
||||
this._html_scene.classList.remove("hidden");
|
||||
this._cancel_btn.onclick = () => pop_scene();
|
||||
this._close_btn.onclick = () => pop_scene();
|
||||
this._error_handler.clearError();
|
||||
collectionsCache.getIncomingShares(this._user, this._password, this._error_handler.setError, (shares) => this._render_shares(shares));
|
||||
}
|
||||
|
||||
hide() {
|
||||
this._html_scene.classList.add("hidden");
|
||||
this._cancel_btn.onclick = null;
|
||||
this._close_btn.onclick = null;
|
||||
this._error_handler.clearError();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user