Merge branch 'develop' into feat-remove-failed-queue

This commit is contained in:
Suraj Shetty 2021-03-10 10:03:19 +05:30 committed by GitHub
commit bcd3f7540d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 21 deletions

View file

@ -3,6 +3,16 @@ context('Recorder', () => {
cy.login();
});
beforeEach(() => {
cy.visit('/app/recorder');
return cy.window().its('frappe').then(frappe => {
// reset recorder
return frappe.xcall("frappe.recorder.stop").then(() => {
return frappe.xcall("frappe.recorder.delete");
});
});
});
it('Navigate to Recorder', () => {
cy.visit('/app');
cy.awesomebar('recorder');
@ -11,7 +21,6 @@ context('Recorder', () => {
});
it('Recorder Empty State', () => {
cy.visit('/app/recorder');
cy.get('.title-text').should('contain', 'Recorder');
cy.get('.indicator-pill').should('contain', 'Inactive').should('have.class', 'red');
@ -24,7 +33,6 @@ context('Recorder', () => {
});
it('Recorder Start', () => {
cy.visit('/app/recorder');
cy.get('.primary-action').should('contain', 'Start').click();
cy.get('.indicator-pill').should('contain', 'Active').should('have.class', 'green');
@ -40,15 +48,9 @@ context('Recorder', () => {
cy.visit('/app/recorder');
cy.get('.title-text').should('contain', 'Recorder');
cy.get('.result-list').should('contain', '/api/method/frappe.desk.reportview.get');
cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
cy.wait(500);
cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
cy.get('.msg-box').should('contain', 'Inactive');
});
it('Recorder View Request', () => {
cy.visit('/app/recorder');
it.only('Recorder View Request', () => {
cy.get('.primary-action').should('contain', 'Start').click();
cy.visit('/app/List/DocType/List');
@ -64,9 +66,5 @@ context('Recorder', () => {
cy.url().should('include', '/recorder/request');
cy.get('form').should('contain', '/api/method/frappe');
cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
cy.wait(200);
cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
});
});
});

View file

@ -201,12 +201,13 @@ frappe.Application = Class.extend({
email_password_prompt: function(email_account,user,i) {
var me = this;
var d = new frappe.ui.Dialog({
title: __('Email Account setup please enter your password for: {0}', [email_account[i]["email_id"]]),
let d = new frappe.ui.Dialog({
title: __('Password missing in Email Account'),
fields: [
{ 'fieldname': 'password',
{
'fieldname': 'password',
'fieldtype': 'Password',
'label': 'Email Account Password',
'label': __('Please enter the password for: <b>{0}</b>', [email_account[i]["email_id"]]),
'reqd': 1
},
{

View file

@ -231,14 +231,14 @@ def update_oauth_user(user, data, provider):
save = True
user = frappe.new_doc("User")
gender = (data.get("gender") or "").title()
gender = data.get("gender", "").title()
if not frappe.db.exists("Gender", gender):
if gender and not frappe.db.exists("Gender", gender):
doc = frappe.new_doc("Gender", {"gender": gender})
doc.insert(ignore_permissions=True)
user.update({
"doctype":"User",
"doctype": "User",
"first_name": get_first_name(data),
"last_name": get_last_name(data),
"email": get_email(data),