Sha256: 415395621ae3fb74e8e3726402393e39ec9a54b52f01a13d38356da050ca1d63

Contents?: true

Size: 842 Bytes

Versions: 27

Compression:

Stored size: 842 Bytes

Contents

namespace :cy do
  desc "Open Cypress test runner"
  task :open do
    system "yarn run cypress open"
  end

  desc "Run Cypress tests headless"
  task :run do
    system "yarn run cypress run"
  end

  desc "Start server and open Cypress test runner"
  task :test do
    ENV["BRIDGETOWN_ENV"] = "test"
    server_pid = fork { Bridgetown::Commands::Start.start }
    Rake::Task["cy:open"].execute
    Process.kill "SIGTERM", server_pid
    sleep 1 # give processes time to clean up
    puts
  end

  namespace :test do
    desc "Start server and run Cypress tests headless"
    task :ci do
      ENV["BRIDGETOWN_ENV"] = "test"
      server_pid = fork { Bridgetown::Commands::Start.start }
      Rake::Task["cy:run"].execute
      Process.kill "SIGTERM", server_pid
      sleep 1 # give processes time to clean up
      puts
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
bridgetown-core-1.3.4 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.3.3 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.3.2 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.3.1 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.3.0 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.2.0 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.2.0.beta2 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.2.0.beta1 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.1.0 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.1.0.beta3 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.1.0.beta2 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.1.0.beta1 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.0.0 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-1.0.0.beta3 lib/bridgetown-core/configurations/cypress/cypress_tasks