Skip to content

Commit c0ab9e6

Browse files
author
Guillaume Chau
committed
test: refactoring files
1 parent c01dc08 commit c0ab9e6

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

packages/@vue/cli-ui/src/components/FileDiffView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
icon-left="done"
5555
:label="$t('components.file-diff-view.actions.continue')"
5656
class="big primary"
57+
data-testid="skip-button"
5758
@click="skip()"
5859
/>
5960
<VueButton

packages/@vue/cli-ui/tests/e2e/specs/test.js renamed to packages/@vue/cli-ui/tests/e2e/specs/g1-projects.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// https://docs.cypress.io/api/introduction/api.html
2-
31
describe('Vue project manager', () => {
42
it('Switches between tabs', () => {
53
cy.visit('/project/select')
@@ -85,29 +83,3 @@ describe('Vue project manager', () => {
8583
cy.get('.current-project').should('have.text', 'cli-ui-test')
8684
})
8785
})
88-
89-
describe('Plugins', () => {
90-
it('Should display the plugins', () => {
91-
cy.visit('/')
92-
cy.get('.project-plugin-item').should('have.length', 2)
93-
})
94-
95-
it('Should add a plugin', () => {
96-
cy.visit('/')
97-
cy.get('[data-testid="add-plugin"]').click()
98-
cy.get('.project-plugins-add').should('be.visible')
99-
// Search
100-
cy.get('.package-search-item:contains("@vue/cli-plugin-pwa")').should('be.visible')
101-
cy.get('.instant-search-input input').clear().type('unit-jest')
102-
cy.get('.package-search-item:contains("@vue/cli-plugin-pwa")').should('be.not.visible')
103-
cy.get('.package-search-item:contains("@vue/cli-plugin-unit-jest")').should('be.visible')
104-
cy.get('.instant-search-input input').clear()
105-
// Install
106-
cy.get('.package-search-item:contains("@vue/cli-plugin-pwa") [data-testid="name"]').should('be.visible').click()
107-
cy.get('[data-testid="download-plugin"]:contains("@vue/cli-plugin-pwa")').should('not.have.class', 'disabled').click()
108-
cy.get('.loading-screen .vue-ui-loading-indicator').should('be.visible')
109-
cy.get('.prompts-list', { timeout: 250000 }).should('be.visible')
110-
cy.get('[data-testid="finish-install"]').should('not.have.class', 'disabled').click()
111-
cy.get('.project-plugin-item', { timeout: 250000 }).should('have.length', 3)
112-
})
113-
})
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
describe('Plugins', () => {
2+
it('Should display the plugins', () => {
3+
cy.visit('/')
4+
cy.get('.project-plugin-item').should('have.length', 2)
5+
})
6+
7+
it('Should add a plugin', () => {
8+
cy.visit('/')
9+
cy.get('[data-testid="add-plugin"]').click()
10+
cy.get('.project-plugins-add').should('be.visible')
11+
// Search
12+
cy.get('.package-search-item:contains("@vue/cli-plugin-pwa")').should('be.visible')
13+
cy.get('.instant-search-input input').clear().type('unit-jest')
14+
cy.get('.package-search-item:contains("@vue/cli-plugin-pwa")').should('be.not.visible')
15+
cy.get('.package-search-item:contains("@vue/cli-plugin-unit-jest")').should('be.visible')
16+
cy.get('.instant-search-input input').clear()
17+
// Install
18+
cy.get('.package-search-item:contains("@vue/cli-plugin-pwa") [data-testid="name"]').should('be.visible').click()
19+
cy.get('[data-testid="download-plugin"]:contains("@vue/cli-plugin-pwa")').should('not.have.class', 'disabled').click()
20+
cy.get('.loading-screen .vue-ui-loading-indicator').should('be.visible')
21+
cy.get('.prompts-list', { timeout: 250000 }).should('be.visible')
22+
cy.get('[data-testid="finish-install"]').should('not.have.class', 'disabled').click()
23+
cy.get('.loading-screen .vue-ui-loading-indicator').should('be.visible')
24+
cy.get('.file-diff-view', { timeout: 250000 }).should('be.visible')
25+
cy.get('[data-testid="skip-button"]').should('not.have.class', 'disabled').click()
26+
cy.get('.project-plugin-item').should('have.length', 3)
27+
})
28+
})

0 commit comments

Comments
 (0)