Added django_node_assets

This commit is contained in:
Yuriy Kulakov
2021-04-27 20:24:58 +03:00
parent 7e3b2a918e
commit 3b9ae4f2fa
5 changed files with 32 additions and 23 deletions

View File

@@ -76,7 +76,7 @@ class ZendeskUserTableRows extends React.Component {
}
}
class TableBody extends React.Component {
export default class TableBody extends React.Component {
constructor(props) {
super(props);
this.state = {
@@ -88,7 +88,7 @@ class TableBody extends React.Component {
};
}
change_elemnts_html() {
change_elements_html() {
let elements = document.querySelectorAll(".info-quantity-value");
let licences = document.getElementById("licences_remaining");
elements[0].innerHTML = this.state.engineers;
@@ -110,7 +110,7 @@ class TableBody extends React.Component {
max_agents: response.data.max_agents,
});
});
this.change_elemnts_html();
this.change_elements_html();
}
delete_pretext() {

View File

@@ -29,9 +29,9 @@ afterEach(() => {
jest.useRealTimers();
});
it("has no rows on mount", () => {
it("has rows on mount", () => {
act(() => {
render(<TableBody />, container);
});
expect(container.getElementsByTagName("tr").length).toBe(0);
expect(container.getElementsByTagName("tr").length).not.toBe(0);
});