Skip to content

Commit

Permalink
Merge c589bda into d80ee89
Browse files Browse the repository at this point in the history
  • Loading branch information
aonomike committed Jun 22, 2019
2 parents d80ee89 + c589bda commit 915f99f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
19 changes: 19 additions & 0 deletions cypress/integration/Artists.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Feature: Artists

As User
If I click the Artists link
I should be able to see the artist page

Background: Home page
Given I am on the home page

@focus
Scenario: Visit from artist link on the nav bar

When I click on 'artist' link
Then I should be on the 'artist' page

@focus
Scenario: Visit artists page from from link in the footer
When I click on 'artist' link on the footer
Then I should be on the 'artist' page
30 changes: 29 additions & 1 deletion cypress/integration/common/web_steps.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
import { Given } from 'cypress-cucumber-preprocessor/steps'
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'

const url = 'https://google.com'
Given('I open Google page', () => {
cy.visit(url)
})

Given('I am on the home page', () => {
cy.visit('/')
})

When("I click on 'artist' link", () => {
cy.get('.nav-container__left')
.find('a')
.contains('Artists')
.click()
})

When("I click on 'artist' link on the footer", () => {
cy.get('.footer__container')
.find('nav')
.find('a')
.contains('Artists')
.click()
})

Then("I should be on the 'artist' page", () => {
cy.url()
.should('contain', '/artists')
cy.get('.trending-artists-title')
.should('contain', 'Trending Artists')
cy.get('.explore-artists-title')
.should('contain', 'Explore Artists')
})

0 comments on commit 915f99f

Please sign in to comment.