-
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.
- Loading branch information
1 parent
7ec5056
commit 1fc4a1d
Showing
13 changed files
with
7,620 additions
and
2,634 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ logs | |
*.log | ||
npm-debug.log* | ||
.DS_Store | ||
start_local.sh | ||
|
||
coverage | ||
|
||
|
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 |
---|---|---|
@@ -1,93 +1,67 @@ | ||
############################################################################## | ||
# Run: | ||
# make | ||
# make start | ||
# | ||
# Go to: | ||
# | ||
# http://localhost:3000 | ||
# | ||
############################################################################## | ||
# SETUP MAKE | ||
# | ||
## Defensive settings for make: https://tech.davis-hansson.com/p/make/ | ||
# Yeoman Volto App development | ||
|
||
### Defensive settings for make: | ||
# https://tech.davis-hansson.com/p/make/ | ||
SHELL:=bash | ||
.ONESHELL: | ||
# for Makefile debugging purposes add -x to the .SHELLFLAGS | ||
.SHELLFLAGS:=-eu -o pipefail -O inherit_errexit -c | ||
.SHELLFLAGS:=-xeu -o pipefail -O inherit_errexit -c | ||
.SILENT: | ||
.DELETE_ON_ERROR: | ||
MAKEFLAGS+=--warn-undefined-variables | ||
MAKEFLAGS+=--no-builtin-rules | ||
|
||
# Colors | ||
# OK=Green, warn=yellow, error=red | ||
ifeq ($(TERM),) | ||
# no colors if not in terminal | ||
MARK_COLOR= | ||
OK_COLOR= | ||
WARN_COLOR= | ||
ERROR_COLOR= | ||
NO_COLOR= | ||
else | ||
MARK_COLOR=`tput setaf 6` | ||
OK_COLOR=`tput setaf 2` | ||
WARN_COLOR=`tput setaf 3` | ||
ERROR_COLOR=`tput setaf 1` | ||
NO_COLOR=`tput sgr0` | ||
endif | ||
# Project settings | ||
|
||
DIR=$(shell basename $$(pwd)) | ||
ADDON ?= "freshwater-frontend" | ||
|
||
# Recipe snippets for reuse | ||
|
||
# We like colors | ||
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects | ||
RED=`tput setaf 1` | ||
GREEN=`tput setaf 2` | ||
RESET=`tput sgr0` | ||
YELLOW=`tput setaf 3` | ||
|
||
############################################################################## | ||
|
||
# Top-level targets | ||
.PHONY: all | ||
all: develop install | ||
all: project | ||
|
||
.PHONY: develop | ||
develop: ## Runs missdev in the local project (mrs.developer.json should be present) | ||
npx -p mrs-developer missdev --config=jsconfig.json --output=addons --fetch-https | ||
.PHONY: start-test-backend | ||
start-test-backend: ## Start Test Plone Backend | ||
@echo "$(GREEN)==> Start Test Plone Backend$(RESET)" | ||
docker run -i --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e VERSIONS="plone.restapi=8.17.0 plone.rest=2.0.0a1 plone.app.vocabularies=4.3.0" -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors -e ADDONS='plone.app.robotframework plone.app.contenttypes plone.restapi plone.volto' plone ./bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING | ||
|
||
.PHONY: start-backend-docker | ||
start-backend-docker: ## Starts a Docker-based backend | ||
@echo "$(GREEN)==> Start Docker-based Plone Backend$(RESET)" | ||
docker run -it --rm --name=plone -p 8080:8080 -e VERSIONS="plone.restapi=8.17.0 plone.rest=2.0.0a1 plone.app.vocabularies=4.3.0" -e SITE=Plone -e ADDONS="plone.volto" -e ZCML="plone.volto.cors" plone | ||
|
||
.PHONY: help | ||
help: ## Show this help. | ||
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)" | ||
|
||
.PHONY: install | ||
install: ## Frontend: Install project and add-ons | ||
install: ## Install the frontend | ||
@echo "Install frontend" | ||
$(MAKE) omelette | ||
$(MAKE) preinstall | ||
yarn install | ||
|
||
.PHONY: start | ||
start: ## Frontend: Start | ||
yarn start | ||
.PHONY: preinstall | ||
preinstall: ## Preinstall task, checks if missdev (mrs-developer) is present and runs it | ||
if [ -f $$(pwd)/mrs.developer.json ]; then make develop; fi | ||
|
||
.PHONY: develop | ||
develop: ## Runs missdev in the local project (mrs.developer.json should be present) | ||
npx -p mrs-developer missdev --config=jsconfig.json --output=addons --fetch-https | ||
|
||
.PHONY: omelette | ||
omelette: ## Creates the omelette folder that contains a link to the installed version of Volto (a softlink pointing to node_modules/@plone/volto) | ||
if [ ! -d omelette ]; then ln -sf node_modules/@plone/volto omelette; fi | ||
|
||
.PHONY: patches | ||
patches: | ||
/bin/bash patches/patchit.sh > /dev/null 2>&1 ||true | ||
|
||
.PHONY: release | ||
release: ## Show release candidates | ||
./scripts/release.py -v | ||
|
||
.PHONY: update | ||
update: ## git pull all src/addons | ||
./scripts/update.sh | ||
|
||
.PHONY: issues | ||
issues: ## Check github for open pull-requests | ||
./scripts/pull-requests.py WARN | ||
|
||
.PHONY: issues-all | ||
issues-all: ## Check github for open pull-requests | ||
./scripts/pull-requests-volto.py WARN | ||
|
||
.PHONY: status | ||
status: ## Check src/addons for changes | ||
./scripts/status.sh | ||
|
||
.PHONY: pull | ||
pull: ## Run git pull on all src/addons | ||
./scripts/pull.sh | ||
|
||
.PHONY: help | ||
help: ## Show this help. | ||
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)" | ||
head -n 10 Makefile | ||
/bin/bash patches/patchit.sh > /dev/null 2>&1 ||true |
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 |
---|---|---|
@@ -1,32 +1,30 @@ | ||
import { slateBeforeEach, slateAfterEach } from '../support/e2e'; | ||
import { setupBeforeEach, tearDownAfterEach } from '../support/e2e'; | ||
|
||
describe('Blocks Tests', () => { | ||
beforeEach(slateBeforeEach); | ||
afterEach(slateAfterEach); | ||
beforeEach(setupBeforeEach); | ||
afterEach(tearDownAfterEach); | ||
|
||
it('Add Block: Empty', () => { | ||
cy.clearSlateTitle(); | ||
cy.getSlateTitle().type('My Add-on Page'); | ||
// Change page title | ||
cy.get('[contenteditable=true]').first().clear(); | ||
|
||
cy.get('[contenteditable=true]').first().type('My Add-on Page'); | ||
|
||
cy.get('.documentFirstHeading').contains('My Add-on Page'); | ||
|
||
cy.getSlate().click(); | ||
cy.get('[contenteditable=true]').first().type('{enter}'); | ||
|
||
// Add block | ||
cy.get('.ui.basic.icon.button.block-add-button').first().click(); | ||
cy.get('.blocks-chooser .title').contains('Media').click(); | ||
cy.get('.content.active.media .button.image').contains('Image').click(); | ||
|
||
// Save | ||
cy.get('#toolbar-save').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); | ||
|
||
cy.get('#toolbar-personal').click(); | ||
cy.contains('Site Setup').click(); | ||
|
||
cy.contains('Version Overview'); | ||
cy.contains('Frontend'); | ||
cy.contains('History'); | ||
cy.contains('Backend'); | ||
cy.contains('Plone'); | ||
cy.contains('plone.restapi'); | ||
cy.contains('CMF'); | ||
cy.contains('Zope'); | ||
cy.contains('Python'); | ||
cy.contains('PIL'); | ||
// then the page view should contain our changes | ||
cy.contains('My Add-on Page'); | ||
cy.get('.block.image'); | ||
}); | ||
}); |
Oops, something went wrong.