This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 0a0ee1b11 test: [apache/streampipes#955] Add cypress test for api docs
new 494dcae0c Merge pull request #1079 from smlabt/SP-955
0a0ee1b11 is described below
commit 0a0ee1b1159c3d5058d2697d071c9cda8617e37a
Author: Samuel Abt <[email protected]>
AuthorDate: Wed Jan 11 19:18:48 2023 +0100
test: [apache/streampipes#955] Add cypress test for api docs
---
.../apiDocumentation.smoke.spec.ts | 29 +++++++++++
.../components/auth-box/auth-box.component.html | 58 ++++++++++++++++++----
2 files changed, 76 insertions(+), 11 deletions(-)
diff --git a/ui/cypress/tests/apiDocumentation/apiDocumentation.smoke.spec.ts
b/ui/cypress/tests/apiDocumentation/apiDocumentation.smoke.spec.ts
new file mode 100644
index 000000000..7ab8372ef
--- /dev/null
+++ b/ui/cypress/tests/apiDocumentation/apiDocumentation.smoke.spec.ts
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+describe('Open API Documentation from Login Page', () => {
+ it('Perform Test', () => {
+ cy.visit('#/login');
+ cy.dataCy('view-api-docs-link').click();
+ cy.get('h2').contains('Apache StreamPipes API');
+ cy.get('.servers')
+ .find('select')
+ .find(':selected')
+ .contains('/streampipes-backend');
+ });
+});
diff --git a/ui/src/app/login/components/auth-box/auth-box.component.html
b/ui/src/app/login/components/auth-box/auth-box.component.html
index 3bd00ee60..220880a35 100644
--- a/ui/src/app/login/components/auth-box/auth-box.component.html
+++ b/ui/src/app/login/components/auth-box/auth-box.component.html
@@ -16,27 +16,63 @@
~
-->
-<div class="md-padding full-background sp-fade light-mode" fxLayout="row"
fxLayoutAlign="center center"
- style="min-height:100vh !important;">
+<div
+ class="md-padding full-background sp-fade light-mode"
+ fxLayout="row"
+ fxLayoutAlign="center center"
+ style="min-height: 100vh !important"
+>
<div fxFlex="40" fxLayout="column" fxLayoutAlign="center center">
- <mat-card class="card-100-center box-shadow-login"
style="padding:20px;position:relative;top:-25px;">
+ <mat-card
+ class="card-100-center box-shadow-login"
+ style="padding: 20px; position: relative; top: -25px"
+ >
<div fxFlex="100" fxLayout="column">
- <div fxLayout="row" fxFlex="60" fxLayoutAlign="center center"
- style="margin-left:auto;margin-right:auto;">
- <div fxFlex="60" fxLayoutAlign="center center"
fxLayout="row"
- style="color:white;width:100%;"><img
- alt="icon"
src="../../../../assets/img/sp/logo.png" style="width:100%;">
+ <div
+ fxLayout="row"
+ fxFlex="60"
+ fxLayoutAlign="center center"
+ style="margin-left: auto; margin-right: auto"
+ >
+ <div
+ fxFlex="60"
+ fxLayoutAlign="center center"
+ fxLayout="row"
+ style="color: white; width: 100%"
+ >
+ <img
+ alt="icon"
+ src="../../../../assets/img/sp/logo.png"
+ style="width: 100%"
+ />
</div>
</div>
<ng-content></ng-content>
</div>
</mat-card>
<div fxFlex="100" fxLayout="column" fxLayoutAlign="center center">
- <button mat-button mat-raised-button color="accent"
(click)="openDocumentation()"
-
style="min-width:0px;padding-left:20px;padding-right:20px;font-size:18px;">
+ <button
+ mat-button
+ mat-raised-button
+ color="accent"
+ (click)="openDocumentation()"
+ style="
+ min-width: 0px;
+ padding-left: 20px;
+ padding-right: 20px;
+ font-size: 18px;
+ "
+ >
View Docs
</button>
- <span style="margin-top:10px;"><a routerLink="/apidocs"
routerLinkActive="active">View API docs</a></span>
+ <span style="margin-top: 10px"
+ ><a
+ data-cy="view-api-docs-link"
+ routerLink="/apidocs"
+ routerLinkActive="active"
+ >View API docs</a
+ ></span
+ >
</div>
</div>
</div>