...
 
Commits (15)
......@@ -115,7 +115,7 @@ context('Blogs', () => {
cy.get('.m-button--submit').click({ force: true }); // TODO: Investigate why disabled flag is being detected
cy.location('pathname', { timeout: 30000 })
cy.location('pathname')
.should('contains', `/${Cypress.env().username}/blog`);
cy.get('.m-blog--title').contains('Title');
......
......@@ -41,7 +41,7 @@ context('Boost Console', () => {
function navToConsole() {
cy.visit('/boost/console/newsfeed/history');
cy.location('pathname', { timeout: 30000 })
cy.location('pathname')
.should('eq', `/boost/console/newsfeed/history`);
}
......@@ -60,7 +60,7 @@ context('Boost Console', () => {
cy.get('m-overlay-modal > div.m-overlay-modal > m-boost--creator button')
.click();
cy.wait('@boostPost', { requestTimeout: 5000 }).then((xhr) => {
cy.wait('@boostPost').then((xhr) => {
cy.log(xhr);
expect(xhr.status).to.equal(200);
expect(xhr.response.body.status).to.deep.equal("success");
......
......@@ -8,7 +8,7 @@ context('Boost Impressions', () => {
}
});
cy.visit('/newsfeed/subscriptions');
cy.location('pathname', { timeout: 30000 })
cy.location('pathname')
.should('eq', `/newsfeed/subscriptions`);
});
......@@ -41,7 +41,7 @@ context('Boost Impressions', () => {
.click();
//assert
cy.wait('@analytics', { requestTimeout: 5000 }).then((xhr) => {
cy.wait('@analytics').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body.status).to.deep.equal("success");
});
......@@ -51,7 +51,7 @@ context('Boost Impressions', () => {
.click();
//assert
cy.wait('@analytics', { requestTimeout: 5000 }).then((xhr) => {
cy.wait('@analytics').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body.status).to.deep.equal("success");
});
......
......@@ -36,7 +36,7 @@ context('Comment Threads', () => {
});
cy.visit('/newsfeed/subscriptions');
cy.location('pathname', { timeout: 30000 })
cy.location('pathname')
.should('eq', `/newsfeed/subscriptions`);
cy.post('test post');
......
......@@ -37,7 +37,6 @@ context('Groups', () => {
cy.get('.m-groups-save > button').contains('Create').click();
cy.wait(1000);
cy.get('.m-groupInfo__name').contains('test');
cy.get('.m-groupInfo__description').contains('This is a test');
......@@ -90,9 +89,9 @@ context('Groups', () => {
})
it('should post an activity inside the group and record the view when scrolling', () => {
cy.get('m-group--sidebar-markers li:nth-child(3)').contains('test group').click();
cy.wait(1000);
cy.get("m-group--sidebar-markers li:contains('test group')")
.first()
.click();
cy.server();
cy.route("POST", "**/api/v2/analytics/views/activity/*").as("view");
......@@ -101,8 +100,6 @@ context('Groups', () => {
cy.get('.m-posterActionBar__PostButton').click();
cy.wait(500);
// the activity should show that it was posted in this group
cy.get('.minds-list minds-activity .body a:nth-child(2)').contains('(test group)');
......@@ -113,11 +110,9 @@ context('Groups', () => {
cy.get('.m-posterActionBar__PostButton').click();
cy.wait(200);
cy.scrollTo(0, '20px');
cy.wait('@view', { requestTimeout: 2000 }).then((xhr) => {
cy.wait('@view').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body).to.deep.equal({ status: 'success' });
});
......@@ -126,8 +121,6 @@ context('Groups', () => {
it('should delete a group', () => {
cy.get('m-group--sidebar-markers li:nth-child(3)').contains('test group').click();
cy.wait(1000);
// cleanup
cy.get('minds-groups-settings-button > button').click();
cy.get('minds-groups-settings-button ul.minds-dropdown-menu > li:nth-child(8)').contains('Delete Group').click();
......
......@@ -18,7 +18,7 @@ context('Login', () => {
cy.get('minds-form-login .m-btn--login').click();
cy.location('pathname', { timeout: 10000 })
cy.location('pathname')
.should('eq', '/newsfeed/subscriptions');
})
......
......@@ -215,7 +215,7 @@ context('Newsfeed', () => {
cy.scrollTo(0, '20px');
cy.wait('@view', { requestTimeout: 2000 }).then((xhr) => {
cy.wait('@view').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body).to.deep.equal({ status: 'success' });
});
......
......@@ -9,17 +9,16 @@ context('Remind', () => {
return cy.login(true);
}
});
cy.visit(`/${Cypress.env().username}`);
});
beforeEach(() => {
cy.preserveCookies();
//nav to channel
cy.get('.m-v2-topbar__Top minds-avatar div')
.click();
});
it('should allow a user to remind their post', () => {
cy.server();
cy.route("POST", "**/api/v2/newsfeed/remind/*").as("postRemind");
//post
cy.post("test!!");
......@@ -35,54 +34,10 @@ context('Remind', () => {
//post remind.
cy.get('.m-modal-remind-composer-send i')
.click();
softReload();
cy.wait(1000);
//expect to contain text
cy.get('m-newsfeed__entity:nth-child(3) span')
.contains(remindText);
})
it('should allow a user to delete their remind', () => {
// make sure top post has the reminded text.
cy.get('m-newsfeed__entity:nth-child(3) .m-activity--message-remind span')
.contains(remindText);
//open menu.
cy.get('m-newsfeed__entity:nth-child(3) m-post-menu > button > i')
.click();
//select delete.
cy.get('m-newsfeed__entity:nth-child(3) m-post-menu ul li:nth-child(4)')
.click();
//delete confirm.
cy.get('m-newsfeed__entity:nth-child(3) m-modal-confirm div:nth-child(1) button.mdl-button.mdl-color-text--white.mdl-button--colored.mdl-button--raised')
.click();
cy.wait(2000);
//check the post is gone.
cy.get('m-newsfeed__entity:nth-child(3) .m-activity--message-remind span')
.should('not.have.value', remindText)
cy.wait('@postRemind').then((xhr) => {
expect(xhr.status).to.equal(200);
expect(xhr.response.body.status).to.equal("success");
});
});
/**
* Cycles by pressing home screen then back to channel
*/
function softReload() {
cy.wait(6000); //wait to let requests finish.
cy.get('.m-v2-topbarNavItem__Logo > img')
.click();
cy.get('.m-v2-topbar__Top minds-avatar div')
.click();
cy.wait(1000); //wait to let requests finish.
}
})
});
......@@ -38,20 +38,17 @@ context('Topbar', () => {
// open the menu
cy.get('m-user-menu .m-user-menu__Anchor').click();
cy.get('m-user-menu .m-user-menu__Dropdown li')
.contains('Boost Console')
cy.get("m-user-menu .m-user-menu__Dropdown li:contains('Boost Console')")
.click();
// TOFIX: no boost redirects to create
// cy.location('pathname').should('eq', '/boost/console/newsfeed/history');
cy.location('pathname').should('contain', '/boost/console/newsfeed/');
});
it('clicking on the dropdown on the right should allow to go to the boost console', () => {
it('clicking on the dropdown on the right should allow to go to the help desk', () => {
// open the menu
cy.get('m-user-menu .m-user-menu__Anchor').click();
cy.get('m-user-menu .m-user-menu__Dropdown li')
.contains('Help Desk')
cy.get("m-user-menu .m-user-menu__Dropdown li:contains('Help Desk')")
.click();
cy.location('pathname').should('eq', '/help');
......@@ -61,8 +58,7 @@ context('Topbar', () => {
// open the menu
cy.get('m-user-menu .m-user-menu__Anchor').click();
cy.get('m-user-menu .m-user-menu__Dropdown li')
.contains('Canary')
cy.get("m-user-menu .m-user-menu__Dropdown li:contains('Canary')")
.click();
cy.location('pathname').should('eq', '/canary');
......@@ -74,8 +70,7 @@ context('Topbar', () => {
cy.get('body.m-theme__light').should('be.visible');
cy.get('m-user-menu .m-user-menu__Dropdown li')
.contains('Dark Mode')
cy.get("m-user-menu .m-user-menu__Dropdown li:contains('Dark Mode')")
.click();
cy.get('body.m-theme__dark').should('be.visible');
......@@ -85,6 +80,8 @@ context('Topbar', () => {
.click();
cy.get('body.m-theme__light').should('be.visible');
cy.get('m-user-menu .m-user-menu__Anchor').click({ force: true });
});
it('clicking on the bulb on the topbar should redirect to /newsfeed/subscriptions', () => {
......
......@@ -10,7 +10,8 @@ module.exports = function (config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-mocha-reporter'),
],
// webpack: { node: { fs: 'empty', } },
client:{
......@@ -21,7 +22,7 @@ module.exports = function (config) {
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
......
This diff is collapsed.
......@@ -102,9 +102,6 @@ export class ForgotPasswordComponent {
})
.catch((e) => {
this.error = e.message;
setTimeout(() => {
this.router.navigate(['/login']);
}, 2000);
});
}
}
......
......@@ -23,7 +23,7 @@
</a>
</div>
</div>
</div>
</div>
......@@ -75,12 +75,14 @@
</div>
<div class="m-marketing--hero">
<div class="m-marketing--background-video">
<div class="m-marketing--hero--video">
<img [src]="minds.cdn_assets_url + 'assets/photos/lizard.jpg'">
</div>
<div class="m-marketing--hero-inner">
<h2 i18n="@@BOOST__MKT__GIVE_YOURSELF_TITLE">Give yourself the best chance to earn.</h2>
<div class="m-marketing--hero--inner">
<div class="m-marketing--hero--overlay"></div>
<div class="m-marketing--hero--slogans">
<h2 i18n="@@BOOST__MKT__GIVE_YOURSELF_TITLE">Give yourself the best chance to earn.</h2>
</div>
</div>
</div>
......
......@@ -191,6 +191,9 @@ export class Activity implements OnInit {
@Input() set boostToggle(toggle: boolean) {
//if(toggle)
// this.showBoost();
if(this.activity.custom_type === 'video') {
this.player.pause();
}
return;
}
......
......@@ -68,7 +68,7 @@
<div class="mdl-cell mdl-cell--4-col m-newsfeed--sidebar m-newsfeed__sidebar">
<minds-card-user *ngIf="session.isLoggedIn()" [object]="session.getLoggedInUser()" class="mdl-card m-border"></minds-card-user>
<minds-card-user *ngIf="session.isLoggedIn()" [object]="session.getLoggedInUser()" [avatarSize]="'large'" class="mdl-card m-border"></minds-card-user>
<ng-container *mIfFeature="'top-feeds'">
<h3 class="m-newsfeedSidebar__header">
......
......@@ -175,3 +175,7 @@
background-color: transparent !important;
overflow: visible;
}
.m-newsfeed__sidebar .minds-usercard-block .avatar img {
object-fit: cover;
}
......@@ -16,12 +16,22 @@
width: 100%;
}
m-tooltip i:not(.m-referrals-dashboard__pingIcon) {
font-size: 12px;
margin-left: 1px;
@include m-theme() {
color: themed($m-grey-500);
m-tooltip {
i:not(.m-referrals-dashboard__pingIcon) {
font-size: 12px;
margin-left: 1px;
@include m-theme() {
color: themed($m-grey-500);
}
}
.m-tooltip--bubble {
z-index: 9999;
@media screen and (max-width: $max-mobile) {
top: -56px;
right: 30px;
}
}
}
.m-referrals-dashboard__row {
......@@ -43,7 +53,6 @@
right: 2px;
}
}
}
&.m-referrals-dashboard__dataRow {
font-size: 13px;
......@@ -51,6 +60,10 @@
border-top: 1px solid themed($m-grey-50);
}
}
@media screen and (max-width: $max-mobile) {
position: relative;
}
}
.m-referrals-dashboard__cell {
......