Skip to content

Commit 44707fe

Browse files
authored
chore: remove uneeded dependencies and simplify setup (#104)
1 parent a244952 commit 44707fe

File tree

6 files changed

+13
-17
lines changed

6 files changed

+13
-17
lines changed

cypress.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"baseUrl": "http://localhost:13370",
32
"video": false
43
}

cypress/fixtures/test-app/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<h2>*ByLabel and *ByPlaceholder</h2>
2727
<label for="by-text-input">Label 1</label>
2828
<input type="text" placeholder="Input 1" id="by-text-input" />
29-
29+
3030
<label for="by-text-input-2">Label 2</label>
3131
<input type="text" placeholder="Input 2" id="by-text-input-2" />
3232
</section>
@@ -41,7 +41,7 @@ <h3>ByText within</h3>
4141
<section>
4242
<h2>*ByDisplayValue</h2>
4343
<input type="text" value="Display Value 1" />
44-
44+
4545
<input type="text" value="Display Value 2" />
4646
</section>
4747
<section>
@@ -87,7 +87,7 @@ <h2>*AllByText</h2>
8787
</section>
8888
<section>
8989
<h2>*ByText on another page</h2>
90-
<a onclick='setTimeout(function() { window.location = "/next-page.html"; }, 100);'>Next Page</a>
90+
<a onclick='setTimeout(function() { window.location = "/cypress/fixtures/test-app/next-page.html"; }, 100);'>Next Page</a>
9191
</section>
9292
<!-- Prettier unindents the script tag below -->
9393
<script>

cypress/integration/find.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('find* dom-testing-library commands', () => {
22
beforeEach(() => {
3-
cy.visit('/')
3+
cy.visit('cypress/fixtures/test-app/')
44
})
55

66
// Test each of the types of queries: LabelText, PlaceholderText, Text, DisplayValue, AltText, Title, Role, TestId

cypress/integration/get.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('get* queries should error', () => {
22
beforeEach(() => {
3-
cy.visit('/')
3+
cy.visit('cypress/fixtures/test-app/')
44
})
55

66
const queryPrefixes = ['By', 'AllBy']
@@ -23,4 +23,4 @@ describe('get* queries should error', () => {
2323
})
2424
})
2525

26-
/* global cy */
26+
/* global cy */

cypress/integration/query.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe('query* dom-testing-library commands', () => {
22
beforeEach(() => {
3-
cy.visit('/')
3+
cy.visit('cypress/fixtures/test-app/')
44
})
55

66
// Test each of the types of queries: LabelText, PlaceholderText, Text, DisplayValue, AltText, Title, Role, TestId
@@ -30,7 +30,7 @@ describe('query* dom-testing-library commands', () => {
3030
.click()
3131
.should('contain', 'Button Clicked')
3232
})
33-
33+
3434
it('queryAllByText', () => {
3535
cy.queryAllByText(/^Button Text \d$/)
3636
.should('have.length', 2)
@@ -44,7 +44,7 @@ describe('query* dom-testing-library commands', () => {
4444
.clear()
4545
.type('Some new text')
4646
})
47-
47+
4848
it('queryAllByDisplayValue', () => {
4949
cy.queryAllByDisplayValue(/^Display Value \d$/)
5050
.should('have.length', 2)

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
"test": "npm-run-all --parallel test:unit test:cypress",
1313
"test:unit": "kcd-scripts test --no-watch",
1414
"test:unit:watch": "kcd-scripts test",
15-
"test:cypress:serve": "serve --listen 13370 ./cypress/fixtures/test-app",
16-
"test:cypress:run": "wait-port --timeout 10000 localhost:13370 && cypress run",
15+
"test:cypress:run": "cypress run",
1716
"test:cypress:open": "cypress open",
18-
"test:cypress": "npm-run-all --silent --parallel --race test:cypress:serve test:cypress:run",
19-
"test:cypress:dev": "npm-run-all --silent --parallel --race test:cypress:serve test:cypress:open",
17+
"test:cypress": "npm run test:cypress:run",
18+
"test:cypress:dev": "test:cypress:open",
2019
"validate": "kcd-scripts validate build,lint,test",
2120
"setup": "npm install && npm run validate -s"
2221
},
@@ -49,9 +48,7 @@
4948
"devDependencies": {
5049
"cypress": "3.4.1",
5150
"kcd-scripts": "^1.5.2",
52-
"npm-run-all": "^4.1.2",
53-
"serve": "^11.1.0",
54-
"wait-port": "^0.2.2"
51+
"npm-run-all": "^4.1.2"
5552
},
5653
"peerDependencies": {
5754
"cypress": "^2.1.0 || ^3.0.0"

0 commit comments

Comments
 (0)