-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
}) |