Commit 044b0c8d authored by Mark Harding's avatar Mark Harding
Browse files

(feat): add e2e for cypress

parent ecd429b9
Loading
Loading
Loading
Loading
+261 −205
Original line number Original line Diff line number Diff line
@@ -4,234 +4,290 @@ services:
  - docker:dind
  - docker:dind


stages:
stages:
  - test
  - install
  - test:unit
  - build
  - build
  - prepare
  - prepare
  - review
  - review
  - deploy:staging
  - deploy:staging
  - test:e2e
  - deploy:canary
  - deploy:canary
  - deploy:production
  - deploy:production


cache:
cache:
  key: $CI_BUILD_REF_SLUG
  key: $CI_BUILD_REF_SLUG
  paths:
  paths:
    - .npm
    - cache/Cypress
    - node_modules
    - node_modules
  policy: pull
  policy: pull


test:
variables:
  image: circleci/node:8-browsers
  # CYPRESS_INSTALL_BINARY: 0 # Speeds up the install process
  stage: test
  npm_config_cache: "$CI_PROJECT_DIR/.npm"
  CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"

install:dependencies:
  stage: install
  script:
  script:
    - npm install # Should be cached...
    - npm ci # Should be cached...
    - npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
  cache:
  cache:
    key: $CI_BUILD_REF_SLUG
    key: $CI_BUILD_REF_SLUG
    paths:
    paths:
      - .npm
      - cache/Cypress
      - node_modules
      - node_modules
    policy: pull-push
    policy: pull-push


build:review:
# test:
  stage: build
#   image: circleci/node:8-browsers
  script:
#   stage: test:unit
    - npm install # TODO: Why is this needed?
#   script:
    - npm run postinstall
#     - npm install # Should be cached...
    - npm install -g gulp-cli
#     - npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
    - npm rebuild node-sass
#   cache:
    - gulp build.sass && gulp build.sass ##weird build needs to be run twice for now
#     key: $CI_BUILD_REF_SLUG
    - sh build/base-locale.sh dist
#     paths:
  artifacts:
#       - node_modules
    name: "$CI_COMMIT_REF_SLUG"
#     policy: pull-push
    paths:

      - dist
e2e:base:
  except:
  image: cypress/base:10
    refs:
  stage: test:e2e
      - master
  variables:
      - test/gitlab-ci
    CYPRESS_INSTALL_BINARY: 1

build:production:en:
  stage: build
  script:
  script:
    - npm install # TODO: Why is this needed?
    - >
    - npm run postinstall
      if [ "$CI_BUILD_REF_NAME" == "feat/cypress" ]; then
    - npm install -g gulp-cli
        export E2E_DOMAIN=https://www.minds.com
    - npm rebuild node-sass
      else
    - gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
        export E2E_DOMAIN=https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
    - sh build/base-locale.sh dist https://cdn-assets.minds.com/front/dist
      fi
    - export CYPRESS_baseUrl=$E2E_DOMAIN
    - echo "E2E tests for $CI_BUILD_REF_NAME running against $E2E_DOMAIN with user $CYPRESS_username"
    - $(npm bin)/cypress run --record --key $CYPRESS_RECORD_ID --config CYPRESS_baseUrl=$E2E_DOMAIN
  artifacts:
  artifacts:
    name: "$CI_COMMIT_REF_SLUG"
    when: always
    paths:
    paths:
      - dist/en
      - cypress/screenshots/**/*.mp4
  only:
      - cypress/videos/**/*.mp4
    refs:
  allow_failure: true #manual inspection in case of timeouts
      - master

      - test/gitlab-ci
e2e:chrome:

  image: cypress/browsers:chrome67
