Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • omadrid/front
  • minds/front
  • joe59/front
  • markharding/front
  • eiennohi/front
  • edgebal/front
  • msantang78/front
  • bhayward93/front
  • xorgy/front
  • duyquoc/front
  • benhayward.ben/front
  • mnurzia/front
  • priestd09/front
  • dknunn/front
  • Yersinia/front
  • literalpie/front
  • maruthi-adithya/front
  • javanick/front
  • juanmsolaro/front
  • ascenderking/front
  • fabiolalombardim/front
  • jim-toth/front
  • Shivathanu/front
  • pestixaba/front
  • project_connection/front
  • mul53/front
  • iamonuwa/front
  • manishoo/front
  • namesty/front
  • AaronTheBruce/front
  • bedriguler/front
  • th2tran/front
  • jun784/front
  • mdstevens044/front
  • CodingNagger/front
  • heenachauhan201/front
  • diazairic/front
  • m994/front
  • webprodev/minds_front
  • chaoukiammar/front
  • benn7/front
  • ung1807/front
  • vinliao/front-patch-1
  • suhailkakar/front
  • theokeist/minds-blog
45 results
Select Git revision
Show changes
Commits on Source (12)
Showing
with 174 additions and 4 deletions
context('Channel image upload', () => {
before(() => {
cy.getCookie('minds_sess')
.then((sessionCookie) => {
if (sessionCookie === null) {
return cy.login(true);
}
});
});
beforeEach(()=> {
cy.preserveCookies();
cy.server();
cy.route("POST", "**/api/v1/newsfeed").as("newsfeedPOST");
cy.route("POST", "**/api/v1/media").as("mediaPOST");
});
it('should post an activity with an image attachment', () => {
cy.get('minds-newsfeed-poster').should('be.visible');
cy.get('minds-newsfeed-poster textarea').type('This is a post with an image');
cy.uploadFile('#attachment-input-poster', '../fixtures/international-space-station-1776401_1920.jpg', 'image/jpg');
//upload image
cy.wait('@mediaPOST');
cy.get('.m-posterActionBar__PostButton').click();
//await response for activity
cy.wait('@newsfeedPOST').then((xhr) => {
expect(xhr.status).to.equal(200);
const uploadedImageGuid = xhr.response.body.activity.entity_guid
const activityGuid = xhr.response.body.guid;
cy.get('.minds-list > minds-activity:first-child .message').contains('This is a post with an image');
// assert image
cy.get('.minds-list > minds-activity:first-child .item-image img').should('be.visible');
cy.visit(`/${Cypress.env().username}`);
let mediaHref = `/media/${uploadedImageGuid}`;
cy.get("m-channels--sorted-module[title='Images']")
.find(`a[href='${mediaHref}']`);
cy.get(`[data-minds-activity-guid='${activityGuid}']`)
.find('m-post-menu .minds-more')
.click();
cy.get(`[data-minds-activity-guid='${activityGuid}']`)
.find("li:contains('Delete')")
.click();
cy.get(`[data-minds-activity-guid='${activityGuid}'] m-post-menu m-modal-confirm .mdl-button--colored`).click();
});
});
});
context('Comment Permissions', () => {
const postMenu = 'minds-activity:first > div > m-post-menu';
const deletePostOption = "m-post-menu > ul > li:visible:contains('Delete')";
const deletePostButton = ".m-modal-confirm-buttons > button:contains('Delete')";
before(() => {
//make a post new.
cy.getCookie('minds_sess')
.then((sessionCookie) => {
if (sessionCookie === null) {
return cy.login(true);
}
});
cy.visit('/newsfeed/subscriptions');
cy.location('pathname')
.should('eq', `/newsfeed/subscriptions`);
});
afterEach(() => {
//delete the post
cy.get(postMenu).click();
cy.get(deletePostOption).click();
cy.get(deletePostButton).click();
});
beforeEach(()=> {
cy.preserveCookies();
cy.post('test post');
});
it('should disable comments', () => {
cy.server();
cy.route("POST", "**/api/v2/permissions/comments/**").as("commentToggle");
cy.get(postMenu)
.click()
.find("li:visible:contains('Disable Comments')")
.click();
cy.wait('@commentToggle').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body.status).to.equal("success");
expect(xhr.response.body.allowed).to.equal(false);
});
//close menu
cy.get(postMenu)
.click();
cy.get('minds-activity:first')
.find("i:contains('speaker_notes_off')")
.click();
});
it('should allow comments', () => {
cy.server();
cy.route("POST", "**/api/v2/permissions/comments/**").as("commentToggle");
cy.get(postMenu)
.click()
.find("li:visible:contains('Disable Comments')")
.click();
cy.wait('@commentToggle').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body.status).to.equal("success");
expect(xhr.response.body.allowed).to.equal(false);
});
//Menu stays open
cy.get("li:visible:contains('Allow Comments')")
.click();
cy.wait('@commentToggle').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body.status).to.equal("success");
expect(xhr.response.body.allowed).to.equal(true);
});
//close menu
cy.get(postMenu)
.click();
cy.get('minds-activity:first')
.find("i:contains('chat_bubble')");
});
});
\ No newline at end of file
......@@ -197,6 +197,10 @@ export class EmbedImage {
'.' + imgClass
);
if (!image) {
return;
}
const overlay = image.parentElement.querySelector(
'.m-blog--image--in-progress-overlay'
);
......@@ -243,9 +247,7 @@ export class EmbedImage {
if ($image.tagName === 'SPAN') {
$image = $image.parentNode.querySelector('img');
}
if ($image.tagName !== 'IMG') {
} else if ($image.tagName !== 'IMG') {
return;
}
......
......@@ -38,7 +38,7 @@
</a>
<a
class="m-topbar--navigation--item"
routerLink="/admin/appeals"
routerLink="/moderation/juryduty/initial"
routerLinkActive="m-topbar--navigation--item-active"
>
<span i18n="@@M__ADMIN_NAV__APPEALS">Appeals</span>
......
......@@ -102,6 +102,7 @@
[object]="boost.entity"
class="mdl-card mdl-shadow--8dp"
*ngIf="boost.entity.type == 'activity'"
[attr.data-minds-activity-guid]="boost.entity.guid"
></minds-activity>
<minds-card-group
[group]="boost.entity"
......
......@@ -19,6 +19,7 @@
*ngIf="entity"
[object]="entity"
class="mdl-card m-border item"
[attr.data-minds-activity-guid]="entity.guid"
></minds-activity>
</div>
<div
......
......@@ -42,6 +42,7 @@
[object]="entity"
class="mdl-card"
*ngIf="entity.type == 'activity'"
[attr.data-minds-activity-guid]="entity.guid"
></minds-activity>
<div class="mdl-card__supporting-text m-action-buttons">
......
......@@ -20,6 +20,7 @@
class="mdl-card m-border item"
(delete)="delete(activity)"
[slot]="i + 1"
[attr.data-minds-activity-guid]="activity.guid"
></minds-activity>
<minds-activity
*ngFor="let activity of feed; let i = index"
......@@ -28,6 +29,7 @@
class="mdl-card m-border item"
(delete)="delete(activity)"
[slot]="i + (pinned?.length || 0) + 1"
[attr.data-minds-activity-guid]="activity.guid"
></minds-activity>
<infinite-scroll
distance="25%"
......
......@@ -39,6 +39,7 @@
[showRatingToggle]="true"
[slot]="i + 1"
class="mdl-card item"
[attr.data-minds-activity-guid]="activity.guid"
>
</minds-activity>
......@@ -49,6 +50,7 @@
[canDelete]="group['is:owner'] || group['is:moderator']"
(delete)="delete(a)"
[slot]="i + (pinned?.length || 0) + 1"
[attr.data-minds-activity-guid]="a.guid"
>
<!-- Menu Actions -->
<li
......
......@@ -52,6 +52,7 @@
[canDelete]="group['is:owner'] || group['is:moderator']"
(delete)="delete(entity)"
[slot]="i + 1"
[attr.data-minds-activity-guid]="entity.guid"
>
<!-- Menu Actions -->
......
......@@ -8,6 +8,7 @@
[canDelete]="group['is:owner'] || group['is:moderator']"
(delete)="delete(entity)"
[hideTabs]="true"
[attr.data-minds-activity-guid]="entity.guid"
>
<!-- Menu Actions -->
......
......@@ -4,5 +4,6 @@
*ngFor="let post of posts; let i = index"
class="mdl-card item"
[object]="post"
[attr.data-minds-activity-guid]="post.guid"
></minds-activity>
</div>
......@@ -48,6 +48,7 @@
[showBoostMenuOptions]="true"
[slot]="i + 1"
[visibilityEvents]="false"
[attr.data-minds-activity-guid]="boost.guid"
#activities
></minds-activity>
</ng-container>
......@@ -17,6 +17,7 @@
(delete)="delete(activity)"
[slot]="i + 1"
class="mdl-card m-border item"
[attr.data-minds-activity-guid]="activity.guid"
>
</minds-activity>
</ng-container>
......
......@@ -14,6 +14,7 @@
[showRatingToggle]="true"
[slot]="slot"
class="mdl-card m-border item"
[attr.data-minds-activity-guid]="entity.guid"
></minds-activity>
</ng-container>
</ng-container>
......@@ -21,6 +21,7 @@
(delete)="delete(preActivity)"
[showRatingToggle]="true"
class="mdl-card m-border item"
[attr.minds-data-activity-guid]="preActivity.guid"
></minds-activity>
<m-newsfeed--boost-rotator
......@@ -46,6 +47,7 @@
(delete)="delete(activity)"
[showRatingToggle]="true"
[slot]="i + 1"
[attr.data-minds-activity-guid]="activity.guid"
></minds-activity>
</ng-container>
......
......@@ -7,6 +7,7 @@
[showRatingToggle]="true"
class="mdl-card m-border item"
[slot]="i + 1"
[attr.data-minds-activity-guid]="activity.guid"
></minds-activity>
<infinite-scroll
distance="25%"
......
......@@ -9,6 +9,7 @@
[showRatingToggle]="true"
[slot]="i + 1"
class="mdl-card m-border item"
[attr.data-minds-activity-guid]="activity.guid"
></minds-activity>
<infinite-scroll
distance="25%"
......