Skip to content

Commit

Permalink
Merge 4265f62 into 7426034
Browse files Browse the repository at this point in the history
  • Loading branch information
hyesungoh authored Jul 16, 2022
2 parents 7426034 + 4265f62 commit 6620314
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/blog/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export default defineConfig({
},
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:3000/',
defaultCommandTimeout: 30000,
},
});
29 changes: 29 additions & 0 deletions apps/blog/cypress/e2e/slug/main-and-aside.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
describe('slug - main', () => {
it('should linkable to slug', () => {
cy.visit('/');
cy.get('main').find('a').first().click();
cy.url().should('not.eq', Cypress.config().baseUrl);
});

it('should have level 1 heading', () => {
cy.get('h1').should('exist');
});

it('should exist category link at main', () => {
cy.get('main').find('p').first().find('a').should('exist');
});

it('should exist article at inside of main', () => {
cy.get('main').find('article').should('exist');
});

it('should render TOC when width size over 1000', () => {
cy.viewport('macbook-13');
cy.get('aside').should('exist');
});

it('should not render TOC when width size under 1000', () => {
cy.viewport('iphone-xr');
cy.get('aside').should('not.exist');
});
});

0 comments on commit 6620314

Please sign in to comment.