-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
4eba534
commit 7f1174c
Showing
1 changed file
with
57 additions
and
0 deletions.
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,57 @@ | ||
describe("Feeder Custom Feed", () => { | ||
beforeEach(() => { | ||
cy.login(Cypress.env("TEST_PRX_USER"), Cypress.env("TEST_PRX_PASS")); | ||
Cypress.config({ baseUrl: `https://${Cypress.env("FEEDER_HOST")}` }); | ||
}); | ||
|
||
it("creates a new custom feed", () => { | ||
const now = new Date().toISOString(); | ||
const canary = `Acceptance Test: ${now}`; | ||
// const audioFile = "cypress/samples/two-tone.mp3"; | ||
const imageFile = "cypress/samples/1400.jpg"; | ||
|
||
cy.visit("/podcasts"); | ||
cy.contains("My Podcasts"); | ||
|
||
// create a new podcast | ||
cy.get('a.btn-success[href="/podcasts/new"]').click(); | ||
cy.contains("New Podcast"); | ||
cy.get("#podcast_title").type(canary); | ||
cy.get("#podcast_default_feed_attributes_itunes_category").select("Business", { force: true }); | ||
cy.get("#podcast_default_feed_attributes_itunes_subcategory").select("Careers", { | ||
force: true, | ||
}); | ||
cy.contains(".btn", "Create").click(); | ||
cy.contains("Podcast created"); | ||
|
||
// go to feeds and add a new custom feed | ||
cy.contains("a", "Feeds").click(); | ||
cy.contains(".btn", "Add a Feed").click(); | ||
cy.get("#feed_title").type(canary); | ||
cy.get("#feed_slug").type("customslug"); | ||
cy.contains(".btn", "Create").click(); | ||
cy.contains("Feed created"); | ||
|
||
// update and make it a private feed | ||
cy.get("#feed_private").click(); | ||
cy.contains(".btn", "Add Token").click(); | ||
cy.get("[id^=feed_feed_tokens]").first().type("newtoken"); | ||
cy.contains(".btn", "Save").click(); | ||
|
||
// delete the custom feed | ||
cy.contains(".btn", "Save").next(".dropdown-toggle").click(); | ||
cy.contains(".dropdown-item", "Delete").click(); | ||
cy.contains("Really Delete?"); | ||
cy.contains(".btn", "Delete").click(); | ||
cy.contains("Feed deleted"); | ||
|
||
// go back to podcast settings and delete | ||
cy.contains("a", "Settings").click({ force: true }); | ||
cy.get("#podcast_title"); | ||
cy.contains(".btn", "Save").next(".dropdown-toggle").click(); | ||
cy.contains(".dropdown-item", "Delete").click(); | ||
cy.contains("Really Delete?"); | ||
cy.contains(".btn", "Delete").click(); | ||
cy.contains("Podcast deleted"); | ||
}); | ||
}); |