Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a735739

Browse filesBrowse files
authored
fix: enable e2e tests for --bare (#674)
1 parent ad17806 commit a735739
Copy full SHA for a735739

File tree

9 files changed

+9
-10
lines changed
Filter options

9 files changed

+9
-10
lines changed

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ jobs:
167167

168168
- name: Run e2e test script
169169
working-directory: ./playground
170-
# bare templates can't pass e2e tests because their page structures don't match the example tests
171-
run: pnpm --filter '*${{ matrix.e2e-framework }}*' --filter '!*bare*' --workspace-concurrency 1 test:e2e
170+
run: pnpm --filter '*${{ matrix.e2e-framework }}*' --workspace-concurrency 1 test:e2e
172171

173172
# FIXME: Component testing is failing in CI after running too many tests.
174173
# The workaround in https://github.com/cypress-io/cypress/issues/22208 is not working.

‎template/bare/base/src/App.vue

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup></script>
22

33
<template>
4-
<h1>Hello World</h1>
4+
<h1>You did it!</h1>
55
</template>
66

77
<style scoped></style>

‎template/bare/cypress-ct/src/__tests__/App.cy.js

Copy file name to clipboardExpand all lines: template/bare/cypress-ct/src/__tests__/App.cy.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import App from '../App.vue'
33
describe('App', () => {
44
it('mounts and renders properly', () => {
55
cy.mount(App)
6-
cy.get('h1').should('contain', 'Hello World')
6+
cy.get('h1').should('contain', 'You did it!')
77
})
88
})

‎template/bare/nightwatch-ct/src/__tests__/App.spec.js

Copy file name to clipboardExpand all lines: template/bare/nightwatch-ct/src/__tests__/App.spec.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('App', function () {
77
const appComponent = await browser.mountComponent('/src/App.vue');
88

99
browser.expect.element(appComponent).to.be.present;
10-
browser.expect.element('h1').text.to.contain('Hello World');
10+
browser.expect.element('h1').text.to.contain('You did it!');
1111
})
1212

1313
after((browser) => browser.end())

‎template/bare/typescript/src/App.vue

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts"></script>
22

33
<template>
4-
<h1>Hello World</h1>
4+
<h1>You did it!</h1>
55
</template>
66

77
<style scoped></style>

‎template/bare/vitest/src/__tests__/App.spec.js

Copy file name to clipboardExpand all lines: template/bare/vitest/src/__tests__/App.spec.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import App from '../App.vue'
66
describe('App', () => {
77
it('mounts renders properly', () => {
88
const wrapper = mount(App)
9-
expect(wrapper.text()).toContain('Hello World')
9+
expect(wrapper.text()).toContain('You did it!')
1010
})
1111
})

‎template/config/nightwatch/tests/e2e/example.js

Copy file name to clipboardExpand all lines: template/config/nightwatch/tests/e2e/example.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('My First Test', function () {
44
})
55

66
it('visits the app root url', function () {
7-
browser.assert.textContains('.green', 'You did it!')
7+
browser.assert.textContains('h1', 'You did it!')
88
})
99

1010
after((browser) => browser.end())

‎template/config/playwright/e2e/vue.spec.js

Copy file name to clipboardExpand all lines: template/config/playwright/e2e/vue.spec.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { test, expect } from '@playwright/test';
44
// https://playwright.dev/docs/intro
55
test('visits the app root url', async ({ page }) => {
66
await page.goto('/');
7-
await expect(page.locator('div.greetings > h1')).toHaveText('You did it!');
7+
await expect(page.locator('h1')).toHaveText('You did it!');
88
})

‎template/config/playwright/e2e/vue.spec.ts

Copy file name to clipboardExpand all lines: template/config/playwright/e2e/vue.spec.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { test, expect } from '@playwright/test';
44
// https://playwright.dev/docs/intro
55
test('visits the app root url', async ({ page }) => {
66
await page.goto('/');
7-
await expect(page.locator('div.greetings > h1')).toHaveText('You did it!');
7+
await expect(page.locator('h1')).toHaveText('You did it!');
88
})

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.