allow importing custom fields for product option values
[bse.git] / t / t00smoke.t
CommitLineData
b051120f
TC
1#!perl -w
2use strict;
ce518886 3use Test::More tests => 63;
4619492a 4use BSE::Test qw(make_ua fetch_ok base_url base_securl config);
b051120f 5
41fd1a57 6++$|;
b051120f
TC
7my $baseurl = base_url;
8ok($baseurl =~ /^http:/, "basic check of base url");
4619492a 9my $securl = base_securl;
b051120f 10my $ua = make_ua;
3bc94f98 11fetch_ok($ua, "admin menu - check the site exists at all", "$baseurl/admin/", "Admin");
b051120f 12fetch_ok($ua, "generate all", "$baseurl/cgi-bin/admin/generate.pl",
70789617 13 "html", "Title: BSE - Administration Centre");
b051120f
TC
14fetch_ok($ua, "generate all verbose",
15 "$baseurl/cgi-bin/admin/generate.pl?progress=1",
44376afa 16 "Regenerating.*Return to admin menu");
b051120f 17fetch_ok($ua, "index", "$baseurl/", "Home");
e00c2e97 18fetch_ok($ua, "shop", "$baseurl/shop/", "The Shop");
b051120f
TC
19fetch_ok($ua, "shop cart", "$baseurl/cgi-bin/shop.pl",
20 "Shopping Cart Items");
21fetch_ok($ua, "shop cart checkout no items", "$baseurl/cgi-bin/shop.pl",
22 "Shopping Cart Items");
23fetch_ok($ua, "build search index", "$baseurl/cgi-bin/admin/makeIndex.pl",
70789617 24 "html", "Title: BSE - Administration Centre");
b051120f
TC
25fetch_ok($ua, "advanced search form", "$baseurl/cgi-bin/search.pl",
26 "All\\s+lower\\s+case");
27fetch_ok($ua, "failed search", "$baseurl/cgi-bin/search.pl?q=blargle",
28 "No\\s+documents\\s+were\\s+found");
918735d1
TC
29fetch_ok($ua, "good search", "$baseurl/cgi-bin/search.pl?q=shop",
30 qr!You\s+can\s+buy!s);
5bbf7309 31if (config->entry('site users', 'nopassword')) {
2a295ea9
TC
32 fetch_ok($ua, "not user logon page", "$baseurl/cgi-bin/user.pl",
33 qr!Not\s+Authenticated!s);
34}
35else {
36 fetch_ok($ua, "user logon page", "$baseurl/cgi-bin/user.pl",
37 qr!User\s+Logon!s);
38}
dded3231 39fetch_ok($ua, "shop admin page", "$baseurl/cgi-bin/admin/shopadmin.pl",
76c6b28e 40 qr!Shop\s+Administration!s);
caa7299c 41fetch_ok($ua, "add article form", "$baseurl/cgi-bin/admin/add.pl",
918735d1 42 qr!New\s+Page\sLev3!s);
caa7299c 43fetch_ok($ua, "add catalog form", "$baseurl/cgi-bin/admin/add.pl?type=Catalog",
429e9103 44 qr!Add\s+Catalog!s);
caa7299c
TC
45fetch_ok($ua, "add product form", "$baseurl/cgi-bin/admin/add.pl?type=Product",
46 qr!Add\s+product!s);
47fetch_ok($ua, "edit article form", "$baseurl/cgi-bin/admin/add.pl?id=1",
918735d1 48 qr!Edit\s+Page\s+Lev1!s);
caa7299c
TC
49fetch_ok($ua, "edit catalog form", "$baseurl/cgi-bin/admin/add.pl?id=4",
50 qr!Catalog\sDetails!s);
08123550
TC
51fetch_ok($ua, "user list", "$baseurl/cgi-bin/admin/adminusers.pl",
52 qr!Admin\sUsers!s);
53fetch_ok($ua, "group list", "$baseurl/cgi-bin/admin/adminusers.pl?a_groups=1",
54 qr!Admin\sGroups!s);
aefcabcb 55fetch_ok($ua, "subscriptions", "$baseurl/cgi-bin/admin/subs.pl",
76c6b28e 56 qr/Newsletter\s+List/);
cc9019d1
TC
57fetch_ok($ua, "reports", "$baseurl/cgi-bin/admin/report.pl",
58 qr/Reports/);
daee3409
TC
59# does a refresh unless the user is logged on
60fetch_ok($ua, "changepw", "$baseurl/cgi-bin/admin/changepw.pl",
70789617 61 qr!Change Password|Security not enabled!i);
2d873eb6
TC
62fetch_ok($ua, "printable", "$baseurl/cgi-bin/printable.pl?id=5",
63 qr!sidebar\s+subsection!i);
220c179a
TC
64fetch_ok($ua, "printable error", "$baseurl/cgi-bin/printable.pl?id=5&template=foo",
65 qr!Invalid\s+template\s+name!i);
4619492a 66fetch_ok($ua, "siteusers", "$securl/cgi-bin/admin/siteusers.pl",
220c179a 67 qr!Admin Site Members!i);
85802bd5 68
4619492a 69fetch_ok($ua, "reorder", "$securl/cgi-bin/admin/reorder.pl?parentid=-1",
70789617 70 "html", "Title: BSE - Administration Centre");
50c3d7f9
TC
71
72fetch_ok($ua, 'fmail', "$baseurl/cgi-bin/fmail.pl",
73 qr!name="form"!);
70789617 74fetch_ok($ua, 'page.pl?page=1', "$baseurl/cgi-bin/page.pl?page=1",
f40af7e2 75 qr!welcome\s+to\s!i);
ce518886
TC
76fetch_ok($ua, 'nadmin.pl/modules', "$baseurl/cgi-bin/admin/nadmin.pl/modules".
77 qr/BSE\s+Modules/);