build:production:i18n:
  stage: test:e2e
  stage: build
  variables:
    CYPRESS_INSTALL_BINARY: 1
  script:
  script:
    - npm install # TODO: Why is this needed?
    - >
    - npm run postinstall
      if [ "$CI_BUILD_REF_NAME" == "feat/cypress" ]; then
    - npm install -g gulp-cli
        export E2E_DOMAIN=https://www.minds.com
    - npm rebuild node-sass
      else
    - gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
        export E2E_DOMAIN=https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
    - sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
      fi
    - export CYPRESS_baseUrl=$E2E_DOMAIN
    - echo "E2E tests for $CI_BUILD_REF_NAME running against $E2E_DOMAIN with user $CYPRESS_username"
    - $(npm bin)/cypress run --browser chrome --record --key $CYPRESS_RECORD_ID --config CYPRESS_baseUrl=$E2E_DOMAIN
  artifacts:
  artifacts:
    name: "$CI_COMMIT_REF_SLUG"
    when: always
    paths:
    paths:
      - dist/vi
      - cypress/screenshots/**/*.mp4
  only:
      - cypress/videos/**/*.mp4
    refs:
  allow_failure: true #manual inspection in case of timeouts
      - master

      - test/gitlab-ci
# build:review:

#   stage: build
prepare:review:
#   script:
  stage: prepare
#     - npm rebuild node-sass
  image: minds/ci:latest
#     - gulp build.sass && gulp build.sass ##weird build needs to be run twice for now
  script:
#     - sh build/base-locale.sh dist
    - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
#   artifacts:
    - docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF -f containers/front-init/Dockerfile dist/.
#     name: "$CI_COMMIT_REF_SLUG"
    - docker push $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
#     paths:
  dependencies:
#       - dist
    - build:review
#   except:
  except:
#     refs:
    refs:
#       - master
      - master
#       - test/gitlab-ci
      - test/gitlab-ci


# build:production:en:
prepare:production:
#   stage: build
  stage: prepare
#   script:
  image: minds/ci:latest
#     - npm rebuild node-sass
  script:
#     - gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
    - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
#     - sh build/base-locale.sh dist https://cdn-assets.minds.com/front/dist
    - docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF -f containers/front-init/Dockerfile dist/.
#   artifacts:
    - docker push $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
#     name: "$CI_COMMIT_REF_SLUG"
  only:
#     paths:
    refs:
#       - dist/en
      - master
#   only:
      - test/gitlab-ci
#     refs:
  dependencies:
#       - master
    - build:production:en
#       - test/gitlab-ci
    - build:production:i18n


# build:production:i18n:
review:start:
#   stage: build
  stage: review
#   script:
  image: minds/helm-eks:latest
#     - npm rebuild node-sass
  script:
#     - gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
    - aws eks update-kubeconfig --name=sandbox
#     - sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
    - git clone --branch=sandbox-wip https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/minds/helm-charts.git
#   artifacts:
    - "helm upgrade \
#     name: "$CI_COMMIT_REF_SLUG"
        --install \
#     paths:
        --reuse-values \
#       - dist/vi
        --set frontInit.image.repository=$CI_REGISTRY_IMAGE/front-init \
#   only:
        --set frontInit.image.tag=$CI_BUILD_REF \
#     refs:
        --set domain=$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN \
#       - master
        --set elasticsearch.clusterName=$CI_BUILD_REF_SLUG--elasticsearch \
#       - test/gitlab-ci
        --wait \

        $CI_BUILD_REF_SLUG \
# prepare:review:
        ./helm-charts/minds"
#   stage: prepare
  environment:
#   image: minds/ci:latest
    name: review/$CI_COMMIT_REF_NAME
#   script:
    url: https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
#     - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
    on_stop: review:stop
#     - docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF -f containers/front-init/Dockerfile dist/.
  except: 
#     - docker push $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
    refs:
#   dependencies:
      - master
#     - build:review
      - test/gitlab-ci
#   except:

#     refs:
review:stop:
#       - master
  stage: review
#       - test/gitlab-ci
  image: minds/helm-eks:latest

  script:
# prepare:production:
    - aws eks update-kubeconfig --name=sandbox
#   stage: prepare
    - helm del --purge $CI_BUILD_REF_SLUG
#   image: minds/ci:latest
  environment:
#   script:
    name: review/$CI_COMMIT_REF_NAME
#     - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
    url: https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
#     - docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF -f containers/front-init/Dockerfile dist/.
    action: stop
#     - docker push $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
  variables:
#   only:
    GIT_STRATEGY: none
#     refs:
  when: manual
#       - master
  except: 
#       - test/gitlab-ci
    refs:
#   dependencies:
      - master
#     - build:production:en
      - test/gitlab-ci
#     - build:production:i18n


staging:fpm:
# review:start:
  stage: deploy:staging
#   stage: review
  image: minds/ci:latest
#   image: minds/helm-eks:latest
  script:
#   script:
    - IMAGE_LABEL="staging"
#     - aws eks update-kubeconfig --name=sandbox
    ## Sync assets with CDN
#     - git clone --branch=sandbox-wip https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/minds/helm-charts.git
    - aws s3 sync dist $S3_REPOSITORY_URL
#     - "helm upgrade \
    - $(aws ecr get-login --no-include-email --region us-east-1)
#         --install \
    ## Update docker front-init container
#         --reuse-values \
    - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
#         --set frontInit.image.repository=$CI_REGISTRY_IMAGE/front-init \
    - docker pull $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
#         --set frontInit.image.tag=$CI_BUILD_REF \
    - docker tag $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF $ECR_REPOSITORY_URL:$IMAGE_LABEL
#         --set domain=$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN \
    - docker push $ECR_REPOSITORY_URL:$IMAGE_LABEL
#         --set elasticsearch.clusterName=$CI_BUILD_REF_SLUG--elasticsearch \
    ## Deploy the new container in rolling restart
#         --wait \
    - aws ecs update-service --service=$ECS_APP_STAGING_SERVICE --force-new-deployment --region us-east-1 --cluster=$ECS_CLUSTER
#         $CI_BUILD_REF_SLUG \
  only:
#         ./helm-charts/minds"
    refs:
#   environment:
      - master
#     name: review/$CI_COMMIT_REF_NAME
      - test/gitlab-ci
#     url: https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
  dependencies:
#     on_stop: review:stop
    - build:production:en
#   except: 
    - build:production:i18n
#     refs:
  environment:
#       - master
    name: staging
#       - test/gitlab-ci
    url: https://www.minds.com/?canary=1 # requires canary cookie


# review:stop:
deploy:canary:
#   stage: review
  stage: deploy:canary
#   image: minds/helm-eks:latest
  image: minds/ci:latest
#   script:
  script:
#     - aws eks update-kubeconfig --name=sandbox
    - IMAGE_LABEL="canary"
#     - helm del --purge $CI_BUILD_REF_SLUG
    ## Sync assets with CDN
#   environment:
    - aws s3 sync dist $S3_REPOSITORY_URL
#     name: review/$CI_COMMIT_REF_NAME
    - $(aws ecr get-login --no-include-email --region us-east-1)
#     url: https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
    ## Update docker front-init container
#     action: stop
    - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
#   variables:
    - docker pull $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
#     GIT_STRATEGY: none
    - docker tag $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF $ECR_REPOSITORY_URL:$IMAGE_LABEL
#   when: manual
    - docker push $ECR_REPOSITORY_URL:$IMAGE_LABEL
#   except: 
    ## Deploy the new container in rolling restart
#     refs:
    - aws ecs update-service --service=$ECS_APP_CANARY_SERVICE --force-new-deployment --region us-east-1 --cluster=$ECS_CLUSTER
#       - master
  only:
#       - test/gitlab-ci
    refs:

      - master
# staging:fpm:
      - test/gitlab-ci
#   stage: deploy:staging
  dependencies:
#   image: minds/ci:latest
    - build:production:en
#   script:
    - build:production:i18n
