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

Commit

Permalink
docs(website) clean up docs & add status page + banner
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch2344 authored and dgp1130 committed May 5, 2023
1 parent 9d2e18e commit 21076cb
Show file tree
Hide file tree
Showing 11 changed files with 4,948 additions and 4,442 deletions.
3,454 changes: 1,828 additions & 1,626 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@
"pretest": "gulp pretest",
"start": "cd testapp && npm start",
"test": "node scripts/test.js",
"website": "cd website && npm start",
"compile_to_es5": "gulp compile_to_es5"
"website": "cd website && npm start"
},
"license": "MIT",
"engines": {
"node": ">=10.13.x"
},
"volta": {
"node": "10.24.1"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es6",
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
Expand Down
24 changes: 22 additions & 2 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Generates the documentation for the protractor website.
## How to run

```shell
npm run compile_to_es5
npm i
npm run build
cd website/
npm install
npm run build
Expand All @@ -16,11 +17,30 @@ 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:

```shell
npm start
npm run website
```

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


### Build Failures on Apple Silicon / Arm64

Some of the nested dependencies do not have compatible binaries for newer architectures. This generally presents as a fatal failure like the following:
```
#
# Fatal error in , line 0
# Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().
#
#
#
#FailureMessage Object: 0x306a626c0
```

Eventually the project should migrate to Gulp 5 / Node 18+ to solve this issue, but in the meantime a simple workaround is:
1. `cd website`
2. `npm i && npm run arm64_repair`
3. `npx gulp liveReload` (to avoid the `prestart` script)

## How to run the tests

The website includes 3 types of tests:
Expand Down
20 changes: 20 additions & 0 deletions website/css/protractor.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ 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 0 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;
Expand Down
13 changes: 13 additions & 0 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@
</div>
</div><!-- /.container-fluid -->
</nav>
<div class="lts-alert">
<p>
<span ng-show="isEOL">Protractor is deprecated and will reach end-of-life in August 2023. </span>
<span ng-hide="isEOL">Protractor reached end-of-life in August 2023.</span>

We discourage any new users from adopting Protractor and recommend existing users migrate to other end-to-end testing solutions.

<a href="/#/project-status">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="container protractor-container" ng-view autoscroll="true"></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>
Expand Down
7 changes: 6 additions & 1 deletion website/js/modules.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
'use strict';

angular.module('protractorApp', ['ngRoute']);
angular.module('protractorApp', ['ngRoute'])
.run(['$rootScope', function($rootScope){
const now = new Date().getTime()
$rootScope.isEOL = (now >= new Date('2023-09-01T00:00:00'));
$rootScope.isEOCS = (now >= new Date('2024-09-01T00:00:00'));
}]);
4 changes: 4 additions & 0 deletions website/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ angular.module('protractorApp').config(function($routeProvider) {
controller: 'ApiCtrl',
reloadOnSearch: false
}).
when('/project-status', {
templateUrl: 'partials/status.html',
controller: 'MarkdownCtrl'
}).
when('/style-guide', {
templateUrl: 'partials/style-guide.html',
controller: 'MarkdownCtrl'
Expand Down
Loading

0 comments on commit 21076cb

Please sign in to comment.