UX: puts back share-panel as floating pane on post actions (#7066)

This commit is contained in:
Joffrey JAFFEUX
2019-02-26 14:15:25 +01:00
committed by GitHub
parent 6ea9f5c9c5
commit d04c4bf8e7
14 changed files with 367 additions and 186 deletions

View File

@@ -68,34 +68,5 @@ QUnit.test("Post date link", async assert => {
await visit("/t/internationalization-localization/280");
await click("#post_2 .post-info.post-date a");
assert.ok(exists(".share-and-invite.modal"), "it shows the modal");
assert.ok(
exists(".share-and-invite.modal .modal-tab.share"),
"it shows the share tab"
);
assert.ok(
exists(".share-and-invite.modal .modal-tab.share.single-tab"),
"it shows only one tab"
);
assert.ok(
!exists(".share-and-invite.modal .modal-tab.invite"),
"it doesnt show the invite tab"
);
assert.ok(
find(".share-and-invite.modal .modal-panel.share .title")
.text()
.includes("Post #2, Feb"),
"it shows the post number with the date"
);
assert.ok(
find(".share-and-invite.modal .modal-panel.share .topic-share-url")
.val()
.includes("/t/internationalization-localization/280/2?u=eviltrout"),
"it shows the topic sharing url including the post number"
);
assert.ok(exists("#share-link"), "it shows the share modal");
});

View File

@@ -57,20 +57,5 @@ QUnit.test("Post date link", async assert => {
await visit("/t/internationalization-localization/280");
await click("#post_2 .post-info.post-date a");
assert.ok(exists(".share-and-invite.modal"), "it shows the modal");
assert.ok(
exists(".share-and-invite.modal .modal-tab.share"),
"it shows the share tab"
);
assert.ok(
exists(".share-and-invite.modal .modal-tab.share.single-tab"),
"it shows only one tab"
);
assert.ok(
!exists(".share-and-invite.modal .modal-tab.invite"),
"it doesnt show the invite tab"
);
assert.ok(exists("#share-link"), "it shows the share modal");
});

View File

@@ -24,12 +24,9 @@ acceptance("Topic", {
QUnit.test("Share Modal", async assert => {
await visit("/t/internationalization-localization/280");
await click(".topic-post:first-child button.share");
assert.ok(
exists(".modal.share-and-invite"),
"it shows the share and invite modal"
);
assert.ok(exists("#share-link"), "it shows the share modal");
});
QUnit.test("Showing and hiding the edit controls", async assert => {