Down to 7 test failures
This commit is contained in:
parent
0041dae664
commit
ab3fb6581b
14 changed files with 122 additions and 91 deletions
|
@ -91,8 +91,8 @@ describe('InteractiveAuthDialog', function() {
|
|||
expect(submitNode.disabled).toBe(false);
|
||||
ReactTestUtils.Simulate.submit(formNode, {});
|
||||
|
||||
expect(doRequest.callCount).toEqual(1);
|
||||
expect(doRequest.calledWithMatch({
|
||||
expect(doRequest).toHaveBeenCalledTimes(1);
|
||||
expect(doRequest).toBeCalledWith(expect.objectContaining({
|
||||
session: "sess",
|
||||
type: "m.login.password",
|
||||
password: "s3kr3t",
|
||||
|
@ -100,7 +100,7 @@ describe('InteractiveAuthDialog', function() {
|
|||
type: "m.id.user",
|
||||
user: "@user:id",
|
||||
},
|
||||
})).toBe(true);
|
||||
}));
|
||||
// let the request complete
|
||||
return sleep(1);
|
||||
}).then(() => {
|
||||
|
|
|
@ -157,7 +157,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe("user_1 joined and left and joined");
|
||||
});
|
||||
|
@ -193,7 +193,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe("user_1 joined and left 7 times");
|
||||
});
|
||||
|
@ -241,7 +241,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1 was unbanned, joined and left 7 times and was invited",
|
||||
|
@ -294,7 +294,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1 was unbanned, joined and left 2 times, was banned, " +
|
||||
|
@ -353,7 +353,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1 and one other were unbanned, joined and left 2 times and were banned",
|
||||
|
@ -391,7 +391,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_0 and 19 others were unbanned, joined and left 2 times and were banned",
|
||||
|
@ -442,7 +442,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_2 was unbanned and joined and left 2 times, user_1 was unbanned, " +
|
||||
|
@ -516,7 +516,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1 was invited, was banned, joined, rejected their invitation, left, " +
|
||||
|
@ -563,7 +563,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1 and one other rejected their invitations and " +
|
||||
|
@ -599,7 +599,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1 rejected their invitation 2 times",
|
||||
|
@ -627,7 +627,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1 and user_2 joined 2 times",
|
||||
|
@ -654,7 +654,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_1, user_2 and one other joined",
|
||||
|
@ -679,7 +679,7 @@ describe('MemberEventListSummary', function() {
|
|||
const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
|
||||
instance, "mx_EventListSummary_summary",
|
||||
);
|
||||
const summaryText = summary.innerText;
|
||||
const summaryText = summary.textContent;
|
||||
|
||||
expect(summaryText).toBe(
|
||||
"user_0, user_1 and 18 others joined",
|
||||
|
|
|
@ -112,7 +112,7 @@ describe("GroupMemberList", function() {
|
|||
const memberList = ReactTestUtils.findRenderedDOMComponentWithClass(root, "mx_MemberList_joined");
|
||||
const memberListElement = ReactDOM.findDOMNode(memberList);
|
||||
expect(memberListElement).toBeTruthy();
|
||||
expect(memberListElement.innerText).toBe("Test");
|
||||
expect(memberListElement.textContent).toBe("Test");
|
||||
});
|
||||
|
||||
httpBackend.when("GET", "/groups/" + groupIdEncoded + "/summary").respond(200, summaryResponse);
|
||||
|
@ -132,7 +132,7 @@ describe("GroupMemberList", function() {
|
|||
const memberList = ReactTestUtils.findRenderedDOMComponentWithClass(root, "mx_MemberList_joined");
|
||||
const memberListElement = ReactDOM.findDOMNode(memberList);
|
||||
expect(memberListElement).toBeTruthy();
|
||||
expect(memberListElement.innerText).toBe("Failed to load group members");
|
||||
expect(memberListElement.textContent).toBe("Failed to load group members");
|
||||
});
|
||||
|
||||
httpBackend.when("GET", "/groups/" + groupIdEncoded + "/summary").respond(200, summaryResponse);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue