Github user iraghumitra commented on a diff in the pull request:

    https://github.com/apache/metron/pull/699#discussion_r134088663
  
    --- Diff: metron-interface/metron-alerts/e2e/login/login.e2e-spec.ts ---
    @@ -0,0 +1,44 @@
    +/**
    + * 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.
    + */
    +import { LoginPage } from './login.po';
    +
    +describe('login to application', function() {
    +    let page: LoginPage;
    +
    +    beforeEach(() => {
    +        page = new LoginPage();
    +    });
    +
    +    it('should display error message for invalid credentials', () => {
    --- End diff --
    
    @nickwallen Suggestion to mock data is valid. There is no golden rule here 
it is all about how we would like to use e2e tests. Ideally, in my experience, 
we use a mix of both mocked data and actual data. We need to have two suites 
that would test both of them.
    
     - Mocked data is used to test a wide range of cases. 
     - Actual data is used to ensure that the UI is intact all the time. 
    
    Testing using actual data would give you the confidence in making a release 
and test UI if there any major changes in the middleware without a lot of human 
effort in a short time frame. I would suggest we should test with actual data 
wherever possible for now as this would ensure that we are actually testing the 
UI the way a user would see. We will be able to catch a regression easily.
    
    Please feel free to differ I am open for any suggestions here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to