Skip to content

Commit

Permalink
test(e2e): fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 30, 2024
1 parent 9d8538c commit 7178555
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions e2e/tests/plugin-sitemap/sitemap.cy.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
describe('sitemap', () => {
const BASE = Cypress.env('E2E_BASE')

it('have sitemap', () => {
cy.request('/sitemap.xml').then((res) => {
cy.request(`${BASE}sitemap.xml`).then((res) => {
expect(res.body).to.be.a('string')
expect(res.body).to.contain('<?xml version="1.0"')
expect(res.body).to.contain('/markdown.html')
})
})

it('frontmatter config', () => {
cy.request('/sitemap.xml').then((res) => {
cy.request(`${BASE}sitemap.xml`).then((res) => {
expect(res.body).to.contain('<changefreq>yearly</changefreq>')
})
})

it('exclude url', () => {
cy.request('/sitemap.xml').then((res) => {
cy.request(`${BASE}sitemap.xml`).then((res) => {
expect(res.body).to.not.contain('/sitemap/config-exclude.html')
expect(res.body).to.not.contain('/sitemap/frontmatter-exclude.html')
expect(res.body).to.not.contain('/sitemap/meta-exclude.html')
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/theme-default/home.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const BASE = Cypress.env('E2E_BASE')

describe('homepage', () => {
const BASE = Cypress.env('E2E_BASE')

it('has hero info', () => {
const title = 'VuePress Ecosystem E2E'
const description = 'VuePress Ecosystem E2E Test Site'
Expand Down

0 comments on commit 7178555

Please sign in to comment.