Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Project Status Page #5557

Closed
wants to merge 9 commits into from
1,324 changes: 405 additions & 919 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"blocking-proxy": "^1.0.0",
"browserstack": "^1.5.1",
"chalk": "^1.1.3",
"fsevents": "^2.3.2",
"glob": "^7.0.3",
"jasmine": "^3.3.1",
"saucelabs": "^1.5.0",
Expand All @@ -38,7 +39,7 @@
"clang-format": "1.0.49",
"expect.js": "~0.3.1",
"express": "^4.16.4",
"gulp": "^4.0.0",
"gulp": "^4.0.2",
"gulp-clang-format": "1.0.23",
"gulp-tslint": "^8.1.3",
"lodash": "^4.17.11",
Expand Down Expand Up @@ -69,6 +70,7 @@
"start": "cd testapp && npm start",
"test": "node scripts/test.js",
"tsc": "tsc",
"clean": "rm -rf node_modules website/node_modules",
"website": "cd website && npm start",
"compile_to_es5": "gulp compile_to_es5"
},
Expand All @@ -77,7 +79,10 @@
"node": ">=8.8.x"
},
"version": "6.0.0",
"publishConfig":{
"publishConfig": {
"registry": "https://wombat-dressing-room.appspot.com"
},
"volta": {
"node": "8.17.0"
}
}
36 changes: 27 additions & 9 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,40 @@ Generates the documentation for the protractor website.

## How to run

From the root of the project, on a fresh clone:
```shell
npm run compile_to_es5
cd website/
npm install
npm run build
npm i
npx gulp
npm run website
```

Then copy all the files from the `build` directory to the gh-pages branch.
If you want to run the website locally then run the following command:
and point your browser to: [localhost:8080](http://localhost:8080/)

### Mac OS X Users
If you're using a Apple Silicon Mac (M1 / M2 / etc) the project will likely struggle to build
due to mismatched dependencies and version (Node + Dgeni + Gulp, etc).

We're working on cleaning up the process, but in the meantime the following script should build dependencies as needed
so that you can continue working. We recommend using [volta](https://volta.sh/) for managing your Node version, but
the same principal should be applicable with `n` or `nvm` as well.
```shell
npm start
# First: fix website folder with dgeni
pushd website
volta pin node@10
npm i -s fsevents@latest
volta pin node@8
npx gulp dgeni
popd

# Second: run the main gulp compilation
npm i
npx gulp
```

And point your browser to: [localhost:8080](http://localhost:8080/)

Once completed, you should be able to run the docs via
```shell
npm run website
```
## How to run the tests

The website includes 3 types of tests:
Expand Down
20 changes: 19 additions & 1 deletion website/css/protractor.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,27 @@ a code {
color: inherit;
}

.lts-alert {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background: rgb(242, 253, 157);
box-shadow: 0 0 2px #999;
width: 100%;
margin: 50px auto;
padding: 10px 0 0 0;
}
.lts-alert p{
max-width: 960px;
text-align: center;
}

.lh-1-5 { line-height: 1.5 }
.mb-50 { margin-bottom: 50px }

.protractor-container {
margin-bottom: 50px;
padding-top: @padding-top;

.protractor-header {
text-align: center;
Expand Down
7 changes: 4 additions & 3 deletions website/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ gulp.task('dgeni', function(done) {
var isBrowser = function(item) {
return item.alias == 'browser';
};
if (!toc.items.some(isBrowser)) {
return Promise.reject('Generated toc.json missing docs for Protractor function.');
}
// TODO: dtw - find out what this browser check is really for. May be obsolete
Copy link
Member

Choose a reason for hiding this comment

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

We'd not want to disable build time checks

// if (!toc.items.some(isBrowser)) {
// return Promise.reject('Generated toc.json missing docs for Protractor function.');
// }

// Copy files over
gulp.src(['docgen/build/*.json'])
Expand Down
16 changes: 15 additions & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<!-- Home -->
<li><a href="#/">Home</a></li>

<li><a href="#/project-status">Project Status</a></li>

<!-- Quick start -->
<li class="dropdown">
<a id="drop1" href="javascript:void(0)" class="dropdown-toggle"
Expand Down Expand Up @@ -88,7 +90,19 @@
</div>
</div><!-- /.container-fluid -->
</nav>
<div class="container protractor-container" ng-view autoscroll="true"></div>
<div class="lts-alert">
<p>
Protractor is deprecated and will reach end-of-life in August 2023.
We discourage any new users from adopting Protractor and recommend existing users migrate to other end-to-end testing solutions.

<a href="https://www.protractortest.org/project-status" target="_blank">See what ending support means</a>
and
<a href="https://blog.angular.io/the-state-of-end-to-end-testing-with-angular-d175f751cb9c" target="_blank">read the end of life announcement</a> for more information.
</p>
</div>
<div class="main-container container protractor-container">
<div ng-view autoscroll="true"></div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.7/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.7/angular-route.min.js"></script>
Expand Down
5 changes: 5 additions & 0 deletions website/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ angular.module('protractorApp').config(function($routeProvider) {
controller: 'ApiCtrl',
reloadOnSearch: false
}).
when('/project-status', {
templateUrl: 'partials/status.html',
controller: 'MarkdownCtrl',
reloadOnSearch: false
}).
when('/style-guide', {
templateUrl: 'partials/style-guide.html',
controller: 'MarkdownCtrl'
Expand Down
Loading