#     - IMAGE_LABEL="staging"
  environment:
#     ## Sync assets with CDN
    name: canary
#     - aws s3 sync dist $S3_REPOSITORY_URL
    url: https://www.minds.com/?canary=1 # requires canary cookie
#     - $(aws ecr get-login --no-include-email --region us-east-1)
  when: manual
#     ## Update docker front-init container
  allow_failure: false # prevents auto deploy to full production
#     - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 

#     - docker pull $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
deploy:production:
#     - docker tag $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF $ECR_REPOSITORY_URL:$IMAGE_LABEL
  stage: deploy:production
#     - docker push $ECR_REPOSITORY_URL:$IMAGE_LABEL
  image: minds/ci:latest
#     ## Deploy the new container in rolling restart
  script:
#     - aws ecs update-service --service=$ECS_APP_STAGING_SERVICE --force-new-deployment --region us-east-1 --cluster=$ECS_CLUSTER
    - IMAGE_LABEL="production"
#   only:
    - $(aws ecr get-login --no-include-email --region us-east-1)
#     refs:
    ## Update docker front-init container
#       - master
    - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
#       - test/gitlab-ci
    - docker pull $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
#   dependencies:
    - docker tag $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF $ECR_REPOSITORY_URL:$IMAGE_LABEL
#     - build:production:en
    - docker push $ECR_REPOSITORY_URL:$IMAGE_LABEL
#     - build:production:i18n
    ## Deploy the new container in rolling restart
#   environment:
    - aws ecs update-service --service=$ECS_APP_PRODUCTION_SERVICE --force-new-deployment --region us-east-1 --cluster=$ECS_CLUSTER
#     name: staging
  only:
#     url: https://www.minds.com # requires staging cookie
    refs:

      - master
# deploy:canary:
      - test/gitlab-ci
#   stage: deploy:canary
  dependencies:
#   image: minds/ci:latest
    - build:production:en
#   script:
    - build:production:i18n
#     - IMAGE_LABEL="canary"
  environment:
#     ## Sync assets with CDN
    name: production
#     - aws s3 sync dist $S3_REPOSITORY_URL
    url: https://www.minds.com
#     - $(aws ecr get-login --no-include-email --region us-east-1)
  when: delayed
#     ## Update docker front-init container
  start_in: 2 hours # reduce? can always be deployed manually earlier too
#     - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
#     - docker pull $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
#     - docker tag $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF $ECR_REPOSITORY_URL:$IMAGE_LABEL
#     - docker push $ECR_REPOSITORY_URL:$IMAGE_LABEL
#     ## Deploy the new container in rolling restart
#     - aws ecs update-service --service=$ECS_APP_CANARY_SERVICE --force-new-deployment --region us-east-1 --cluster=$ECS_CLUSTER
#   only:
#     refs:
#       - master
#       - test/gitlab-ci
#   dependencies:
#     - build:production:en
#     - build:production:i18n
#   environment:
#     name: canary
#     url: https://www.minds.com/?canary=1 # requires canary cookie
#   when: manual
#   allow_failure: false # prevents auto deploy to full production

