├── .nvmrc ├── .node-version ├── .prettierignore ├── .vscode └── settings.json ├── .prettierrc ├── public ├── favicon.ico ├── images │ ├── courses │ │ ├── store.png │ │ └── cypress-rwa.png │ └── logo │ │ ├── cypress-logo.png │ │ └── cypress-logo.webp ├── robots.txt └── sitemap.xml ├── docs ├── images │ └── progress.png ├── index.md ├── utils │ └── index.md ├── machines │ └── index.md ├── scripts │ └── index.md ├── .vuepress │ └── config.js ├── directory-structure │ └── index.md └── pages │ └── index.md ├── .eslintrc ├── next-sitemap.js ├── lib └── fetch-courses.ts ├── pages ├── api │ ├── courses.js │ └── subscribe.js ├── _app.tsx ├── _document.js ├── index.tsx └── [course] │ ├── index.tsx │ └── [slug].tsx ├── next-env.d.ts ├── postcss.config.js ├── README.md ├── next.config.js ├── components ├── Progress │ ├── ProgressLine.tsx │ ├── CompletedLesson.tsx │ └── IncompleteLesson.tsx ├── Lesson │ ├── NextLessonBtn.tsx │ ├── CompleteLessonBtn.tsx │ ├── LessonToc.tsx │ ├── SkipChallenge.tsx │ ├── LessonProgress.tsx │ ├── LessonBreadcrumbs.tsx │ ├── LessonHero.tsx │ ├── MultipleChoiceChallenge.tsx │ └── LessonLayout.tsx ├── Layout.tsx ├── Course │ ├── CourseHero.tsx │ ├── CourseNextLessonBtn.tsx │ ├── CourseProgress.tsx │ └── CourseContent.tsx ├── Mobile │ ├── MobileCourses.tsx │ ├── MobileProgress.tsx │ └── MobileNav.tsx ├── Home │ ├── HomeProgress.tsx │ ├── HomeFeatures.tsx │ ├── HomeHero.tsx │ └── HomeCourses.tsx ├── Subscribe.tsx ├── Footer.tsx └── Header.tsx ├── .gitignore ├── utils ├── mdxUtils.ts └── machineUtils.ts ├── types └── common.d.ts ├── machines ├── progressService.ts └── progressMachine.ts ├── tsconfig.json ├── styles └── global.css ├── content └── courses │ ├── testing-foundations │ ├── manual-vs-automated-testing.mdx │ ├── testing-is-a-mindset.mdx │ └── knowing-what-to-test.mdx │ ├── cypress-fundamentals │ ├── cypress-runs-in-the-browser.mdx │ ├── command-chaining.mdx │ └── how-to-write-a-test.mdx │ └── testing-your-first-application │ ├── installing-cypress-and-writing-our-first-test.mdx │ ├── setting-up-data-before-each-test.mdx │ └── app-install-and-overview.mdx ├── package.json ├── renovate.json ├── tailwind.config.js └── data └── courses.json /.nvmrc: -------------------------------------------------------------------------------- 1 | 18.17.1 -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 18.17.1 -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .next -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false 3 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cypress-io/cypress-realworld-testing-course-app/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /docs/images/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cypress-io/cypress-realworld-testing-course-app/HEAD/docs/images/progress.png -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "next", 4 | "prettier" 5 | ], 6 | "plugins": [ 7 | "prettier" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /next-sitemap.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | siteUrl: 'https://cypress-realworld-testing-course-app.vercel.app/', 3 | generateRobotsTxt: true, 4 | } -------------------------------------------------------------------------------- /public/images/courses/store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cypress-io/cypress-realworld-testing-course-app/HEAD/public/images/courses/store.png -------------------------------------------------------------------------------- /lib/fetch-courses.ts: -------------------------------------------------------------------------------- 1 | import coursesJson from "../data/courses.json" 2 | 3 | export async function fetchCourses() { 4 | return coursesJson 5 | } 6 | -------------------------------------------------------------------------------- /public/images/logo/cypress-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cypress-io/cypress-realworld-testing-course-app/HEAD/public/images/logo/cypress-logo.png -------------------------------------------------------------------------------- /public/images/courses/cypress-rwa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cypress-io/cypress-realworld-testing-course-app/HEAD/public/images/courses/cypress-rwa.png -------------------------------------------------------------------------------- /public/images/logo/cypress-logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cypress-io/cypress-realworld-testing-course-app/HEAD/public/images/logo/cypress-logo.webp -------------------------------------------------------------------------------- /pages/api/courses.js: -------------------------------------------------------------------------------- 1 | import coursesJson from "../../data/courses.json" 2 | 3 | export default function handler(req, res) { 4 | res.status(200).json(coursesJson) 5 | } 6 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # Real World Testing with Cypress 2 | 3 | Real World Testing with Cypress is built with [Next.js](https://nextjs.org). Check out the various links in the left-hand sidebar for more documentation. 4 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | // If you want to use other PostCSS plugins, see the following: 2 | // https://tailwindcss.com/docs/using-with-preprocessors 3 | module.exports = { 4 | plugins: { 5 | tailwindcss: {}, 6 | autoprefixer: {}, 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # * 2 | User-agent: * 3 | Allow: / 4 | 5 | # Host 6 | Host: https://cypress-realworld-testing-course-app.vercel.app/ 7 | 8 | # Sitemaps 9 | Sitemap: https://cypress-realworld-testing-course-app.vercel.app/sitemap.xml 10 | -------------------------------------------------------------------------------- /public/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://cypress-realworld-testing-course-app.vercel.app/sitemap-0.xml 4 | -------------------------------------------------------------------------------- /pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import "tailwindcss/tailwind.css" 2 | import "../styles/global.css" 3 | 4 | function MyApp({ Component, pageProps }) { 5 | return ( 6 | <> 7 | 8 | 9 | ) 10 | } 11 | 12 | export default MyApp 13 | -------------------------------------------------------------------------------- /docs/utils/index.md: -------------------------------------------------------------------------------- 1 | # Utils 2 | 3 | ## machineUtils.ts 4 | 5 | Contains several utility methods used for fetching lesson data and state from `machines/progressMachine.ts` 6 | 7 | ## mdxUtils.ts 8 | 9 | Contains several utility methods used for fetching _courses_ and _real world examples_ content files and data from the `/content` directory. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Real World Testing with Cypress - Course App 2 | 3 | This application is for the [Testing your first application course](https://learn.cypress.io/testing-your-first-application) on [learn.cypress.io](https://learn.cypress.io/). 4 | 5 | The `start` branch is the main branch for this repo and is the starting point for the course. The [final](https://github.com/cypress-io/cypress-realworld-testing-course-app/tree/final) branch contains the completed tests. 6 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = { 3 | swcMinify: true, 4 | images: { 5 | domains: ["images.unsplash.com", "source.unsplash.com", "tailwindui.com"], 6 | }, 7 | webpack: function (config) { 8 | config.module.rules.push({ 9 | test: /\.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/, 10 | use: { 11 | loader: "url-loader", 12 | options: { 13 | limit: 100000, 14 | name: "[name].[ext]", 15 | }, 16 | }, 17 | }) 18 | return config 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /components/Progress/ProgressLine.tsx: -------------------------------------------------------------------------------- 1 | type Props = { 2 | index: number 3 | isCompleted: boolean 4 | lessons: [] 5 | } 6 | 7 | export default function ProgressLine({ index, isCompleted, lessons }: Props) { 8 | return ( 9 | <> 10 | {index !== lessons.length - 1 ? ( 11 |