Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc #9849

Merged
merged 8 commits into from
Jan 13, 2020
Merged

Add doc #9849

Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@
- [Request IO](/communication/request_io.md)
- [JSON RPC](/communication/rpc.md)

- Testing (tbd)

- Deployment (tbd)

- Development
- ["qx" CLI commands](/compiler/cli/commands.md)
Expand All @@ -108,6 +105,11 @@
- [compile.json](/compiler/configuration/compile.md)
- [API](/compiler/configuration/api.md)
- [Advanced compiler topics](/compiler/internals/)
- [Migrating from Python to qx toolchain](/compiler/migration.md)

- [**Testing**](/compiler/cli/testing.md)

- Deployment (tbd)


- Tutorials
Expand Down
4 changes: 2 additions & 2 deletions docs/compiler/cli/commands.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### CLI Commands
# CLI Commands

The qooxdoo CLI commands allow to conveniently create, modify, compile, testand publish
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testand -> test, and

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

and publish your qooxdoo project. To see the main available commands, type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete duplicated and publish

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Expand Down Expand Up @@ -30,7 +30,7 @@ Commands:

To see the subcommands parameters and options, just type in `qx <command> --help`.

# Persistent Configuration
## Persistent Configuration

Some commands require (or benefit from) having persistent configuration; this is
accessed via the `qx config` command and the data is stored in a directory
Expand Down
45 changes: 45 additions & 0 deletions docs/compiler/cli/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Testing of your application

Testing of your qooxdoo app can be done by the qooxdoo cli command `qx test`.
For this purpose you need to install one of the provide test plugins:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provide -> provided

- qooxdoo/qxl.testtapper: Runs units tests based on `qx.dev.unit.TestCase`

## Preparing your application

- install testapper with `qx package install qooxdoo/qxl.testtapper --save=0`
derrell marked this conversation as resolved.
Show resolved Hide resolved
- prepare testapper application in your `compile.json` by adding your test namespace:

```
"environment": {
"testtapper.testNameSpace": "myapp.test"
},
```

- include your test classes

```
"include": [
"myapp.test.*"
],
```

- write some tests:
```
qx.Class.define("myapp.test.MyTest",
{
extend : qx.dev.unit.TestCase,
members :
{
testOne : function() {
this.assertTrue(1 === 1);
}
});
```

- run `qx test` and check result.

## Hints

- to run a single test you can use `qx test --class myapp.test.MyTest --method testOne`


25 changes: 25 additions & 0 deletions docs/compiler/migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Migrate your application from qooxdoo 5.0 to qooxdoo 6.0 toolchain

- create new application with `qx create oldName` using the information provided in old/Manifest.json
- replace some folders in the new application with the conterparts of the old application
- old/source/class -> new/source/class
- old/source/resource -> new/source/resource
- old/source/translation -> new/source/translation
- move old/source/index.html to new/source/boot/index.html
- add this into new/source/boot/index.html just before `</head>`
```
${preBootJs}
<script type="text/javascript" src="${appPath}boot.js"></script>
```
- find out which libraries are used in the old application. For this have a look into `compile.json` libraries section. Add all libraries found here with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's libraries used in the old application, shouldn't it say to look into config.json rather than compile.json?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

```
qx pkg update
qx pkg list
qx pkg install library
```
Hopefully all needed libraries are converted.

- find used theme in old/compile.json and set this in new/compile.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old/config.json ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it still says old/compile.json instead of old/config.json (unless github isn't updating something...???)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And new/compile.js should probably be new/compile.json I think.

- run `qx compile` and fix errors
- run `qx serve` to run build in webserver and test it in your browser `http://localhost:8080/`
derrell marked this conversation as resolved.
Show resolved Hide resolved