<commit_before>require 'spec_helper'

describe "gws_schedule_todos", type: :feature, dbscope: :example, js: true do
  let(:item) { create :gws_schedule_todo }

  before { login_gws_user }

  it "#finish" do
    visit finish_gws_schedule_todo_path gws_site, item
    wait_for_ajax
    expect(page).to have_content(item.name)
  end

  it "#revert" do
    visit revert_gws_schedule_todo_path gws_site, item
    wait_for_ajax
    expect(page).to have_content(item.name)
  end

  it "#disable" do
    visit disable_gws_schedule_todo_path gws_site, item
    wait_for_ajax
    expect(page).to have_no_content(item.name)
  end

  it "#finish_all" do
    item
    visit gws_schedule_todos_path gws_site
    find('.list-head label.check input').set(true)
    page.accept_confirm do
      find('.finish-all').click
    end
    wait_for_ajax
    expect(page).to have_no_content(item.name)
  end<commit_msg>[add] group plans member links check test<commit_after>require 'spec_helper'

describe "gws_schedule_todos", type: :feature, dbscope: :example, js: true do
  let(:item) { create :gws_schedule_todo }
  let(:group_index_path)  { gws_schedule_group_plans_path gws_site, gws_user.groups.first }

  before { login_gws_user }

  it "group_plans_member_link_check" do
    item
    visit group_index_path
    wait_for_ajax
    within("div#cal-#{gws_user.id}.calendar.multiple.fc.fc-ltr.fc-unthemed") do
      expect(page).to have_content(item.name)
    end
    within("div#cal-#{sys_user.id}.calendar.multiple.fc.fc-ltr.fc-unthemed") do
      expect(page).to have_no_content(item.name)
    end
    expect(current_path).not_to eq sns_login_path
  end

  it "#finish" do
    visit finish_gws_schedule_todo_path gws_site, item
    wait_for_ajax
    expect(page).to have_content(item.name)
  end

  it "#revert" do
    visit revert_gws_schedule_todo_path gws_site, item
    wait_for_ajax
    expect(page).to have_content(item.name)
  end

  it "#disable" do
    visit disable_gws_schedule_todo_path gws_site, item
    wait_for_ajax
    expect(page).to have_no_content(item.name)
  end

  it "#finish_all" do
    item
    visit gws_schedule_todos_path gws_site
    find('.list-head label.check input').set(true)
    page.accept_confirm do
      find('.finish-all').click
    end
    wait_for_ajax
    expect(page).to have_no_content(item.name)
  end
{'fraction_non_alphanumeric': 0.09484978540772532, 'fraction_numerical': 0.0, 'mean_word_length': 3.9073684210526314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2636811', 'n_tokens_mistral': 863, 'n_tokens_neox': 848, 'n_words': 164}