# deploy:production:
#   stage: deploy:production
#   image: minds/ci:latest
#   script:
#     - IMAGE_LABEL="production"
#     - $(aws ecr get-login --no-include-email --region us-east-1)
#     ## Update docker front-init container
#     - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} 
#     - docker pull $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
#     - docker tag $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF $ECR_REPOSITORY_URL:$IMAGE_LABEL
#     - docker push $ECR_REPOSITORY_URL:$IMAGE_LABEL
#     ## Deploy the new container in rolling restart
#     - aws ecs update-service --service=$ECS_APP_PRODUCTION_SERVICE --force-new-deployment --region us-east-1 --cluster=$ECS_CLUSTER
#   only:
#     refs:
#       - master
#       - test/gitlab-ci
#   dependencies:
#     - build:production:en
#     - build:production:i18n
#   environment:
#     name: production
#     url: https://www.minds.com
#   when: delayed
#   start_in: 2 hours # reduce? can always be deployed manually earlier too
+3 −1
Original line number Original line Diff line number Diff line
{}
{
  "projectId": "qrjqcv"
}
+8 −7
Original line number Original line Diff line number Diff line
@@ -2,8 +2,8 @@ context('Blogs', () => {
  beforeEach(() => {
  beforeEach(() => {
    cy.login(true);
    cy.login(true);


    cy.location('pathname').should('eq', `/newsfeed/subscriptions`);
    cy.location('pathname', { timeout: 30000 })

      .should('eq', `/newsfeed/subscriptions`);
  })
  })


  it('should not be able to create a new blog if no title or banner are specified', () => {
  it('should not be able to create a new blog if no title or banner are specified', () => {
@@ -46,7 +46,7 @@ context('Blogs', () => {
    // click on hashtags dropdown
    // click on hashtags dropdown
    cy.get('.m-category-info m-hashtags-selector .m-dropdown--label-container').click();
    cy.get('.m-category-info m-hashtags-selector .m-dropdown--label-container').click();
    // select #ART
    // select #ART
    cy.get('.m-category-info m-dropdown m-form-tags-input > div:nth-child(1) > span').contains('#art').click();
    cy.get('.m-category-info m-dropdown m-form-tags-input > div > span').contains('#art').click();
    // type in another hashtag manually
    // type in another hashtag manually
    cy.get('.m-category-info m-hashtags-selector m-form-tags-input input').type('hashtag{enter}').click();
    cy.get('.m-category-info m-hashtags-selector m-form-tags-input input').type('hashtag{enter}').click();


@@ -73,11 +73,12 @@ context('Blogs', () => {


    cy.wait(1000);
    cy.wait(1000);


    cy.get('.m-button--submit').click();
    cy.get('.m-button--submit').click({ force: true }); // TODO: Investigate why disabled flag is being detected


    cy.wait(100);
    // Blogs will not save, nor return error, if a user doesn't have an avatar


    cy.location('pathname').should('contains', `/${Cypress.env().username}/blog`);
    cy.location('pathname', { timeout: 30000})
      .should('contains', `/${Cypress.env().username}/blog`);


    cy.get('.m-blog--title').contains('Title');
    cy.get('.m-blog--title').contains('Title');
    cy.get('.minds-blog-body p').contains('Content');
    cy.get('.minds-blog-body p').contains('Content');
@@ -88,7 +89,7 @@ context('Blogs', () => {


    //open dropdown
    //open dropdown
    cy.get('m-post-menu button.minds-more').click();
    cy.get('m-post-menu button.minds-more').click();
    cy.get('m-post-menu ul.minds-dropdown-menu li:nth-child(3)').contains('Delete').click();
    cy.get('m-post-menu ul.minds-dropdown-menu li').contains('Delete').click();
    cy.get('m-post-menu m-modal-confirm .mdl-button--colored').click();
    cy.get('m-post-menu m-modal-confirm .mdl-button--colored').click();


  })
  })
+7 −4
Original line number Original line Diff line number Diff line
context('Discovery', () => {
context('Discovery', () => {
  beforeEach(() => {
  beforeEach(() => {
    cy.login(true);
    cy.login(true);
    cy.location('pathname').should('eq', `/newsfeed/subscriptions`);

    cy.location('pathname', { timeout: 30000 })
      .should('eq', `/newsfeed/subscriptions`);
  });
  });
  
  
  it('should allow a user to post on the discovery page', () => {
  it('should allow a user to post on the discovery page', () => {
@@ -57,7 +59,6 @@ context('Discovery', () => {
      .click()
      .click()
      .should('have.css', 'color', 'rgb(70, 144, 223)'); // selected color
      .should('have.css', 'color', 'rgb(70, 144, 223)'); // selected color


    cy.get('.m-newsfeed__entity .m-owner-block a > span:nth-child(1)');
    cy.url().should('include', '/latest');
    cy.url().should('include', '/latest');
  }); 
  }); 


@@ -116,10 +117,12 @@ context('Discovery', () => {
  });  
  });  


  it('should allow the user to filter by a single hashtag', () => {
  it('should allow the user to filter by a single hashtag', () => {
    cy.get('.m-hashtagsSidebarSelector__list > ul > li:nth-child(1) .m-hashtagsSidebarSelectorList__visibility > i').click();
    cy.get('.m-hashtagsSidebarSelector__list > ul > li:nth-child(1) .m-hashtagsSidebarSelectorList__visibility > i')
      .click(); // Will fail on non-configured users
  });
  });


  it('should allow the user to turn off single hashtag filter and view all posts', () => {
  it('should allow the user to turn off single hashtag filter and view all posts', () => {
    cy.get('.m-hashtagsSidebarSelector__list > ul > li:nth-child(1) .m-hashtagsSidebarSelectorList__visibility > i').click();
    cy.get('.m-hashtagsSidebarSelector__list > ul > li:nth-child(1) .m-hashtagsSidebarSelectorList__visibility > i')
      .click();
  })
  })
})
})
 No newline at end of file
+8 −5
Original line number Original line Diff line number Diff line
context('Groups', () => {
context('Groups', () => {
  beforeEach(() => {
  beforeEach(() => {
    cy.login(true);
    cy.login(true);

    cy.location('pathname', { timeout: 30000 })
      .should('eq', `/newsfeed/subscriptions`);
  })
  })


  it('should create and edit a group', () => {
  it('should create and edit a group', () => {
@@ -20,7 +23,7 @@ context('Groups', () => {
    // click on hashtags dropdown
    // click on hashtags dropdown
    cy.get('m-hashtags-selector .m-dropdown--label-container').click();
    cy.get('m-hashtags-selector .m-dropdown--label-container').click();
    // select #ART
    // select #ART
    cy.get('m-hashtags-selector  m-dropdown m-form-tags-input > div:nth-child(1) > span').contains('#art').click();
    cy.get('m-hashtags-selector  m-dropdown m-form-tags-input > div > span').contains('#art').click();
    // type in another hashtag manually
    // type in another hashtag manually
    cy.get('m-hashtags-selector m-form-tags-input input').type('hashtag{enter}').click();
    cy.get('m-hashtags-selector m-form-tags-input input').type('hashtag{enter}').click();
    // click away
    // click away
@@ -54,9 +57,9 @@ context('Groups', () => {
  })
  })


  it('should be able to toggle conversation and comment on it', () => {
  it('should be able to toggle conversation and comment on it', () => {
    cy.get('m-group--sidebar-markers li:nth-child(2)').contains('test group').click();


    cy.wait(1000);
    cy.get('m-group--sidebar-markers li:nth-child(3)').contains('test group').click();



    // toggle the conversation
    // toggle the conversation
    cy.get('.m-groupGrid__right').should('be.visible');
    cy.get('.m-groupGrid__right').should('be.visible');
@@ -88,7 +91,7 @@ context('Groups', () => {
  })
  })


  it('should post an activity inside the group and record the view when scrolling', () => {
  it('should post an activity inside the group and record the view when scrolling', () => {
    cy.get('m-group--sidebar-markers li:nth-child(2)').contains('test group').click();
    cy.get('m-group--sidebar-markers li:nth-child(3)').contains('test group').click();


    cy.wait(1000);
    cy.wait(1000);


@@ -122,7 +125,7 @@ context('Groups', () => {
  });
  });


  it('should delete a group', () => {
  it('should delete a group', () => {
    cy.get('m-group--sidebar-markers li:nth-child(2)').contains('test group').click();
    cy.get('m-group--sidebar-markers li:nth-child(3)').contains('test group').click();


    cy.wait(1000);
    cy.wait(1000);


Loading