This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Questions for Guy | |
// 1. What to do with bulk deletion branch | |
// 2. What to do with tags branch | |
// Any prefs for design of creator view? Especially stuff in the sidebar? Hannah mentioned a cog situation, | |
// and I know the redesign is happening | |
// How is a collection different from a form? | |
// Is a collection similar to a review form? Or are these just types of forms. | |
// Collections need to know collection folder, that data seems unique to collection concept vs. just a form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cypress.on("window:before:load", win => { | |
cy.stub(win.console, "error", msg => { | |
if (msg.includes("This is an error")) { | |
return null; | |
} | |
cy.now("task", "error", msg); | |
throw new Error(msg); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cypress.on("window:before:load", win => { | |
cy.stub(win.console, "error", msg => { | |
cy.now("task", "error", msg); | |
throw new Error(msg); // all we needed to add! | |
}); | |
cy.stub(win.console, "warn", msg => { | |
cy.now("task", "warn", msg); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = on => { | |
on(`task`, { | |
error(message) { | |
console.error("\x1b[31m", "ERROR:", message, "\x1b[0m"); | |
}, | |
warn(message) { | |
console.warn("\x1b[33m", "WARNING:", message, "\x1b[0m"); | |
}, | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cypress.on("window:before:load", win => { | |
cy.stub(win.console, "error", msg => { | |
cy.now("task", "error", msg); | |
}); | |
cy.stub(win.console, "warn", msg => { | |
cy.now("task", "warn", msg); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... same above | |
function App() { | |
const [loaded, setLoaded] = useState(false); | |
useEffect(() => { | |
console.log("This is a log"); | |
console.warn("This is a warning"); | |
console.error("This is an error"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("has a link pointing to the react website", function() { | |
cy.server(); | |
cy.route("/200?**").as("fakeNetworkRequest"); | |
cy.visit("http://localhost:3000"); | |
cy.wait("@fakeNetworkRequest"); | |
cy.verifyLink("Learn React", "https://reactjs.org"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("Cypress Tutorial", function() { | |
beforeEach(function() { | |
cy.server(); | |
cy.route("/200?**").as("fakeNetworkRequest"); | |
cy.visit("http://localhost:3000"); | |
cy.wait("@fakeNetworkRequest"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("has a link pointing to the react website", function() { | |
cy.server(); | |
cy.route("/200?**").as("fakeNetworkRequest"); | |
cy.visit("http://localhost:3000"); | |
cy.wait("@fakeNetworkRequest"); | |
cy.verifyLink("Learn React", "https://reactjs.org"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("has a link pointing to the react website", function() { | |
cy.server(); | |
cy.route("/200?**").as("fakeNetworkRequest"); | |
cy.visit("http://localhost:3000"); | |
cy.wait("@fakeNetworkRequest"); | |
cy.findByText("Learn React").should( | |
"have.attr", |
NewerOlder