mirror of
https://github.com/google/nomulus.git
synced 2025-06-04 03:27:27 +02:00
Respond to CR
This commit is contained in:
parent
5927ea9fd9
commit
55a82425e7
8 changed files with 18 additions and 22 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -77,6 +77,9 @@ autogenerated/
|
||||||
# IDEA
|
# IDEA
|
||||||
nomulus.iml
|
nomulus.iml
|
||||||
|
|
||||||
|
# Javascript output
|
||||||
|
**/out/*
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Python Ignores
|
# Python Ignores
|
||||||
|
|
||||||
|
|
1
core/.gitignore
vendored
1
core/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
out/
|
|
|
@ -24,7 +24,7 @@ goog.require('registry.registrar.ConsoleTestUtil');
|
||||||
goog.require('registry.testing');
|
goog.require('registry.testing');
|
||||||
goog.require('registry.util');
|
goog.require('registry.util');
|
||||||
|
|
||||||
describe("console tests", function() {
|
describe("console test", function() {
|
||||||
const $ = goog.dom.getRequiredElement;
|
const $ = goog.dom.getRequiredElement;
|
||||||
const stubs = new goog.testing.PropertyReplacer();
|
const stubs = new goog.testing.PropertyReplacer();
|
||||||
|
|
||||||
|
@ -81,9 +81,8 @@ describe("console tests", function() {
|
||||||
});
|
});
|
||||||
const xhr = goog.testing.net.XhrIo.getSendInstances().pop();
|
const xhr = goog.testing.net.XhrIo.getSendInstances().pop();
|
||||||
expect(xhr.isActive()).toBe(true);
|
expect(xhr.isActive()).toBe(true);
|
||||||
expect('/registrar-settings').toEqual(xhr.getLastUri());
|
expect(xhr.getLastUri()).toEqual('/registrar-settings');
|
||||||
expect(test.testXsrfToken).toEqual(
|
expect(xhr.getLastRequestHeaders()['X-CSRF-Token']).toEqual(test.testXsrfToken);
|
||||||
xhr.getLastRequestHeaders()['X-CSRF-Token']);
|
|
||||||
xhr.simulateResponse(200, goog.json.serialize({
|
xhr.simulateResponse(200, goog.json.serialize({
|
||||||
status: 'SUCCESS',
|
status: 'SUCCESS',
|
||||||
message: 'OK',
|
message: 'OK',
|
||||||
|
@ -106,9 +105,8 @@ describe("console tests", function() {
|
||||||
});
|
});
|
||||||
const xhr = goog.testing.net.XhrIo.getSendInstances().pop();
|
const xhr = goog.testing.net.XhrIo.getSendInstances().pop();
|
||||||
expect(xhr.isActive()).toBe(true);
|
expect(xhr.isActive()).toBe(true);
|
||||||
expect('/registrar-settings').toEqual(xhr.getLastUri());
|
expect(xhr.getLastUri()).toEqual('/registrar-settings');
|
||||||
expect(test.testXsrfToken).toEqual(
|
expect(xhr.getLastRequestHeaders()['X-CSRF-Token']).toEqual(test.testXsrfToken);
|
||||||
xhr.getLastRequestHeaders()['X-CSRF-Token']);
|
|
||||||
const passcode = '5-5-5-5-5';
|
const passcode = '5-5-5-5-5';
|
||||||
xhr.simulateResponse(200, goog.json.serialize({
|
xhr.simulateResponse(200, goog.json.serialize({
|
||||||
status: 'SUCCESS',
|
status: 'SUCCESS',
|
||||||
|
@ -117,7 +115,6 @@ describe("console tests", function() {
|
||||||
phonePasscode: passcode
|
phonePasscode: passcode
|
||||||
}]
|
}]
|
||||||
}));
|
}));
|
||||||
expect(passcode).toEqual(
|
expect(goog.dom.getTextContent($('domain-registrar-phone-passcode'))).toEqual(passcode);
|
||||||
goog.dom.getTextContent($('domain-registrar-phone-passcode')));
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -74,18 +74,18 @@ describe("contact settings test", function() {
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
expect(1).toEqual($('admin-contacts').childNodes.length);
|
expect($('admin-contacts').childNodes.length).toEqual(1);
|
||||||
expect(1).toEqual($('other-contacts').childNodes.length);
|
expect($('other-contacts').childNodes.length).toEqual(1);
|
||||||
// XXX: Needs more field testing.
|
// XXX: Needs more field testing.
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it("testItemView", function() {
|
it("testItemView", function() {
|
||||||
testItemView();
|
testItemView();
|
||||||
expect(testContact.name).toEqual($('contacts[0].name').value);
|
expect($('contacts[0].name').value).toEqual(testContact.name);
|
||||||
expect(testContact.emailAddress).toEqual($('contacts[0].emailAddress').value);
|
expect($('contacts[0].emailAddress').value).toEqual(testContact.emailAddress);
|
||||||
expect(testContact.phoneNumber).toEqual($('contacts[0].phoneNumber').value);
|
expect($('contacts[0].phoneNumber').value).toEqual(testContact.phoneNumber);
|
||||||
expect(testContact.faxNumber).toEqual($('contacts[0].faxNumber').value);
|
expect($('contacts[0].faxNumber').value).toEqual(testContact.faxNumber);
|
||||||
// XXX: Types are no longer broken out as individual settings, so relying on
|
// XXX: Types are no longer broken out as individual settings, so relying on
|
||||||
// screenshot test.
|
// screenshot test.
|
||||||
});
|
});
|
||||||
|
@ -361,5 +361,4 @@ describe("contact settings test", function() {
|
||||||
delete contact['type'];
|
delete contact['type'];
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -74,7 +74,7 @@ describe('security settings test', function() {
|
||||||
message: 'OK',
|
message: 'OK',
|
||||||
results: [expectedRegistrar]
|
results: [expectedRegistrar]
|
||||||
});
|
});
|
||||||
expect(expectedRegistrar.phonePasscode).toEqual(registry.util.parseForm('item').phonePasscode);
|
expect(registry.util.parseForm('item').phonePasscode).toEqual(expectedRegistrar.phonePasscode);
|
||||||
}
|
}
|
||||||
|
|
||||||
it("testView", function() {
|
it("testView", function() {
|
||||||
|
|
|
@ -142,7 +142,7 @@ describe("whois settings test", function() {
|
||||||
const msgBox = goog.dom.getNextElementSibling($('phoneNumber'));
|
const msgBox = goog.dom.getNextElementSibling($('phoneNumber'));
|
||||||
expect(goog.dom.classlist.contains(msgBox, 'kd-errormessage')).toBe(true);
|
expect(goog.dom.classlist.contains(msgBox, 'kd-errormessage')).toBe(true);
|
||||||
expect(goog.dom.classlist.contains($('phoneNumber'), 'kd-formerror')).toBe(true);
|
expect(goog.dom.classlist.contains($('phoneNumber'), 'kd-formerror')).toBe(true);
|
||||||
expect(errMsg).toEqual(goog.dom.getTextContent(msgBox));
|
expect(goog.dom.getTextContent(msgBox)).toEqual(errMsg);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("testEditNonFieldError_showsButterBar", function() {
|
it("testEditNonFieldError_showsButterBar", function() {
|
||||||
|
@ -161,6 +161,6 @@ describe("whois settings test", function() {
|
||||||
status: 'ERROR',
|
status: 'ERROR',
|
||||||
message: errMsg
|
message: errMsg
|
||||||
});
|
});
|
||||||
expect(errMsg).toEqual(goog.dom.getTextContent($$('kd-butterbar-text')));
|
expect(goog.dom.getTextContent($$('kd-butterbar-text'))).toEqual(errMsg);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
1
gradle/.gitignore
vendored
1
gradle/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
.idea
|
|
1
gradle/core/.gitignore
vendored
1
gradle/core/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
out/*
|
|
Loading…
Add table
Add a link
Reference in a new issue