diff --git a/DEVELOPING_TUTORIALS.md b/DEVELOPING_TUTORIALS.md index 05f364612..339f13c15 100644 --- a/DEVELOPING_TUTORIALS.md +++ b/DEVELOPING_TUTORIALS.md @@ -92,7 +92,7 @@ If proofing a PR for someone else, check out their branch (you'll see its name l > npm run serve ``` -6. Open a web browser to the following address to preview your work: http://localhost:3000/#/ +6. Open a web browser to the following address to preview your work: http://localhost:3000/ Vue will update your localhost preview automatically as you make changes. However, you won't be able to see any newly added lessons until you've updated the appropriate routes and import statements, as described below. @@ -170,13 +170,13 @@ If you want to add images to your Markdown file, place them in the `public/tutor Then in your lesson Markdown file, you can either add it with regular Markdown: ``` -![Description of the image](tutorial-assets/T0001L01-diagram.svg) +![Description of the image](/tutorial-assets/T0001L01-diagram.svg) ``` ...or with regular HTML, if you need to set the image size: ```html - + ``` ##### JavaScript file (skip for text-only lessons) @@ -503,7 +503,7 @@ The `title` of your tutorial will be seen in course listings on our tutorials pa ![screenshot](public/title-in-featured-tutorials.png) -The `url` will appear in the URL of your tutorial landing page and lessons. For example, `http://proto.school/#/short-tutorial-title/01`. In most cases this will match your tutorial title, but you may find that you need to make it shorter. Note that this URL will also be used to create the abbreviated title that is shown in the breadcrumb navigation and the small header at the top of each page of your tutorial. +The `url` will appear in the URL of your tutorial landing page and lessons. For example, `http://proto.school/short-tutorial-title/01`. In most cases this will match your tutorial title, but you may find that you need to make it shorter. Note that this URL will also be used to create the abbreviated title that is shown in the breadcrumb navigation and the small header at the top of each page of your tutorial. ![screenshot](public/url-breadcrumb-header.png) diff --git a/README.md b/README.md index cc0da0f53..d8f6a6239 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Clone the repo, install dependencies, check out the appropriate branch, and run > npm run serve ``` -View the site on localhost at: http://localhost:3000/#/ +View the site on localhost at: http://localhost:3000/ ## License diff --git a/cypress/integration/tutorials.spec.js b/cypress/integration/tutorials.spec.js index cd3bb8830..ad149c2cf 100644 --- a/cypress/integration/tutorials.spec.js +++ b/cypress/integration/tutorials.spec.js @@ -29,14 +29,14 @@ function viewSolutionsAndSubmitAll (tutorialId) { const lessonCount = tutorials[tutorialId].lessons.length // count excludes resources page // const hasResources = tutorials[tutorialId].hasOwnProperty('resources') it(`should find the ${tutorialName} tutorial`, function () { - cy.visit(`/#/${tutorialName}/`) - cy.get(`[href="#/${tutorialName}/01"]`).click() + cy.visit(`/${tutorialName}/`) + cy.get(`[href="/${tutorialName}/01"]`).click() }) // loop through standard lessons and attempt to pass challenges for (let i = 1; i <= lessonCount; i++) { let lessonNr = i.toString().padStart(2, 0) it(`should view the solution and pass test ${lessonNr}`, function () { - cy.url().should('include', `#/${tutorialName}/${lessonNr}`) + cy.url().should('include', `/${tutorialName}/${lessonNr}`) cy.get('[data-cy=code-editor-ready]').should('be.visible') // wait for editor to be updated cy.get('[data-cy=view-solution]').click() cy.get('[data-cy=solution-editor-ready]').should('be.visible') // wait for editor to be updated @@ -49,7 +49,7 @@ function viewSolutionsAndSubmitAll (tutorialId) { cy.contains('h1', 'Resources') // loads resources page cy.get('[data-cy=resources-content]') // loads meaningful content cy.get('[data-cy=more-tutorials]').click() - cy.url().should('include', `#/tutorials/`) + cy.url().should('include', `/tutorials/`) }) } @@ -59,7 +59,7 @@ function renderAllLessonsInTutorial (tutorialId) { const standardLessonCount = standardLessons.length it(`should find ${tutorialName} landing page with correct lesson count`, function () { - cy.visit(`/#/${tutorialName}/`) + cy.visit(`/${tutorialName}/`) cy.get(`[data-cy=lesson-link]`).should('have.length', standardLessonCount) }) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c1f5a772e..ee51f9ec7 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -22,4 +22,12 @@ // // // -- This is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) +Cypress.Commands.overwrite('visit', (originalFn, url, options) => { + originalFn(url, { ...options, failOnStatusCode: false }) +}) + +Cypress.on('uncaught:exception', (error, runnable) => { + console.error(error) + + return false +}) diff --git a/cypress/support/index.js b/cypress/support/index.js index d68db96df..185d654ec 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/public/404.html b/public/404.html new file mode 100644 index 000000000..c14047528 --- /dev/null +++ b/public/404.html @@ -0,0 +1,42 @@ + + + + + + + ProtoSchool + + + + + +              +              +              + + + + diff --git a/public/index.html b/public/index.html index 36fdd19da..a861880d0 100644 --- a/public/index.html +++ b/public/index.html @@ -22,6 +22,35 @@ font-family: 'Roboto', sans-serif; } +