Commit e0ec21d5 authored by David Carlos's avatar David Carlos

Use default environment to run cypress tests.

parent 475d242c
{
"baseUrl": "http://0.0.0.0:3000",
"setupDone": "0",
"video": false
}
{
"login": "johndoe",
"name": "John Doe",
"login": "cypressuser",
"name": "Cypress User",
"password": "test"
}
......@@ -2,35 +2,41 @@ describe(" As a user \
I want to change view modes \
In order to see articles in fullscreen or not in fullscreen", function () {
before(function() {
cy.fixture('user').then((user) => {
cy.login(user);
});
})
before(function() {
cy.fixture('user').then((user) => {
cy.login(user);
});
})
it("viewing the article in fullscreen by default", function () {
cy.visit(`/johndoe/blog/sample-article?fullscreen=1`)
.then(() => {
cy.get("#article-options-dropdown").contains("Exit full screen");
it("viewing the article in fullscreen by default", function () {
cy.fixture('user').then((user) => {
cy.visit(`/${user["login"]}/blog/sample-article?fullscreen=1`)
.then(() => {
cy.get("#article-options-dropdown").contains("Exit full screen");
});
});
})
})
it("viewing the article not in fullscreen by default", function () {
cy.visit(`johndoe/blog/sample-article`)
.then(() => {
cy.get("#article-options-dropdown").contains("Full screen");
it("viewing the article not in fullscreen by default", function () {
cy.fixture('user').then((user) => {
cy.visit(`${user["login"]}/blog/sample-article`)
.then(() => {
cy.get("#article-options-dropdown").contains("Full screen");
});
});
})
})
it("changing the view mode from not in fullscreen to fullscreen", function () {
cy.visit(`/johndoe/blog/sample-article`)
.then(() => {
cy.get("#article-options").click().then(() => {
cy.contains("Full screen").click();
});
cy.get("#article-options").click().then(() => {
cy.contains("Exit full screen");
});
it("changing the view mode from not in fullscreen to fullscreen", function () {
cy.fixture('user').then((user) => {
cy.visit(`/${user["login"]}/blog/sample-article`)
.then(() => {
cy.get("#article-options").click().then(() => {
cy.contains("Full screen").click();
});
cy.get("#article-options").click().then(() => {
cy.contains("Exit full screen");
});
});
});
})
})
})
......@@ -3,7 +3,7 @@ one:
id: 1
name: colivre.net
owner_type: Environment
owner_id: 2
owner_id: 1
two:
id: 2
name: anhetegua.net
......@@ -13,7 +13,7 @@ three:
id: 3
name: johndoe.net
owner_type: Profile
owner_id: 2
owner_id: 1
four:
id: 4
name: jrh.net
......
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
colivre_net:
id: 1
name: 'localhost'
name: 'Colivre.net'
contact_email: 'colivre@localhost.localdomain'
noreply_email: 'noreply@localhost.localdomain'
is_default: true
......
......@@ -26,6 +26,13 @@ ze:
:contact_information: "Pavilhão 9, Quadrante 13, Esquina com Avenida das Alamedas, 467, fundos, falar com Dona Ivete após as 16"
:created_at: '2007-12-01'
home_page_id: 1
cypressuser:
id: 7
name: 'Cypress User'
type: 'Person'
identifier: cypressuser
environment_id: 1
user_id: 5
colivre:
id: 5
name: "cooptec_livre"
......
......@@ -3,9 +3,10 @@ article_1:
id: 1
name: 'blog'
body: 'This is an blog'
slug: 'blog'
type: 'Blog'
path: 'blog'
profile_id: 1
profile_id: 7
article_2:
id: 2
......@@ -14,5 +15,5 @@ article_2:
path: 'blog/sample-article'
body: 'This is an article'
type: 'TextArticle'
profile_id: 1
profile_id: 7
parent_id: 1
......@@ -35,3 +35,12 @@ other_ze:
activated_at: <%= 5.days.ago.to_s :db %> # only if you're activating new signups
created_at: <%= 1.days.ago.to_s :db %>
environment_id: 2
cypressuser:
id: 5
login: cypressuser
email: cypressuser@localhost.localdomain
salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd
crypted_password: 00742970dc9e6319f8019fd54864d3ea740f04b1 # test
created_at: <%= 5.days.ago.to_s :db %>
activated_at: <%= 5.days.ago.to_s :db %> # only if you're activating new signups
environment_id: 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment