diff --git a/.eslintrc b/.eslintrc
index 6363bb2..67b2bd6 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -35,7 +35,6 @@
"block-scoped-var": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"camelcase": [2, { "properties": "always" }],
- "comma-dangle": [2, "never"],
"comma-spacing": [2, { "before": false, "after": true }],
"comma-style": [2, "last"],
"complexity": 0,
diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml
index 48dea1a..9fd81cc 100644
--- a/.github/workflows/test-and-release.yml
+++ b/.github/workflows/test-and-release.yml
@@ -4,17 +4,19 @@ on:
branches:
- master
jobs:
- test:
- runs-on: ubuntu-16.04
+ test-and-release:
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: actions/setup-node@v1
+ - name: Lint, build and test
+ uses: cypress-io/github-action@v2
with:
- node-version: '12'
- - run: yarn install --frozen-lockfile
- - run: yarn lint
- - run: yarn build
- - run: yarn test
+ build: yarn lint-and-build
+ start: yarn cy:server
+ record: true
+ env:
+ CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml
index edb0a9c..215f159 100644
--- a/.github/workflows/test-pull-request.yml
+++ b/.github/workflows/test-pull-request.yml
@@ -1,14 +1,16 @@
name: Test Pull Request
on: pull_request
jobs:
- test:
- runs-on: ubuntu-16.04
+ test-pull-request:
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: actions/setup-node@v1
+ - name: Lint, build and test
+ uses: cypress-io/github-action@v2
with:
- node-version: '12'
- - run: yarn install --frozen-lockfile
- - run: yarn lint
- - run: yarn build
- - run: yarn test
+ build: yarn lint-and-build
+ start: yarn cy:server
+ record: true
+ env:
+ CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/cypress.json b/cypress.json
index 548d77f..27a109c 100644
--- a/cypress.json
+++ b/cypress.json
@@ -1,3 +1,4 @@
{
- "baseUrl": "http://localhost:8989"
+ "baseUrl": "http://localhost:8989",
+ "projectId": "2nsyux"
}
diff --git a/cypress/integration/cell.js b/cypress/integration/cell.js
index f48f078..f95f38b 100644
--- a/cypress/integration/cell.js
+++ b/cypress/integration/cell.js
@@ -32,7 +32,7 @@ describe('Cell', function () {
});
it('edit cell', function () {
- cy.getCell(4, 1).dblclick();
+ cy.getCell(4, 1).dblclick({ force: true });
cy.getCell(4, 1).find('input').click();
cy.focused().type('{selectall}{del}Test{enter}');
cy.getCell(4, 1).contains('Test');
diff --git a/cypress/integration/inline_filters.js b/cypress/integration/inline_filters.js
index 2665cd0..c18e94a 100644
--- a/cypress/integration/inline_filters.js
+++ b/cypress/integration/inline_filters.js
@@ -14,36 +14,36 @@ describe('Inline Filters', function () {
cy.getCell(4, 0).click().type('{ctrl}f');
cy.get('@filterInput4').type('edin');
- cy.get('.dt-row[data-row-index=0]').should('be.visible');
- cy.get('.dt-row[data-row-index=1]').should('not.be.visible');
+ cy.get('.dt-row-0').should('be.visible');
+ cy.get('.dt-row-1').should('not.exist');
cy.get('@filterInput4').clear();
});
it('simple number filter', function () {
cy.get('@filterInput5').type('2360');
cy.get('.dt-row[data-row-index=8]').should('be.visible');
- cy.get('.dt-row[data-row-index=15]').should('not.be.visible');
- cy.get('.dt-row[data-row-index=22]').should('not.be.visible');
+ cy.get('.dt-row[data-row-index=15]').should('not.exist');
+ cy.get('.dt-row[data-row-index=22]').should('not.exist');
cy.get('@filterInput5').clear();
});
it('greater than', function () {
cy.get('@filterInput5').type('> 6000');
- cy.get('.dt-row[data-row-index=0]').should('not.be.visible');
+ cy.get('.dt-row[data-row-index=0]').should('not.exist');
cy.get('.dt-row[data-row-index=3]').should('be.visible');
cy.get('@filterInput5').clear();
});
it('less than', function () {
cy.get('@filterInput5').type('< 2000');
- cy.get('.dt-row[data-row-index=0]').should('not.be.visible');
+ cy.get('.dt-row[data-row-index=0]').should('not.exist');
cy.get('.dt-row[data-row-index=51]').should('be.visible');
cy.get('@filterInput5').clear();
});
it('range', function () {
cy.get('@filterInput5').type(' 2000: 5000');
- cy.get('.dt-row[data-row-index=4]').should('not.be.visible');
+ cy.get('.dt-row[data-row-index=4]').should('not.exist');
cy.get('.dt-row[data-row-index=5]').should('be.visible');
cy.get('@filterInput5').clear();
});
@@ -58,16 +58,15 @@ describe('Inline Filters', function () {
cy.get('@filterInput4').type('to');
cy.get('@filterInput5').type('54');
- cy.get('.dt-row[data-row-index=0]').should('be.visible');
cy.get('.dt-row[data-row-index=4]').should('be.visible');
- cy.get('.dt-row[data-row-index=1]').should('not.be.visible');
+ cy.get('.dt-row[data-row-index=1]').should('not.exist');
cy.get('@filterInput4').clear();
cy.get('@filterInput5').clear();
});
it('greater than for string type filters', function () {
cy.get('@filterInput6').type('> 01/07/2011');
- cy.get('.dt-row[data-row-index=0]').should('not.be.visible');
+ cy.get('.dt-row[data-row-index=0]').should('not.exist');
cy.get('.dt-row[data-row-index=1]').should('be.visible');
cy.get('.dt-row[data-row-index=3]').should('be.visible');
cy.get('.dt-row[data-row-index=5]').should('be.visible');
diff --git a/index.html b/index.html
index 277620e..6a81379 100644
--- a/index.html
+++ b/index.html
@@ -18,7 +18,8 @@
Frappé DataTable
-
+
+