forked from ToolJet/ToolJet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/nest-server
- Loading branch information
Showing
22 changed files
with
497 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"email": "dev@tooljet.io", | ||
"password": "password" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
describe('Dashboard operations on Apps', () => { | ||
|
||
const currentDate = new Date(); | ||
const folderName= 'folder '+ currentDate.toJSON(); | ||
|
||
beforeEach(() => { | ||
//read data from fixtures | ||
cy.fixture('login-data').then(function (testdata) { | ||
cy.login(testdata.email,testdata.password) | ||
}) | ||
|
||
cy.wait(1000) | ||
cy.get('body').then(($title=> | ||
{ | ||
//check if dashboard is in empty state | ||
if($title.text().includes('You haven\'t created any apps yet.')) | ||
{ | ||
cy.get('a.btn').eq(0).should('have.text','Create your first app') | ||
.click() | ||
cy.go('back') | ||
} | ||
})) | ||
}) | ||
|
||
it('should open app in app builder using Edit button', () => { | ||
|
||
cy.wait(2000) | ||
cy.get('.badge').contains('Edit').click() | ||
cy.get('title').should('have.text','ToolJet - Dashboard') | ||
}); | ||
|
||
it('should open app in app viewer using Launch button ', () => { | ||
|
||
cy.get('a[target="_blank"]').invoke("removeAttr","target").click() | ||
cy.url().should('include','/applications') | ||
|
||
}); | ||
|
||
it('should be able to add app to a folder', () => { | ||
|
||
//Pre-requisite: Create folder | ||
cy.get('a[class="mx-3"]').contains('+ Folder').click() | ||
cy.get('input[placeholder="folder name"]').should('have.attr','placeholder','folder name').type(folderName) | ||
cy.get('.btn').contains('Save').click() | ||
|
||
//Steps to select the folder name and add app to folder. | ||
cy.get('span[role="button"]').click() | ||
cy.get('span[role="button"]').contains('Add to folder ').click() | ||
cy.get('input[placeholder="Select folder"]').type(folderName) | ||
cy.get('[data-index="0"] > .select-search__option').click() | ||
|
||
}); | ||
|
||
it('should be able to delete app', () => { | ||
cy.get('td img.svg-icon').eq(0).click() | ||
cy.get('[role="button"]').contains('Delete app').click() | ||
cy.get('.modal-body').should('have.text','The app and the associated data will be permanently deleted, do you want to continue?') | ||
cy.get('.btn').contains('Yes').click() | ||
|
||
}); | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
describe('Empty state of dashboard', () => { | ||
|
||
beforeEach(() => { | ||
//read data from fixtures | ||
cy.fixture('login-data').then(function (testdata) | ||
{ | ||
cy.login(testdata.email,testdata.password) | ||
}) | ||
}) | ||
|
||
it('should show empty screen when there are no apps', () => { | ||
|
||
cy.wait(1000) | ||
cy.get('body').then(($title=> | ||
{ | ||
//if user has not created any app yet | ||
if($title.text().includes('You haven\'t created any apps yet.')) | ||
{ | ||
//image for empty state should be visible | ||
cy.get('.empty-img').should('be.visible') | ||
|
||
//empty title should be visible | ||
cy.log('Testing empty state dashboard view.') | ||
cy.get('.empty-title').should('be.visible') | ||
.and('have.text','You haven\'t created any apps yet.') | ||
|
||
//Read Documentation button should be present and working | ||
cy.get('a.btn').eq(1).should('have.attr','href','https://docs.tooljet.io') | ||
.and('have.text','Read documentation') | ||
|
||
//test Create your first app button should be visible and working | ||
cy.get('a.btn').eq(0).should('be.visible') | ||
.and('have.text','Create your first app') | ||
.click() | ||
cy.get('title').should('have.text','ToolJet - Dashboard') | ||
} | ||
else | ||
{ | ||
cy.log("User has already created few apps hence this test will be skipped.") | ||
} | ||
})) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: '3' | ||
|
||
services: | ||
client: | ||
tty: true | ||
stdin_open: true | ||
image: tooljet/tooljet-client-ce:latest | ||
restart: always | ||
depends_on: | ||
- server | ||
volumes: | ||
- logs:/var/log/openresty/ | ||
- certs:/etc/resty-auto-ssl/ | ||
- fallbackcerts:/etc/fallback-certs | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
command: openresty -g "daemon off;" | ||
|
||
server: | ||
image: tooljet/tooljet-server-ce:latest | ||
tty: true | ||
stdin_open: true | ||
restart: always | ||
ports: | ||
- 3000 | ||
env_file: .env | ||
environment: | ||
RAILS_LOG_TO_STDOUT: "true" | ||
command: ["bundle", "exec", "rails", "s", "-p", "3000", "-b", "0.0.0.0"] | ||
|
||
volumes: | ||
certs: | ||
logs: | ||
fallbackcerts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# pull official base image | ||
FROM node:14.17.0-alpine | ||
|
||
# set working directory | ||
WORKDIR /app | ||
|
||
# add `/app/node_modules/.bin` to $PATH | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
|
||
# Fix for heap limit allocation issue | ||
ENV NODE_OPTIONS="--max-old-space-size=2048" | ||
|
||
# install app dependencies | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
RUN npm install react-scripts@3.4.1 -g --silent | ||
|
||
# add app | ||
COPY . ./ | ||
|
||
|
||
# start app | ||
CMD ["npm", "start"] | ||
|
||
EXPOSE 8082 |
Oops, something went wrong.