Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dom-merge-conflict/tasks/buttons-and-counter/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export function App() {

const header = document.createElement("header");
header.innerHTML = `
<h1>Number Counter</h1>
<p>A simple counter. Press increment to increase the count by one.</p>
<h1>decrement</h1>
<p>A simple counter. Press /increment/i decrement to increase the count by one.</p>
`;
body.appendChild(header);

Expand Down
24 changes: 12 additions & 12 deletions dom-merge-conflict/tasks/buttons-and-counter/test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ describe("button and counter", () => {
expect(getByTestId(container, "counter")).toHaveTextContent(/^2$/);
});

describe.skip("decrement button", () => {
test("pressing Decrement decreases the counter", () => {
const button = getByRole(container, "button", {
name: "Decrement",
});
button.click();
button.click();
button.click();

expect(getByTestId(container, "counter")).toHaveTextContent(/^-3$/);
});
// describe.skip("decrement button", () => {
// test("pressing Decrement decreases the counter", () => {
// const button = getByRole(container, "button", {
// name: "Decrement",
// });
// button.click();
// button.click();
// button.click();

// expect(getByTestId(container, "counter")).toHaveTextContent(/^-3$/);
// });

test("contains description paragraph with mention of 'decrement' in header", () => {
expect(
container.querySelector("header").querySelector("p")
).toHaveTextContent(/decrement/i);
});
});
});