From: Sven Schöling Date: Wed, 14 Oct 2009 08:44:36 +0000 (+0200) Subject: Automatisierte Syntaxtests, Framework für spätere Modultests. X-Git-Tag: release-2.6.1beta1~228 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1d91e75c53e7da5bf2c1b334f5aeecf241dc5ec4;p=kivitendo-erp.git Automatisierte Syntaxtests, Framework für spätere Modultests. Selenium Tests nach old verschoben, deprecated. --- diff --git a/t/001compile.t b/t/001compile.t new file mode 100644 index 000000000..1053a6b07 --- /dev/null +++ b/t/001compile.t @@ -0,0 +1,108 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton + + +################# +#Bugzilla Test 1# +###Compilation### + +use strict; + +use lib 't'; +use lib '../modules/override'; +use lib '../modules/fallback'; + +use Support::Files; + +use Test::More tests => scalar(@Support::Files::testitems); + +# Need this to get the available driver information +use DBI; +my @DBI_drivers = DBI->available_drivers; + +# Bugzilla requires Perl 5.8.0 now. Checksetup will tell you this if you run it, but +# it tests it in a polite/passive way that won't make it fail at compile time. We'll +# slip in a compile-time failure if it's missing here so a tinderbox on < 5.8 won't +# pass and mistakenly let people think Bugzilla works on any perl below 5.8. +require 5.008; + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; +my $perlapp = "\"$^X\""; + +# Test the scripts by compiling them + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + + # Skip mod_perl.pl in all cases. It doesn't compile correctly from the command line. + if ($file eq 'mod_perl.pl') { + ok(1, "Skipping mod_perl.pl"); + next; + } + + # Check that we have a DBI module to support the DB, if this is a database + # module (but not Schema) + if ($file =~ m#Bugzilla/DB/([^/]+)\.pm$# && $file ne "Bugzilla/DB/Schema.pm") { + if (!grep(lc($_) =~ /$1/i, @DBI_drivers)) { + ok(1,$file." - Skipping, as the DBD module not installed"); + next; + } + } + + open (FILE,$file); + my $bang = ; + close (FILE); + my $T = ""; + if ($bang =~ m/#!\S*perl\s+-.*T/) { + $T = "T"; + } + my $command = "$perlapp -c$T -I modules/fallback -I modules/override $file 2>&1"; + my $loginfo=`$command`; + #print '@@'.$loginfo.'##'; + if ($loginfo =~ /syntax ok$/im) { + if ($loginfo ne "$file syntax OK\n") { + ok(0,$file." --WARNING"); + print $fh $loginfo; + } else { + ok(1,$file); + } + } else { + ok(0,$file." --ERROR"); + print $fh $loginfo; + } +} + +exit 0; diff --git a/t/002goodperl.t b/t/002goodperl.t new file mode 100644 index 000000000..3196d0057 --- /dev/null +++ b/t/002goodperl.t @@ -0,0 +1,129 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton +# Jacob Steenhagen +# David D. Kilzer + + +################# +#Bugzilla Test 2# +####GoodPerl##### + +use strict; + +use lib 't'; + +use Support::Files; + +use Test::More tests => (scalar(@Support::Files::testitems) * 3); + +my @testitems = @Support::Files::testitems; # get the files to test. + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + } + my $file_line1 = ; + close (FILE); + + $file =~ m/.*\.(.*)/; + my $ext = $1; + + if ($file_line1 !~ m/^#\!/) { + ok(1,"$file does not have a shebang"); + } else { + my $flags; + if (!defined $ext || $ext eq "pl") { + # standalone programs aren't taint checked yet + $flags = "w"; + } elsif ($ext eq "pm") { + ok(0, "$file is a module, but has a shebang"); + next; + } elsif ($ext eq "cgi") { + # cgi files must be taint checked + $flags = "wT"; + } else { + ok(0, "$file has shebang but unknown extension"); + next; + } + + if ($file_line1 =~ m#^\#\!/usr/bin/perl\s#) { + if ($file_line1 =~ m#\s-$flags#) { + ok(1,"$file uses standard perl location and -$flags"); + } else { + ok(0,"$file is MISSING -$flags --WARNING"); + } + } else { + ok(0,"$file uses non-standard perl location"); + } + } +} + +foreach my $file (@testitems) { + my $found_use_strict = 0; + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + next; + } + while (my $file_line = ) { + if ($file_line =~ m/^\s*use strict/) { + $found_use_strict = 1; + last; + } + } + close (FILE); + if ($found_use_strict) { + ok(1,"$file uses strict"); + } else { + ok(0,"$file DOES NOT use strict --WARNING"); + } +} + +# Check to see that all error messages use tags (for l10n reasons.) +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + next; + } + my $lineno = 0; + my $error = 0; + + while (!$error && (my $file_line = )) { + $lineno++; + if ($file_line =~ /Throw.*Error\("(.*?)"/) { + if ($1 =~ /\s/) { + ok(0,"$file has a Throw*Error call on line $lineno which doesn't use a tag --ERROR"); + $error = 1; + } + } + } + + ok(1,"$file uses Throw*Error calls correctly") if !$error; + + close(FILE); +} + +exit 0; diff --git a/t/003safesys.t b/t/003safesys.t new file mode 100644 index 000000000..b4f41f61c --- /dev/null +++ b/t/003safesys.t @@ -0,0 +1,65 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton + + +################# +#Bugzilla Test 3# +###Safesystem#### + +use strict; + +use lib 't'; + +use Support::Files; + +use Test::More tests => scalar(@Support::Files::testitems); + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; +my $perlapp = "\"$^X\""; + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + my $command = "$perlapp -c -It -MSupport::Systemexec $file 2>&1"; + my $loginfo=`$command`; + if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) { + ok(0,"$file DOES NOT use proper system or exec calls"); + print $fh $loginfo; + } else { + ok(1,"$file uses proper system and exec calls"); + } +} + +exit 0; diff --git a/t/004template.t b/t/004template.t new file mode 100644 index 000000000..becc6075d --- /dev/null +++ b/t/004template.t @@ -0,0 +1,152 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla tests. +# +# The Initial Developer of the Original Code is Jacob Steenhagen. +# Portions created by Jacob Steenhagen are +# Copyright (C) 2001 Jacob Steenhagen. All +# Rights Reserved. +# +# Contributor(s): Jacob Steenhagen +# Zach Lipton +# David D. Kilzer +# Tobias Burnus +# + +################# +#Bugzilla Test 4# +####Templates#### + +use strict; + +use lib 't'; + +use Support::Templates; + +# Bug 137589 - Disable command-line input of CGI.pm when testing +use CGI qw(-no_debug); + +use File::Spec; +use Template; +use Test::More tests => ( scalar(@referenced_files) * scalar(@languages) + + $num_actual_files ); + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +# Checks whether one of the passed files exists +sub existOnce { + foreach my $file (@_) { + return $file if -e $file; + } + return 0; +} + +# Check to make sure all templates that are referenced in +# Bugzilla exist in the proper place. + +foreach my $lang (@languages) { + foreach my $file (@referenced_files) { + my @path = map(File::Spec->catfile($_, $file), + split(':', $include_path{$lang} . ":" . $include_path{"en"})); + if (my $path = existOnce(@path)) { + ok(1, "$path exists"); + } else { + ok(0, "$file cannot be located --ERROR"); + print $fh "Looked in:\n " . join("\n ", @path) . "\n"; + } + } +} + +foreach my $include_path (@include_paths) { + # Processes all the templates to make sure they have good syntax + my $provider = Template::Provider->new( + { + INCLUDE_PATH => $include_path , + # Need to define filters used in the codebase, they don't + # actually have to function in this test, just be defined. + # See Template.pm for the actual codebase definitions. + + # Initialize templates (f.e. by loading plugins like Hook). + PRE_PROCESS => "global/initialize.none.tmpl", + + FILTERS => + { + html_linebreak => sub { return $_; }, + no_break => sub { return $_; } , + js => sub { return $_ } , + base64 => sub { return $_ } , + inactive => [ sub { return sub { return $_; } }, 1] , + closed => [ sub { return sub { return $_; } }, 1] , + obsolete => [ sub { return sub { return $_; } }, 1] , + url_quote => sub { return $_ } , + css_class_quote => sub { return $_ } , + xml => sub { return $_ } , + quoteUrls => sub { return $_ } , + bug_link => [ sub { return sub { return $_; } }, 1] , + csv => sub { return $_ } , + unitconvert => sub { return $_ }, + time => sub { return $_ } , + wrap_comment => sub { return $_ }, + none => sub { return $_ } , + ics => [ sub { return sub { return $_; } }, 1] , + }, + } + ); + + foreach my $file (@{$actual_files{$include_path}}) { + my $path = File::Spec->catfile($include_path, $file); + if (-e $path) { + my ($data, $err) = $provider->fetch($file); + + if (!$err) { + ok(1, "$file syntax ok"); + } + else { + ok(0, "$file has bad syntax --ERROR"); + print $fh $data . "\n"; + } + } + else { + ok(1, "$path doesn't exist, skipping test"); + } + } + + # check to see that all templates have a version string: + # disabled for lx-office + +# foreach my $file (@{$actual_files{$include_path}}) { +# my $path = File::Spec->catfile($include_path, $file); +# open(TMPL, $path); +# my $firstline = ; +# if ($firstline =~ /\d+\.\d+\@[\w\.-]+/) { +# ok(1,"$file has a version string"); +# } else { +# ok(0,"$file does not have a version string --ERROR"); +# } +# close(TMPL); +# } +} + +exit 0; diff --git a/t/005no_tabs.t b/t/005no_tabs.t new file mode 100644 index 000000000..75f532956 --- /dev/null +++ b/t/005no_tabs.t @@ -0,0 +1,55 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla tests. +# +# The Initial Developer of the Original Code is Jacob Steenhagen. +# Portions created by Jacob Steenhagen are +# Copyright (C) 2001 Jacob Steenhagen. All +# Rights Reserved. +# +# Contributor(s): Jacob Steenhagen +# David D. Kilzer +# + +################# +#Bugzilla Test 5# +#####no_tabs##### + +use strict; + +use lib 't'; + +use Support::Files; +use Support::Templates; + +use File::Spec; +use Test::More tests => ( scalar(@Support::Files::testitems) + + $Support::Templates::num_actual_files); + +my @testitems = @Support::Files::testitems; +for my $path (@Support::Templates::include_paths) { + push(@testitems, map(File::Spec->catfile($path, $_), + Support::Templates::find_actual_files($path))); +} + +foreach my $file (@testitems) { + open (FILE, "$file"); + if (grep /\t/, ) { + ok(0, "$file contains tabs --WARNING"); + } else { + ok(1, "$file has no tabs"); + } + close (FILE); +} + +exit 0; diff --git a/t/006spellcheck.t b/t/006spellcheck.t new file mode 100644 index 000000000..67982b27b --- /dev/null +++ b/t/006spellcheck.t @@ -0,0 +1,95 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2002 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton + + +################# +#Bugzilla Test 6# +####Spelling##### + +use lib 't'; +use Support::Files; + +BEGIN { # yes the indenting is off, deal with it +#add the words to check here: +@evilwords = qw( +anyways +arbitary +databasa +dependan +existance +existant +paramater +varsion +fomr +); + +$testcount = scalar(@Support::Files::testitems); +} + +use Test::More tests => $testcount; + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; + +# at last, here we actually run the test... +my $evilwordsregexp = join('|', @evilwords); + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + + if (open (FILE, $file)) { # open the file for reading + + my $found_word = ''; + + while (my $file_line = ) { # and go through the file line by line + if ($file_line =~ /($evilwordsregexp)/i) { # found an evil word + $found_word = $1; + last; + } + } + + close (FILE); + + if ($found_word) { + ok(0,"$file: found SPELLING ERROR $found_word --WARNING"); + } else { + ok(1,"$file does not contain registered spelling errors"); + } + } else { + ok(0,"could not open $file for spellcheck --WARNING"); + } +} + +exit 0; diff --git a/t/011pod.t b/t/011pod.t new file mode 100644 index 000000000..517ca03ad --- /dev/null +++ b/t/011pod.t @@ -0,0 +1,60 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# Contributor(s): Frédéric Buclin + + +################## +#Bugzilla Test 11# +##POD validation## + +use strict; + +use lib 't'; + +use Support::Files; +use Pod::Checker; + +use Test::More tests => scalar(@Support::Files::testitems); + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + my $error_count = podchecker($file, $fh); + if ($error_count < 0) { + ok(1,"$file does not contain any POD"); + } elsif ($error_count == 0) { + ok(1,"$file has correct POD syntax"); + } else { + ok(0,"$file has incorrect POD syntax --ERROR"); + } +} + +exit 0; diff --git a/t/README b/t/README deleted file mode 100644 index d10dc334c..000000000 --- a/t/README +++ /dev/null @@ -1 +0,0 @@ -Directory for automated test scripts. diff --git a/t/README.de b/t/README.de deleted file mode 100644 index 84b65dcaa..000000000 --- a/t/README.de +++ /dev/null @@ -1,142 +0,0 @@ -Lx-Office Testumgebung - -Mit der hier beschriebenen Testumgebung ist es möglich, Lx Office -automatisiert zu testen. Automatische Tests haben den großen -Vorteil, das verschiedene Standardtests nicht immer wieder von -Hand durchgespielt werden müssen, sondern einmal in einem Skript -verschriftet immer wieder verwendet werden können. -Weitere Informationen können im Wiki nachgelesen und ergänzt werden: -http://wiki.lx-system.de/index.php/Automatisiertes_Testen_von_Modulen - - - -Aufbau der Testumgebung -Im Verzeichnis t/ finden sich alle testrelevanten Skripte.Der -Aufruf der Tests folgt über -#perl t/lx-office.t - -lx-office.t ruft alle Einzeltests der Reihe nach auf und fasst sie -übersichtlich zusammen. Die Einzeltests befinden sich in einem -Unterordner von t/. Jeder Unterorder enthält eine Datei AllTests.t, -die wiederrum alle einzelnen Tests des Unterordners aufruft. - - - -t/lxtest.conf t/lxtest.conf.default -Für die einzelnen Tests werden verschiedene Packetvariablen (globals) -zur Verfügung gestellt, um die Testskripte einfach auf -unterschiedliche Installationen anpassen zu können und um sich auf -die selbe Test-Datenbank und denselben Test-Benutzer beziehen zu können. - -Die Datei t/lxtest.conf.default muss zunächst nach t/lxtest.conf -kopiert werden. Dann ist die Datei t/lxtest.conf auf die lokalen -Gegebenheiten anzupassen. Besnders die für Selenium nötigen -Einstellungen bedürfen einer Überarbeitung. - -Definiert werden die Variablen in der Datei t/lxtest.conf. -Aufgerufen werden die Variablen $lxtest->{VARIABLE}. -Es ist ratsam, die vorhandenen Tests zu untersuchen, um sich ein Bild -von den Möglichkeiten zu machen. - - - -Selenium -Selenium ist eine Testsuite, mit der man Browserinteraktionen -simulieren und die Ergebnisse auswerten kann. Der unschlagbare -Vorteil von Selenium für das Testen von Lx ist es, dass es -möglich wird, eine Test-Datenbank in einfachen Schritten -erstellen zu können. Um Seleniumtests durchführen zu können, -ist es nötig, das Packet Selenium Remote Control (Selenium RC) -lokal zu installieren (Java Runtime ebenfalls erforderlich). -Selenium RC gibt es unter: -http://www.openqa.org/selenium-rc/ - -Für den Betrieb von Selenium ist eine lokale Workstation mit -Browserumgebung nötig. - -Der Aufruf von selenium erfolgt unter Windows bspw. so: -C:\java -jar "C:\selenium-remote-control-0.9.0 -\server\selenium-server.jar" - -Unter Linux bspw. so: - - -Die lokalen Einstellungen sind unbedingt in der -t/lxtest.conf nachzutragen! Weitere Infos unter -http://www.openqa.org/selenium-rc/ - -Dann reicht ein Start von -#perl t/lx-office.t -um dem Testskript bei der Arbeit zuzuschauen. - -Leider ist es nötig, auf dem Seleniumserver nach jedem Aufruf -des Testskripts das Sicherheitszertifikat von LINET Services zu -akzeptieren, was etwas nervig ist. - - -t/selenium/ -Der Ordner selenium beinhaltet alle einzelnen selenium Testskripte. -Aufgerufen werden die Skripte über t/selenium/AllTests.t . -Neue Tests müssen in dieser Datei angemeldet werden. -Ziel ist es eine Demodatenbank von Lx mit Daten zu füllen und die -Abhängigkeiten untereinander zu prüfen. Dazu sind die -individuellen Testskripte nummeriert (001NAME.t bis 999NAME.t) um -sie der Reihe nach abzuarbeiten. - -Die folgenden Skripte sind bereits installiert: - -001CreateTestDatabase.t Erzeugt eine neue Testdatenbank -002CreateTestUser.t Erzeugt einen neuen Testbenutzer -... -... -998DeleteTestUser.t Löscht den Testbenutzer -999DeleteTestDatabase.t Löscht die Testdatenbank - -Dazwischen befinden sich die Skripte, um eine Demodatenbank -aufzubauen und zu prüfen. - - - -t/backend/ -In diesem Ordner befinden sich Backend Testskripte. - - - -t/frontend/ -In diesem Ordner befinden sich Frontend Testskripte, die nicht -unter selenium getestet werden. - - - -Was wenn ein Test fehlschlägt? -Das Fehlschlagen von Tests kann verschiedene Gründe haben. -1. Der Test selbst ist fehlerhaft. -2. Es haben sich Lx Screens verändert, so das der Test von - falschen Voraussetzungen ausgeht -3. Die zu testende Funktion ist fehlerhaft - -Nachdem 1. und 2. ausgeschlossen wurden, sollte zu 3. ein Bugreport -angelegt werden. -Bugreports unter https://lx-office.linet-services.de/bugzilla/ -anlegen. - - - -Eigene Tests -Eigene testskripte können einfach in die Testumgebung eingebunden -werden. Die vorhandenen Skripte können als Anleitung dienen. -Bei Selenium Tests ist es am leichtesten, mit Firefox und der -Selenium IDE Extension Testpfade einfach aufzuzeichnen. -( http://www.openqa.org/selenium-ide/ ) -Dann werden die Selenium IDE Testaufzeichnungen in Perl -umgewandelt und angepasst. Fertige Skripte werden mit einer -laufenden Nummer versehen und in den Ordner t/selenium/ kopiert. -Dann wird das Skript in der Datei t/selenium/AllTests.t eingefügt. -Ein erster Probelauf mit -#perl t/selenium/AllTests.t sollte den Test absolvieren. -(Dabei kann es nötig sein, andere Tests auszukommentieren, weil -selenium Tests mitunter lange Laufzeiten haben können, oder weil die Demodatenbank -und der Benutzer am Ende zu Debugging Zwecken nicht gelöscht werden -sollen.) - - diff --git a/t/Support/Files.pm b/t/Support/Files.pm new file mode 100644 index 000000000..e485561a3 --- /dev/null +++ b/t/Support/Files.pm @@ -0,0 +1,82 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton +# Joel Peshkin + + +package Support::Files; + +use File::Find; + +# exclude_deps is a hash of arrays listing the files to be excluded +# if a module is not available +# +@additional_files = (); +%exclude_deps = ( + 'XML::Twig' => ['importxml.pl'], + 'Net::LDAP' => ['Bugzilla/Auth/Verify/LDAP.pm'], + 'Email::Reply' => ['email_in.pl'], + 'Email::MIME::Attachment::Stripper' => ['email_in.pl'] +); + + +@files = glob('*'); +find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, 'SL'); + +sub have_pkg { + my ($pkg) = @_; + my ($msg, $vnum, $vstr); + no strict 'refs'; + eval { my $p; ($p = $pkg . ".pm") =~ s!::!/!g; require $p; }; + return !($@); +} + +@exclude_files = (); +foreach $dep (keys(%exclude_deps)) { + if (!have_pkg($dep)) { + push @exclude_files, @{$exclude_deps{$dep}}; + } +} + +sub isTestingFile { + my ($file) = @_; + my $exclude; + foreach $exclude (@exclude_files) { + if ($file eq $exclude) { return undef; } # get rid of excluded files. + } + + if ($file =~ /\.cgi$|\.pl$|\.pm$/) { + return 1; + } + my $additional; + foreach $additional (@additional_files) { + if ($file eq $additional) { return 1; } + } + return undef; +} + +foreach $currentfile (@files) { + if (isTestingFile($currentfile)) { + push(@testitems,$currentfile); + } +} + + +1; diff --git a/t/Support/Systemexec.pm b/t/Support/Systemexec.pm new file mode 100644 index 000000000..676ee02a4 --- /dev/null +++ b/t/Support/Systemexec.pm @@ -0,0 +1,14 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- + +package Support::Systemexec; +require Exporter; +@ISA = qw(Exporter); +@EXPORT = qw(system exec); +@EXPORT_OK = qw(); +sub system($$@) { + 1; +} +sub exec($$@) { + 1; +} +1; diff --git a/t/Support/Templates.pm b/t/Support/Templates.pm new file mode 100644 index 000000000..61dda11c7 --- /dev/null +++ b/t/Support/Templates.pm @@ -0,0 +1,151 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla tests. +# +# The Initial Developer of the Original Code is Jacob Steenhagen. +# Portions created by Jacob Steenhagen are +# Copyright (C) 2001 Jacob Steenhagen. All +# Rights Reserved. +# +# Contributor(s): Jacob Steenhagen +# David D. Kilzer +# Tobias Burnus +# + +package Support::Templates; + +use strict; + +use lib 't'; +use base qw(Exporter); +@Support::Templates::EXPORT = + qw(@languages @include_paths %include_path @referenced_files + %actual_files $num_actual_files); +use vars qw(@languages @include_paths %include_path @referenced_files + %actual_files $num_actual_files); + +use Support::Files; + +use File::Find; +use File::Spec; + +# The available template languages +@languages = (); + +# The colon separated includepath per language +%include_path = (); + +# All include paths +@include_paths = (); + +# Files which are referenced in the cgi files +@referenced_files = (); + +# All files sorted by include_path +%actual_files = (); + +# total number of actual_files +$num_actual_files = 0; + +# Scan for the template available languages and include paths +#{ +# opendir(DIR, "templates/webpages") || die "Can't open 'templates': $!"; +# my @files = grep { /^[a-z-]+$/i } readdir(DIR); +# closedir DIR; +# +# foreach my $langdir (@files) { +# next if($langdir =~ /^CVS$/i); +# +# my $path = File::Spec->catdir('templates', $langdir, 'custom'); +# my @dirs = (); +# push(@dirs, $path) if(-d $path); +# $path = File::Spec->catdir('templates', $langdir, 'extension'); +# push(@dirs, $path) if(-d $path); +# $path = File::Spec->catdir('templates', $langdir, 'default'); +# push(@dirs, $path) if(-d $path); +# +# next if(scalar(@dirs) == 0); +# push(@languages, $langdir); +# push(@include_paths, @dirs); +# $include_path{$langdir} = join(":",@dirs); +# } +#} + +my @files; + +# Local subroutine used with File::Find +sub find_templates { + # Prune CVS directories + if (-d $_ && $_ eq 'CVS') { + $File::Find::prune = 1; + return; + } + + # Only include files ending in '.html' + if (-f $_ && $_ =~ m/\.html$/i) { + my $filename; + my $local_dir = File::Spec->abs2rel($File::Find::dir, + $File::Find::topdir); + + # File::Spec 3.13 and newer return "." instead of "" if both + # arguments of abs2rel() are identical. + $local_dir = "" if ($local_dir eq "."); + + if ($local_dir) { + $filename = File::Spec->catfile($local_dir, $_); + } else { + $filename = $_; + } + + push(@files, $filename); + } +} + +# Scan the given template include path for templates +sub find_actual_files { + my $include_path = $_[0]; + @files = (); + find(\&find_templates, $include_path); + return @files; +} + +@include_paths = qw(templates/webpages); + +foreach my $include_path (@include_paths) { + $actual_files{$include_path} = [ find_actual_files($include_path) ]; + $num_actual_files += scalar(@{$actual_files{$include_path}}); +} + +# Scan Bugzilla's perl code looking for templates used and put them +# in the @referenced_files array to be used by the 004template.t test. +my %seen; + +foreach my $file (@Support::Files::testitems) { + open (FILE, $file); + my @lines = ; + close (FILE); + foreach my $line (@lines) { +# if ($line =~ m/template->process\(\"(.+?)\", .+?\)/) { + if ($line =~ m/->parse_html_template\((['"])(.+?)\1/) { + my $template = $2; + # Ignore templates with $ in the name, since they're + # probably vars, not real files + next if $template =~ m/\$/; + next if $seen{$template}; + push (@referenced_files, $template); + $seen{$template} = 1; + } + } +} + +1; diff --git a/t/backend/README.backend b/t/backend/README.backend deleted file mode 100644 index 6d2b54e12..000000000 --- a/t/backend/README.backend +++ /dev/null @@ -1,4 +0,0 @@ -This folder contais the backend testscrips for Lx. -The Lx backend is the module libery under SL. -Backend tests don't need selenium, and are only able -to test local installations. diff --git a/t/demolx/AllTests.t b/t/demolx/AllTests.t deleted file mode 100644 index aafd34667..000000000 --- a/t/demolx/AllTests.t +++ /dev/null @@ -1,115 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2006 -# Web http://www.lx-office.org -# -#===================================================================== -# -# Author: Udo Spallek -# Email: udono@gmx.net -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#====================================================================== -# -# Selenium Main Caller -# Call all Selenium scripts from here. To use Selenium tests in -# Lx-Office you need to Install Selenium Remote Control. Take a look at -# the README Document for further informatinons on installing Selenium -# and testing Lx-Office and of course writing your own testcases. -# -####################################################################### - no strict; - push @INC, ['/t/selenium']; - use vars qw( $lxdebug $lxtest $sel ); - use strict; - use Carp; - - use Test::WWW::Selenium; - use Test::More; - use IO::Socket; - - eval { require('t/lxtest.conf'); }; - if ($@) { - diag("No test configuration found in t/lxtest.conf.\n - Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"); - exit 0; - }; - - sub server_is_running { - return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, - PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, - ); - } - if (server_is_running) { - plan tests => 204; # Need to be cutomized - } - else { - plan skip_all => "No selenium server found! " - ."Maybe you forgot to start it or " - ."the preferences in t/lxtest.conf doesen't fit to your system"; -# exit 0; - } - - diag('Pretests and initialisation'); - - - - $lxtest->{test_id} = time; # create individual ids by unixtime - $lxtest->{testuserlogin} = $lxtest->{testlogin} . $lxtest->{test_id}; - $lxtest->{testuserpasswd} = $lxtest->{test_id}; - $lxtest->{db} = $lxtest->{db} . $lxtest->{test_id}; - - ok(defined $lxtest->{rpw}, "Get root password"); - - ok(defined $lxtest->{dbhost}, "found dbhost in config"); - ok(defined $lxtest->{dbport}, "found dbport in config"); - ok(defined $lxtest->{dbuser}, "found dbuser in config"); - ok(defined $lxtest->{dbpasswd}, "found dbpasswd in config"); - - $lxtest->{lxadmin} = $lxtest->{lxbaseurl} . "admin.pl?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; - - - - - - eval { $sel = Test::WWW::Selenium->new( - host => $lxtest->{seleniumhost}, - port => $lxtest->{seleniumport}, - browser => $lxtest->{seleniumbrowser}, - browser_url => $lxtest->{lxadmin}, - auto_stop => '0', - ); - }; - if ($@) { - diag("No Selenium Server running, or wrong preferences\n\n"); - exit 0; - } - - ok(defined $sel, 'Creating Selenium Object'); - - diag('Starting Selenium tests...'); - - opendir(SCRIPTS, 't/selenium/testscripts'); - my @testscripts = sort readdir(SCRIPTS); - - foreach my $script (@testscripts){ - my $file = "t/selenium/testscripts/" . $script; - require_ok($file) if ( $script =~ /^\d\d\d.*\.t$/ ); - } - exit 1; - - $sel=''; # Destroy selenium object - - exit 1; - diff --git a/t/demolx/README b/t/demolx/README deleted file mode 100644 index 35ae59a71..000000000 --- a/t/demolx/README +++ /dev/null @@ -1,7 +0,0 @@ -This directory contains all selenium testscripts for lx-office. -Selenium testscrips are the prefered way to test the higher lx -functionalities. For the selenium tests you need to install and -run a local selenium server on a machine whitch is able to start -a browser session. See README for more informations. - - diff --git a/t/demolx/cleanup.pl b/t/demolx/cleanup.pl deleted file mode 100644 index 7e6bf6dea..000000000 --- a/t/demolx/cleanup.pl +++ /dev/null @@ -1,157 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2006 -# Web http://www.lx-office.org -# -#===================================================================== -# -# Author: Udo Spallek -# Email: udono@gmx.net -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#====================================================================== -# -# Selenium Cleanup Script -# To clean up all the messy databases and users while debugging testcases -# -####################################################################### - no strict; - push @INC, ['/t/selenium']; - use vars qw( $lxdebug $lxtest $sel ); - use strict; - use Carp; - - use WWW::Selenium; - use IO::Socket; - - my $cleanedupdb = ''; - my $cleanedupusers = ''; - - eval { require('t/lxtest.conf'); }; - if ($@) { - print "No test configuration found in t/lxtest.conf.\n - Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"; - exit 0; - }; - - sub server_is_running { - return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, - PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, - ); - } - if (server_is_running) { - } - else { - exit 0; - } - - $lxtest->{testuserlogin} = $lxtest->{testlogin}; - $lxtest->{db} = $lxtest->{db}; - - $lxtest->{lxadmin} = $lxtest->{lxbaseurl} . "admin.pl?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; - - eval { $sel = WWW::Selenium->new( - host => $lxtest->{seleniumhost}, - port => $lxtest->{seleniumport}, - browser => $lxtest->{seleniumbrowser}, - browser_url => $lxtest->{lxadmin}, - auto_stop => '0', - ); - }; - if ($@) { - print "No Selenium Server running, or wrong preferences\n\n"; - exit 0; - } - - - print "\nStarting Testdebugging Cleanup...\n"; - - -### Delete user - -$sel->start; -print "Cleanup all users '$lxtest->{testuserlogin}*'\n"; -$sel->open($lxtest->{lxadmin}); - -my @links= $sel->get_all_links(); -my $testuserlogin = $lxtest->{testuserlogin}; - -foreach my $link (@links) { - - if ($link =~ /$testuserlogin\d\d\d\d\d\d\d\d\d\d/){ - $sel->click("link=$lxtest->{testuserlogin}11*"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $cleanedupusers .= " $link\n"; - } -} - -print "Lock the system\n"; -$sel->click("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); -$sel->wait_for_page_to_load($lxtest->{timeout}); - -print "Cleanup all test databasees: '$lxtest->{db}*'\n"; - - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->type("dbhost", $lxtest->{dbhost}); - $sel->type("dbport", $lxtest->{dbport}); - $sel->type("dbuser", $lxtest->{dbuser}); - $sel->type("dbpasswd", $lxtest->{dbpasswd}); - - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); - $sel->wait_for_page_to_load($lxtest->{timeoutlong}); - - my $field = $sel->get_body_text(); - my $database= $lxtest->{db}; - my @fields = split(' ', $field); - - - foreach my $field (@fields) { - - if ($field =~ /$database\d\d\d\d\d\d\d\d\d\d/){ - $sel->open($lxtest->{lxadmin}); - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->type("dbhost", $lxtest->{dbhost}); - $sel->type("dbport", $lxtest->{dbport}); - $sel->type("dbuser", $lxtest->{dbuser}); - $sel->type("dbpasswd", $lxtest->{dbpasswd}); - - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); - $sel->wait_for_page_to_load($lxtest->{timeoutlong}); - $sel->check("name=db value=$field"); - $sel->click("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); - $cleanedupdb .= " $field\n"; - - } - } - -$sel->open($lxtest->{lxadmin}); -print "Unlock the system\n"; - -$sel->click("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); -$sel->wait_for_page_to_load($lxtest->{timeout}); - -$cleanedupdb = "none.\n" if ($cleanedupdb eq ''); -$cleanedupusers = "none.\n" if ($cleanedupusers eq ''); - -print "Ready. \nReport:\n--- Cleaned up Users:\n$cleanedupusers---Cleaned up Databases:\n$cleanedupdb"; - -$sel->stop; - -exit 1; - - diff --git a/t/demolx/testscripts/001CreateTestDatabase.t b/t/demolx/testscripts/001CreateTestDatabase.t deleted file mode 100644 index cf0c2f6de..000000000 --- a/t/demolx/testscripts/001CreateTestDatabase.t +++ /dev/null @@ -1,37 +0,0 @@ -### Create Database - -$sel->open_ok($lxtest->{lxadmin}); -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Lock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); - -diag("Create test database '$lxtest->{db}'"); -$sel->title_is("Lx-Office ERP Administration -"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP / Datenbankadministration -"); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbhost", $lxtest->{dbhost}); -$sel->type_ok("dbport", $lxtest->{dbport}); -$sel->type_ok("dbdefault", $lxtest->{dbdefault}); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank anlegen\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); -$sel->type_ok("db", $lxtest->{db}); -$sel->select_ok("encoding", "label=ISO 8859-1"); -$sel->click_ok("//input[(\@name=\"chart\") and (\@value=\"Germany-DATEV-SKR03EU\")]"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Unlock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); diff --git a/t/demolx/testscripts/002CreateTestUser.t b/t/demolx/testscripts/002CreateTestUser.t deleted file mode 100644 index aaf51d439..000000000 --- a/t/demolx/testscripts/002CreateTestUser.t +++ /dev/null @@ -1,32 +0,0 @@ - -### Create new user -diag("Create test user '$lxtest->{testuserlogin}'"); -$sel->open_ok($lxtest->{lxadmin}); -$sel->title_is("Lx-Office ERP Administration -"); -$sel->click_ok("action"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration / Benutzer erfassen -"); -$sel->type_ok("login", $lxtest->{testuserlogin}); -$sel->type_ok("password", $lxtest->{testuserpasswd}); -$sel->type_ok("name", "Selenium"); -$sel->type_ok("email", "selenium\@lx-office.org"); -$sel->type_ok("signature", "Selenium Testuser"); -$sel->type_ok("tel", "0000"); -$sel->type_ok("fax", "1111"); -$sel->type_ok("company", "Sel-enium"); -$sel->type_ok("signature", "Selenium Testuser\nTestfirma"); -$sel->type_ok("address", "Testfirma"); -$sel->type_ok("steuernummer", "111-222-333-444"); -$sel->type_ok("co_ustid", "1234567"); -$sel->type_ok("duns", "0987654321"); -$sel->click_ok("dbdriver"); -$sel->type_ok("newtemplates", "seleniumtestuser"); -$sel->click_ok("menustyle"); -$sel->type_ok("Pg_dbhost", $lxtest->{dbhost}); -$sel->type_ok("Pg_dbname", $lxtest->{db}); -$sel->type_ok("Pg_dbport", $lxtest->{dbport}); -$sel->type_ok("Pg_dbuser", $lxtest->{dbuser}); -$sel->type_ok("Pg_dbpasswd", $lxtest->{dbpasswd}); -$sel->click_ok("action"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); diff --git a/t/demolx/testscripts/005UpdateDatabase.t b/t/demolx/testscripts/005UpdateDatabase.t deleted file mode 100644 index 53a2e792a..000000000 --- a/t/demolx/testscripts/005UpdateDatabase.t +++ /dev/null @@ -1,62 +0,0 @@ -### Update Database - -# NOTEST: some preruns for initializing missing parameters -$sel->open($lxtest->{lxadmin}); -$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -$sel->wait_for_page_to_load($lxtest->{timeout}); -$sel->type("dbuser", $lxtest->{dbuser}); -$sel->type("dbpasswd", $lxtest->{dbpasswd}); -$sel->type("dbuser", $lxtest->{dbuser}); -$sel->type("dbhost", $lxtest->{dbhost}); -$sel->type("dbport", $lxtest->{dbport}); -$sel->type("dbdefault", $lxtest->{dbdefault}); -$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); -$sel->wait_for_page_to_load($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); - -my $count =0; - -while (){ # count the number of radiobuttons - eval { $sel->is_checked("//input[(\@id=\"$count\")]"); }; - if ( $@ ) { $count--; last; }; - $count++; -} - -#TEST: Now run the Tests - -$sel->open_ok($lxtest->{lxadmin}); -$sel->title_is("Lx-Office ERP Administration -"); - -#diag('Lock the system'); -#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); -#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); - -diag('Update the database'); - -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP / Datenbankadministration -"); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbhost", $lxtest->{dbhost}); -$sel->type_ok("dbport", $lxtest->{dbport}); -$sel->type_ok("dbdefault", $lxtest->{dbdefault}); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); - -for (my $i=0; $i <= $count; $i++){ - $sel->uncheck_ok("//input[(\@id=\"$i\")]"); -} - -#$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]"); -$sel->check_ok("//input[\@name=\"db$lxtest->{db}\"]"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->title_like( qr/Lx-Office ERP Datenbankadministration/ ); - -#diag('Unlock the system'); -#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); -#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -#$sel->title_is("Lx-Office ERP Administration -"); - diff --git a/t/demolx/testscripts/K998DeleteTestUser.t b/t/demolx/testscripts/K998DeleteTestUser.t deleted file mode 100644 index f0c430e82..000000000 --- a/t/demolx/testscripts/K998DeleteTestUser.t +++ /dev/null @@ -1,9 +0,0 @@ -### Delete user -diag("Delete test user '$lxtest->{testuserlogin}'"); -$sel->open_ok($lxtest->{lxadmin}); -$sel->title_is("Lx-Office ERP Administration -"); -$sel->click_ok("link=$lxtest->{testuserlogin}"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration / Benutzerdaten bearbeiten -"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); diff --git a/t/demolx/testscripts/K999DeleteTestDatabase.t b/t/demolx/testscripts/K999DeleteTestDatabase.t deleted file mode 100644 index 511fbd291..000000000 --- a/t/demolx/testscripts/K999DeleteTestDatabase.t +++ /dev/null @@ -1,35 +0,0 @@ -#### Delete database - - -$sel->open_ok($lxtest->{lxadmin}); -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Lock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); - -diag("Delete test database '$lxtest->{db}'"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP / Datenbankadministration -"); -$sel->type_ok("dbhost", $lxtest->{dbhost}); -$sel->type_ok("dbport", $lxtest->{dbport}); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank löschen -"); - -$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]"); - -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->body_text_is("Lx-Office ERP Datenbankadministration / Datenbank löschen $lxtest->{db} wurde erfolgreich gelöscht"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Unlock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); \ No newline at end of file diff --git a/t/demolx/testscripts/README b/t/demolx/testscripts/README deleted file mode 100644 index 70b4818d7..000000000 --- a/t/demolx/testscripts/README +++ /dev/null @@ -1,2 +0,0 @@ -All Selenium testscripts can be found here. The tests will be included -sequential from 001 to 999. \ No newline at end of file diff --git a/t/frontend/README.frontend b/t/frontend/README.frontend deleted file mode 100644 index 511b932ee..000000000 --- a/t/frontend/README.frontend +++ /dev/null @@ -1,10 +0,0 @@ -This folder contais the frontend testscrips for Lx. -The Lx frontend are all perl scripts under bin/* . -The frontend tests don't need selenium! They should -use the commandline API of Lx. Frontend tests in this -directory are only for testing local Lx installations. - -If you like to test the HTML screens in different -Browsers, it would be better to use the selenium -environment under t/selenium. - diff --git a/t/lx-office.t b/t/lx-office.t deleted file mode 100644 index ee52ab5c0..000000000 --- a/t/lx-office.t +++ /dev/null @@ -1,181 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2006/2007 -# Web http://www.lx-office.org -# -#===================================================================== -# -# Author: Udo Spallek, Thomas Kasulke -# Email: udono@gmx.net, tkasulke@linet-services.de -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#====================================================================== -# -# Main Test Module: -# For collecting all the tests in nice Test::Harness environment. -# Study the README for Selenium Installation and testing process -# and enjoy starting -# #perl t/lx-office.t -# against the unstable release -#====================================================================== - - use warnings FATAL => 'all'; - use diagnostics; - use Carp; - use Test::Harness; - - my %tests = ("all" => 't/selenium/TestAllTests.t', - "system" => 't/selenium/TestSystem.t', - "selling" => 't/selenium/TestSelling.t', - "masterdata" => 't/selenium/TestMasterData.t', - "testbed" => 't/selenium/TestCreateTestbed.t', - "admin" => 't/selenium/TestAdmin.t', - "accounting" => 't/selenium/TestAccounting.t', - "payments" => 't/selenium/TestPayments.t', - "printing" => 't/selenium/TestPrinting.t', - "programm" => 't/selenium/TestProgramm.t', - "reports" => 't/selenium/TestReports.t' ); - my $showtests = 0; - my $singletest = 0; - my $nodb = 0; - my @totest; - - eval { require('t/lxtest.conf'); }; - my %lxtest = %{ $lxtest } if ($lxtest); - - sub usage - { - print "\n$0 --- creates testscenarios while using Selenium testcases for Lx-Office\n"; - printf "\t\tusage: perl [PERLOPTIONS] $0 [--help] [OPTIONS] [ARGUMENTS]\n\t\t%s\n", "\xAF" x 6; - print "\t\t --help\t\tshow this usage\n\n"; - printf "\t\toptions:\n\t\t%s\n", "\xAF" x 8; - print "\t\t -masterdata\tonly runs testscripts for \"masterdata\"\n"; - print "\t\t -accounting\tonly runs testscripts for \"accounting\"\n"; - print "\t\t -system\tonly runs testscripts for \"system\"\n"; - print "\t\t -payments\tonly runs testscripts for \"payments\"\n"; - print "\t\t -programm\tonly runs testscripts for \"programm\"\n"; - print "\t\t -printing\tonly runs testscripts for \"printing\"\n"; - print "\t\t -reports\tonly runs testscripts for \"reports\"\n"; - print "\t\t -selling\tonly runs testscripts for \"selling\"\n"; - print "\t\t -purchase\tonly runs testscripts for \"purchase\"\n"; - print "\t\t -admin\tonly runs testscripts for \"administration\"\n"; - print "\t\t -testbed\tcreates a standardized test database\n"; - print "\t\t -nodb\t\tdoesn't create a db! Only use with \n\t\t\t\t--username, --userpasswd, --dbname, --dbport, --dbhost, --dbuser, --dbpasswd, --rootpasswd arguments!\n"; - print "\t\t -showtests\tfinally shows all tests available only\n"; - print "\t\t -singletest\toption flag for using single tests shown in \"-showtests\"\n"; - printf "\n\t\targuments:\n\t\t%s\n","\xAF" x 10; - print "\t\t --test=\tname of Test shown in showtests seperated by , (Only joined by -singletest)\n"; - print "\t\t --username=\tuser login name\n"; - print "\t\t --userpasswd=\tuser login password\n"; - print "\t\t --dbname=\tname of used db (leave empty whether dbname is seleniumtestdatabase)\n"; - print "\t\t --dbport=\tport of used db (leave empty whether port is 5432)\n"; - print "\t\t --dbhost=\thost of used db (leave empty whether host is localhost [127.0.0.1])\n"; - print "\t\t --dbuser=\tdb username (leave empty whether name is postgres)\n"; - print "\t\t --dbpasswd=\tthe password for used db (leave empty while none)\n"; - print "\t\t --rootpasswd=\troot password for admin.pl login\n"; - printf "\t\t NOTE: Configuration in lxtest.conf will be temporaly overwritten by using this arguments!\n\t\t %s\n", "\xAF" x 6; - exit; - } - - while ( $#ARGV>=0 ) - { - $_ = $ARGV[0]; - - if ( /^--help$/ ) { usage; last } - elsif ( /^-showtests$/) { $showtests = 1; shift; next } - elsif ( /^-nodb$/ ) { $nodb = 1; shift; next } - elsif ( /^-(masterdata)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(system)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(selling)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(testbed)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(payments)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(admin)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(printing)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(reports)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(accounting)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next } - elsif ( /^-(programm)$/ ) { push @totest, $1; shift; next } - elsif ( /^-singletest$/ ) { $singletest = 1; shift; next } - elsif ( /^--username=(.*)$/ ) { $lxtest{testuserlogin} = $1; shift; next } - elsif ( /^--userpasswd=(.*)$/ ) { $lxtest{testuserpasswd} = $1; shift; next } - elsif ( /^--dbname=(.*)$/ ) { $lxtest{db} = $1; shift; next } - elsif ( /^--dbport=(.*)$/ ) { $lxtest{dbport} = $1; shift; next } - elsif ( /^--dbhost=(.*)$/ ) { $lxtest{dbhost} = $1; shift; next } - elsif ( /^--dbuser=(.*)$/ ) { $lxtest{dbuser} = $1; shift; next } - elsif ( /^--dbpasswd=(.*)$/ ) { $lxtest{dbpasswd} = $1; shift; next } - elsif ( /^--rootpasswd=(.*)$/ ) { $lxtest{rpw} = $1; shift; next } - elsif ( /^--test=(.*)$/ ) { foreach (split(/\,/, $1)) { push @totest, $_; } shift; next } - elsif ( /^([A-Z].*)$/ ) { push @totest, shift; next } - else { - print STDERR "$0: ERROR: unrecognized option '$_' ?\n"; - usage; - } - last; - } - unlink("/tmp/lxtest-temp.conf") if (-f "/tmp/lxtest-temp.conf"); - open TEMPCONF, "+>/tmp/lxtest-temp.conf"; - print TEMPCONF '$lxtest = {'."\n"; - foreach (keys(%lxtest)) { - print TEMPCONF '"' . $_ . '" => "' . $lxtest{$_} . "\",\n"; - } - print TEMPCONF '};'; - close TEMPCONF; - - if($singletest || $showtests) { - my $testscriptdir = 't/selenium/testscripts/'; - opendir(ROOT, $testscriptdir); - foreach my $dir ( readdir( ROOT ) ) { - if(-d $testscriptdir . $dir && $dir ne "begin" && $dir ne "end" && $dir ne "..") { - opendir(DIR, $testscriptdir . $dir . "/begin"); - foreach ( readdir(DIR) ) { - $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "begin/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); - } - closedir(DIR); - opendir(DIR, $testscriptdir . $dir . "/end"); - foreach (readdir(DIR)) { - $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "end/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); - } - closedir(DIR); - } - } - closedir(ROOT); - } - push @totest, "all" if(!$totest[0]); - - -## Backendtests: -# &runtests( -# ); - - -## Frontendtests: - if (!$showtests) { - foreach (@totest) { - &runtests( - $tests{$_}, - ); - } - } - elsif($showtests) { - printf "\tFollowing testscripts are present:\n\t%s\n","\xAF" x 34;; - foreach (sort(keys(%tests))) { - print "\t\t" . $_ ."\n" if( /^[A-Z].*$/ ); - } - printf "\n\t\%s\n\t%s\n","Be ensure, that usage is promitted by login and db status!","\xAF" x 58; - } -unlink("/tmp/lxtest-temp.conf"); - - -exit 1; \ No newline at end of file diff --git a/t/lxtest.conf.default b/t/lxtest.conf.default deleted file mode 100644 index d570cf54b..000000000 --- a/t/lxtest.conf.default +++ /dev/null @@ -1,55 +0,0 @@ -# This is the main configuration file for testing Lx-Office. -# The file t/lxtest.conf.default contains the configuration for -# testing the unstable trunk in the internet repository on -# https://lx-office.linet-services.de/svn-installationen/unstable/ -# Simply copy the file -# t/lxtest.conf.default to t/lxtest.conf -# If you like to test the unstable trunk of the repository, start -# perl t/lx-office.t . -# If you like to test your own Lx installation, customize the file -# t/lx-office.t for your own. -# Btw. a running Selenium server is required for testing Lx! -# See README for more informations. - -$lxtest = { - - # Lx location and user configuration: - # Please edit the following lines - # for testing a local installation - - lxbaseurl => 'https://lx-office.linet-services.de/svn-installationen/unstable/', - rpw => 'ro26F.eQBldoA', # root passwordhash! is only - # neccessary if you test a remote instalation - testlogin => 'seleniumtestuser',# will be extended with unix time - - - # Testdatabase configuration: - # Please edit the following lines - # for testing a local installation - # ATTENTION: Testdatabase will be deleted after testrun! - db => 'seleniumtestdatabase', - dbhost => 'localhost', - dbport => '5432', - dbuser => 'postgres', - dbpasswd => '', - dbdefault => 'template1', - - # Selenium preferences: - # Edit the selenium preferences for your system. - # A running Selenium server is required for testing Lx! - # See README for more informations. - seleniumhost => '192.168.1.10', # edit host of running selenium server - seleniumbrowser => '*chrome C:\Programme\Mozilla Firefox\firefox.exe', # edit the path - - seleniumport => '4444', - timeout => '30000', #timeout for waiting Page load in ms - timeoutlong => '60000', #timeout for waiting longer Page load in ms.... - - - #Lx defaults (usualy no need for editing) - rootlogin => "root login", - memberfile => "users/members", - - # Put your own setting for individual tests after here... - -}; diff --git a/t/old/README b/t/old/README new file mode 100644 index 000000000..d10dc334c --- /dev/null +++ b/t/old/README @@ -0,0 +1 @@ +Directory for automated test scripts. diff --git a/t/old/README.de b/t/old/README.de new file mode 100644 index 000000000..84b65dcaa --- /dev/null +++ b/t/old/README.de @@ -0,0 +1,142 @@ +Lx-Office Testumgebung + +Mit der hier beschriebenen Testumgebung ist es möglich, Lx Office +automatisiert zu testen. Automatische Tests haben den großen +Vorteil, das verschiedene Standardtests nicht immer wieder von +Hand durchgespielt werden müssen, sondern einmal in einem Skript +verschriftet immer wieder verwendet werden können. +Weitere Informationen können im Wiki nachgelesen und ergänzt werden: +http://wiki.lx-system.de/index.php/Automatisiertes_Testen_von_Modulen + + + +Aufbau der Testumgebung +Im Verzeichnis t/ finden sich alle testrelevanten Skripte.Der +Aufruf der Tests folgt über +#perl t/lx-office.t + +lx-office.t ruft alle Einzeltests der Reihe nach auf und fasst sie +übersichtlich zusammen. Die Einzeltests befinden sich in einem +Unterordner von t/. Jeder Unterorder enthält eine Datei AllTests.t, +die wiederrum alle einzelnen Tests des Unterordners aufruft. + + + +t/lxtest.conf t/lxtest.conf.default +Für die einzelnen Tests werden verschiedene Packetvariablen (globals) +zur Verfügung gestellt, um die Testskripte einfach auf +unterschiedliche Installationen anpassen zu können und um sich auf +die selbe Test-Datenbank und denselben Test-Benutzer beziehen zu können. + +Die Datei t/lxtest.conf.default muss zunächst nach t/lxtest.conf +kopiert werden. Dann ist die Datei t/lxtest.conf auf die lokalen +Gegebenheiten anzupassen. Besnders die für Selenium nötigen +Einstellungen bedürfen einer Überarbeitung. + +Definiert werden die Variablen in der Datei t/lxtest.conf. +Aufgerufen werden die Variablen $lxtest->{VARIABLE}. +Es ist ratsam, die vorhandenen Tests zu untersuchen, um sich ein Bild +von den Möglichkeiten zu machen. + + + +Selenium +Selenium ist eine Testsuite, mit der man Browserinteraktionen +simulieren und die Ergebnisse auswerten kann. Der unschlagbare +Vorteil von Selenium für das Testen von Lx ist es, dass es +möglich wird, eine Test-Datenbank in einfachen Schritten +erstellen zu können. Um Seleniumtests durchführen zu können, +ist es nötig, das Packet Selenium Remote Control (Selenium RC) +lokal zu installieren (Java Runtime ebenfalls erforderlich). +Selenium RC gibt es unter: +http://www.openqa.org/selenium-rc/ + +Für den Betrieb von Selenium ist eine lokale Workstation mit +Browserumgebung nötig. + +Der Aufruf von selenium erfolgt unter Windows bspw. so: +C:\java -jar "C:\selenium-remote-control-0.9.0 +\server\selenium-server.jar" + +Unter Linux bspw. so: + + +Die lokalen Einstellungen sind unbedingt in der +t/lxtest.conf nachzutragen! Weitere Infos unter +http://www.openqa.org/selenium-rc/ + +Dann reicht ein Start von +#perl t/lx-office.t +um dem Testskript bei der Arbeit zuzuschauen. + +Leider ist es nötig, auf dem Seleniumserver nach jedem Aufruf +des Testskripts das Sicherheitszertifikat von LINET Services zu +akzeptieren, was etwas nervig ist. + + +t/selenium/ +Der Ordner selenium beinhaltet alle einzelnen selenium Testskripte. +Aufgerufen werden die Skripte über t/selenium/AllTests.t . +Neue Tests müssen in dieser Datei angemeldet werden. +Ziel ist es eine Demodatenbank von Lx mit Daten zu füllen und die +Abhängigkeiten untereinander zu prüfen. Dazu sind die +individuellen Testskripte nummeriert (001NAME.t bis 999NAME.t) um +sie der Reihe nach abzuarbeiten. + +Die folgenden Skripte sind bereits installiert: + +001CreateTestDatabase.t Erzeugt eine neue Testdatenbank +002CreateTestUser.t Erzeugt einen neuen Testbenutzer +... +... +998DeleteTestUser.t Löscht den Testbenutzer +999DeleteTestDatabase.t Löscht die Testdatenbank + +Dazwischen befinden sich die Skripte, um eine Demodatenbank +aufzubauen und zu prüfen. + + + +t/backend/ +In diesem Ordner befinden sich Backend Testskripte. + + + +t/frontend/ +In diesem Ordner befinden sich Frontend Testskripte, die nicht +unter selenium getestet werden. + + + +Was wenn ein Test fehlschlägt? +Das Fehlschlagen von Tests kann verschiedene Gründe haben. +1. Der Test selbst ist fehlerhaft. +2. Es haben sich Lx Screens verändert, so das der Test von + falschen Voraussetzungen ausgeht +3. Die zu testende Funktion ist fehlerhaft + +Nachdem 1. und 2. ausgeschlossen wurden, sollte zu 3. ein Bugreport +angelegt werden. +Bugreports unter https://lx-office.linet-services.de/bugzilla/ +anlegen. + + + +Eigene Tests +Eigene testskripte können einfach in die Testumgebung eingebunden +werden. Die vorhandenen Skripte können als Anleitung dienen. +Bei Selenium Tests ist es am leichtesten, mit Firefox und der +Selenium IDE Extension Testpfade einfach aufzuzeichnen. +( http://www.openqa.org/selenium-ide/ ) +Dann werden die Selenium IDE Testaufzeichnungen in Perl +umgewandelt und angepasst. Fertige Skripte werden mit einer +laufenden Nummer versehen und in den Ordner t/selenium/ kopiert. +Dann wird das Skript in der Datei t/selenium/AllTests.t eingefügt. +Ein erster Probelauf mit +#perl t/selenium/AllTests.t sollte den Test absolvieren. +(Dabei kann es nötig sein, andere Tests auszukommentieren, weil +selenium Tests mitunter lange Laufzeiten haben können, oder weil die Demodatenbank +und der Benutzer am Ende zu Debugging Zwecken nicht gelöscht werden +sollen.) + + diff --git a/t/old/backend/README.backend b/t/old/backend/README.backend new file mode 100644 index 000000000..6d2b54e12 --- /dev/null +++ b/t/old/backend/README.backend @@ -0,0 +1,4 @@ +This folder contais the backend testscrips for Lx. +The Lx backend is the module libery under SL. +Backend tests don't need selenium, and are only able +to test local installations. diff --git a/t/old/demolx/AllTests.t b/t/old/demolx/AllTests.t new file mode 100644 index 000000000..aafd34667 --- /dev/null +++ b/t/old/demolx/AllTests.t @@ -0,0 +1,115 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2006 +# Web http://www.lx-office.org +# +#===================================================================== +# +# Author: Udo Spallek +# Email: udono@gmx.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# Selenium Main Caller +# Call all Selenium scripts from here. To use Selenium tests in +# Lx-Office you need to Install Selenium Remote Control. Take a look at +# the README Document for further informatinons on installing Selenium +# and testing Lx-Office and of course writing your own testcases. +# +####################################################################### + no strict; + push @INC, ['/t/selenium']; + use vars qw( $lxdebug $lxtest $sel ); + use strict; + use Carp; + + use Test::WWW::Selenium; + use Test::More; + use IO::Socket; + + eval { require('t/lxtest.conf'); }; + if ($@) { + diag("No test configuration found in t/lxtest.conf.\n + Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"); + exit 0; + }; + + sub server_is_running { + return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, + PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, + ); + } + if (server_is_running) { + plan tests => 204; # Need to be cutomized + } + else { + plan skip_all => "No selenium server found! " + ."Maybe you forgot to start it or " + ."the preferences in t/lxtest.conf doesen't fit to your system"; +# exit 0; + } + + diag('Pretests and initialisation'); + + + + $lxtest->{test_id} = time; # create individual ids by unixtime + $lxtest->{testuserlogin} = $lxtest->{testlogin} . $lxtest->{test_id}; + $lxtest->{testuserpasswd} = $lxtest->{test_id}; + $lxtest->{db} = $lxtest->{db} . $lxtest->{test_id}; + + ok(defined $lxtest->{rpw}, "Get root password"); + + ok(defined $lxtest->{dbhost}, "found dbhost in config"); + ok(defined $lxtest->{dbport}, "found dbport in config"); + ok(defined $lxtest->{dbuser}, "found dbuser in config"); + ok(defined $lxtest->{dbpasswd}, "found dbpasswd in config"); + + $lxtest->{lxadmin} = $lxtest->{lxbaseurl} . "admin.pl?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; + + + + + + eval { $sel = Test::WWW::Selenium->new( + host => $lxtest->{seleniumhost}, + port => $lxtest->{seleniumport}, + browser => $lxtest->{seleniumbrowser}, + browser_url => $lxtest->{lxadmin}, + auto_stop => '0', + ); + }; + if ($@) { + diag("No Selenium Server running, or wrong preferences\n\n"); + exit 0; + } + + ok(defined $sel, 'Creating Selenium Object'); + + diag('Starting Selenium tests...'); + + opendir(SCRIPTS, 't/selenium/testscripts'); + my @testscripts = sort readdir(SCRIPTS); + + foreach my $script (@testscripts){ + my $file = "t/selenium/testscripts/" . $script; + require_ok($file) if ( $script =~ /^\d\d\d.*\.t$/ ); + } + exit 1; + + $sel=''; # Destroy selenium object + + exit 1; + diff --git a/t/old/demolx/README b/t/old/demolx/README new file mode 100644 index 000000000..35ae59a71 --- /dev/null +++ b/t/old/demolx/README @@ -0,0 +1,7 @@ +This directory contains all selenium testscripts for lx-office. +Selenium testscrips are the prefered way to test the higher lx +functionalities. For the selenium tests you need to install and +run a local selenium server on a machine whitch is able to start +a browser session. See README for more informations. + + diff --git a/t/old/demolx/cleanup.pl b/t/old/demolx/cleanup.pl new file mode 100644 index 000000000..7e6bf6dea --- /dev/null +++ b/t/old/demolx/cleanup.pl @@ -0,0 +1,157 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2006 +# Web http://www.lx-office.org +# +#===================================================================== +# +# Author: Udo Spallek +# Email: udono@gmx.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# Selenium Cleanup Script +# To clean up all the messy databases and users while debugging testcases +# +####################################################################### + no strict; + push @INC, ['/t/selenium']; + use vars qw( $lxdebug $lxtest $sel ); + use strict; + use Carp; + + use WWW::Selenium; + use IO::Socket; + + my $cleanedupdb = ''; + my $cleanedupusers = ''; + + eval { require('t/lxtest.conf'); }; + if ($@) { + print "No test configuration found in t/lxtest.conf.\n + Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"; + exit 0; + }; + + sub server_is_running { + return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, + PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, + ); + } + if (server_is_running) { + } + else { + exit 0; + } + + $lxtest->{testuserlogin} = $lxtest->{testlogin}; + $lxtest->{db} = $lxtest->{db}; + + $lxtest->{lxadmin} = $lxtest->{lxbaseurl} . "admin.pl?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; + + eval { $sel = WWW::Selenium->new( + host => $lxtest->{seleniumhost}, + port => $lxtest->{seleniumport}, + browser => $lxtest->{seleniumbrowser}, + browser_url => $lxtest->{lxadmin}, + auto_stop => '0', + ); + }; + if ($@) { + print "No Selenium Server running, or wrong preferences\n\n"; + exit 0; + } + + + print "\nStarting Testdebugging Cleanup...\n"; + + +### Delete user + +$sel->start; +print "Cleanup all users '$lxtest->{testuserlogin}*'\n"; +$sel->open($lxtest->{lxadmin}); + +my @links= $sel->get_all_links(); +my $testuserlogin = $lxtest->{testuserlogin}; + +foreach my $link (@links) { + + if ($link =~ /$testuserlogin\d\d\d\d\d\d\d\d\d\d/){ + $sel->click("link=$lxtest->{testuserlogin}11*"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $cleanedupusers .= " $link\n"; + } +} + +print "Lock the system\n"; +$sel->click("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +$sel->wait_for_page_to_load($lxtest->{timeout}); + +print "Cleanup all test databasees: '$lxtest->{db}*'\n"; + + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->type("dbhost", $lxtest->{dbhost}); + $sel->type("dbport", $lxtest->{dbport}); + $sel->type("dbuser", $lxtest->{dbuser}); + $sel->type("dbpasswd", $lxtest->{dbpasswd}); + + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); + $sel->wait_for_page_to_load($lxtest->{timeoutlong}); + + my $field = $sel->get_body_text(); + my $database= $lxtest->{db}; + my @fields = split(' ', $field); + + + foreach my $field (@fields) { + + if ($field =~ /$database\d\d\d\d\d\d\d\d\d\d/){ + $sel->open($lxtest->{lxadmin}); + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->type("dbhost", $lxtest->{dbhost}); + $sel->type("dbport", $lxtest->{dbport}); + $sel->type("dbuser", $lxtest->{dbuser}); + $sel->type("dbpasswd", $lxtest->{dbpasswd}); + + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); + $sel->wait_for_page_to_load($lxtest->{timeoutlong}); + $sel->check("name=db value=$field"); + $sel->click("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); + $cleanedupdb .= " $field\n"; + + } + } + +$sel->open($lxtest->{lxadmin}); +print "Unlock the system\n"; + +$sel->click("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +$sel->wait_for_page_to_load($lxtest->{timeout}); + +$cleanedupdb = "none.\n" if ($cleanedupdb eq ''); +$cleanedupusers = "none.\n" if ($cleanedupusers eq ''); + +print "Ready. \nReport:\n--- Cleaned up Users:\n$cleanedupusers---Cleaned up Databases:\n$cleanedupdb"; + +$sel->stop; + +exit 1; + + diff --git a/t/old/demolx/testscripts/001CreateTestDatabase.t b/t/old/demolx/testscripts/001CreateTestDatabase.t new file mode 100644 index 000000000..cf0c2f6de --- /dev/null +++ b/t/old/demolx/testscripts/001CreateTestDatabase.t @@ -0,0 +1,37 @@ +### Create Database + +$sel->open_ok($lxtest->{lxadmin}); +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Lock the system'); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +diag("Create test database '$lxtest->{db}'"); +$sel->title_is("Lx-Office ERP Administration -"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP / Datenbankadministration -"); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbdefault", $lxtest->{dbdefault}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank anlegen\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); +$sel->type_ok("db", $lxtest->{db}); +$sel->select_ok("encoding", "label=ISO 8859-1"); +$sel->click_ok("//input[(\@name=\"chart\") and (\@value=\"Germany-DATEV-SKR03EU\")]"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Unlock the system'); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); diff --git a/t/old/demolx/testscripts/002CreateTestUser.t b/t/old/demolx/testscripts/002CreateTestUser.t new file mode 100644 index 000000000..aaf51d439 --- /dev/null +++ b/t/old/demolx/testscripts/002CreateTestUser.t @@ -0,0 +1,32 @@ + +### Create new user +diag("Create test user '$lxtest->{testuserlogin}'"); +$sel->open_ok($lxtest->{lxadmin}); +$sel->title_is("Lx-Office ERP Administration -"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration / Benutzer erfassen -"); +$sel->type_ok("login", $lxtest->{testuserlogin}); +$sel->type_ok("password", $lxtest->{testuserpasswd}); +$sel->type_ok("name", "Selenium"); +$sel->type_ok("email", "selenium\@lx-office.org"); +$sel->type_ok("signature", "Selenium Testuser"); +$sel->type_ok("tel", "0000"); +$sel->type_ok("fax", "1111"); +$sel->type_ok("company", "Sel-enium"); +$sel->type_ok("signature", "Selenium Testuser\nTestfirma"); +$sel->type_ok("address", "Testfirma"); +$sel->type_ok("steuernummer", "111-222-333-444"); +$sel->type_ok("co_ustid", "1234567"); +$sel->type_ok("duns", "0987654321"); +$sel->click_ok("dbdriver"); +$sel->type_ok("newtemplates", "seleniumtestuser"); +$sel->click_ok("menustyle"); +$sel->type_ok("Pg_dbhost", $lxtest->{dbhost}); +$sel->type_ok("Pg_dbname", $lxtest->{db}); +$sel->type_ok("Pg_dbport", $lxtest->{dbport}); +$sel->type_ok("Pg_dbuser", $lxtest->{dbuser}); +$sel->type_ok("Pg_dbpasswd", $lxtest->{dbpasswd}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); diff --git a/t/old/demolx/testscripts/005UpdateDatabase.t b/t/old/demolx/testscripts/005UpdateDatabase.t new file mode 100644 index 000000000..53a2e792a --- /dev/null +++ b/t/old/demolx/testscripts/005UpdateDatabase.t @@ -0,0 +1,62 @@ +### Update Database + +# NOTEST: some preruns for initializing missing parameters +$sel->open($lxtest->{lxadmin}); +$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->type("dbuser", $lxtest->{dbuser}); +$sel->type("dbpasswd", $lxtest->{dbpasswd}); +$sel->type("dbuser", $lxtest->{dbuser}); +$sel->type("dbhost", $lxtest->{dbhost}); +$sel->type("dbport", $lxtest->{dbport}); +$sel->type("dbdefault", $lxtest->{dbdefault}); +$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); +$sel->wait_for_page_to_load($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); + +my $count =0; + +while (){ # count the number of radiobuttons + eval { $sel->is_checked("//input[(\@id=\"$count\")]"); }; + if ( $@ ) { $count--; last; }; + $count++; +} + +#TEST: Now run the Tests + +$sel->open_ok($lxtest->{lxadmin}); +$sel->title_is("Lx-Office ERP Administration -"); + +#diag('Lock the system'); +#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +diag('Update the database'); + +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP / Datenbankadministration -"); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbdefault", $lxtest->{dbdefault}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); + +for (my $i=0; $i <= $count; $i++){ + $sel->uncheck_ok("//input[(\@id=\"$i\")]"); +} + +#$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]"); +$sel->check_ok("//input[\@name=\"db$lxtest->{db}\"]"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->title_like( qr/Lx-Office ERP Datenbankadministration/ ); + +#diag('Unlock the system'); +#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +#$sel->title_is("Lx-Office ERP Administration -"); + diff --git a/t/old/demolx/testscripts/K998DeleteTestUser.t b/t/old/demolx/testscripts/K998DeleteTestUser.t new file mode 100644 index 000000000..f0c430e82 --- /dev/null +++ b/t/old/demolx/testscripts/K998DeleteTestUser.t @@ -0,0 +1,9 @@ +### Delete user +diag("Delete test user '$lxtest->{testuserlogin}'"); +$sel->open_ok($lxtest->{lxadmin}); +$sel->title_is("Lx-Office ERP Administration -"); +$sel->click_ok("link=$lxtest->{testuserlogin}"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration / Benutzerdaten bearbeiten -"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); diff --git a/t/old/demolx/testscripts/K999DeleteTestDatabase.t b/t/old/demolx/testscripts/K999DeleteTestDatabase.t new file mode 100644 index 000000000..511fbd291 --- /dev/null +++ b/t/old/demolx/testscripts/K999DeleteTestDatabase.t @@ -0,0 +1,35 @@ +#### Delete database + + +$sel->open_ok($lxtest->{lxadmin}); +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Lock the system'); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +diag("Delete test database '$lxtest->{db}'"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP / Datenbankadministration -"); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank löschen -"); + +$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]"); + +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->body_text_is("Lx-Office ERP Datenbankadministration / Datenbank löschen $lxtest->{db} wurde erfolgreich gelöscht"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Unlock the system'); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); \ No newline at end of file diff --git a/t/old/demolx/testscripts/README b/t/old/demolx/testscripts/README new file mode 100644 index 000000000..70b4818d7 --- /dev/null +++ b/t/old/demolx/testscripts/README @@ -0,0 +1,2 @@ +All Selenium testscripts can be found here. The tests will be included +sequential from 001 to 999. \ No newline at end of file diff --git a/t/old/frontend/README.frontend b/t/old/frontend/README.frontend new file mode 100644 index 000000000..511b932ee --- /dev/null +++ b/t/old/frontend/README.frontend @@ -0,0 +1,10 @@ +This folder contais the frontend testscrips for Lx. +The Lx frontend are all perl scripts under bin/* . +The frontend tests don't need selenium! They should +use the commandline API of Lx. Frontend tests in this +directory are only for testing local Lx installations. + +If you like to test the HTML screens in different +Browsers, it would be better to use the selenium +environment under t/selenium. + diff --git a/t/old/lx-office.t b/t/old/lx-office.t new file mode 100644 index 000000000..ee52ab5c0 --- /dev/null +++ b/t/old/lx-office.t @@ -0,0 +1,181 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2006/2007 +# Web http://www.lx-office.org +# +#===================================================================== +# +# Author: Udo Spallek, Thomas Kasulke +# Email: udono@gmx.net, tkasulke@linet-services.de +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# Main Test Module: +# For collecting all the tests in nice Test::Harness environment. +# Study the README for Selenium Installation and testing process +# and enjoy starting +# #perl t/lx-office.t +# against the unstable release +#====================================================================== + + use warnings FATAL => 'all'; + use diagnostics; + use Carp; + use Test::Harness; + + my %tests = ("all" => 't/selenium/TestAllTests.t', + "system" => 't/selenium/TestSystem.t', + "selling" => 't/selenium/TestSelling.t', + "masterdata" => 't/selenium/TestMasterData.t', + "testbed" => 't/selenium/TestCreateTestbed.t', + "admin" => 't/selenium/TestAdmin.t', + "accounting" => 't/selenium/TestAccounting.t', + "payments" => 't/selenium/TestPayments.t', + "printing" => 't/selenium/TestPrinting.t', + "programm" => 't/selenium/TestProgramm.t', + "reports" => 't/selenium/TestReports.t' ); + my $showtests = 0; + my $singletest = 0; + my $nodb = 0; + my @totest; + + eval { require('t/lxtest.conf'); }; + my %lxtest = %{ $lxtest } if ($lxtest); + + sub usage + { + print "\n$0 --- creates testscenarios while using Selenium testcases for Lx-Office\n"; + printf "\t\tusage: perl [PERLOPTIONS] $0 [--help] [OPTIONS] [ARGUMENTS]\n\t\t%s\n", "\xAF" x 6; + print "\t\t --help\t\tshow this usage\n\n"; + printf "\t\toptions:\n\t\t%s\n", "\xAF" x 8; + print "\t\t -masterdata\tonly runs testscripts for \"masterdata\"\n"; + print "\t\t -accounting\tonly runs testscripts for \"accounting\"\n"; + print "\t\t -system\tonly runs testscripts for \"system\"\n"; + print "\t\t -payments\tonly runs testscripts for \"payments\"\n"; + print "\t\t -programm\tonly runs testscripts for \"programm\"\n"; + print "\t\t -printing\tonly runs testscripts for \"printing\"\n"; + print "\t\t -reports\tonly runs testscripts for \"reports\"\n"; + print "\t\t -selling\tonly runs testscripts for \"selling\"\n"; + print "\t\t -purchase\tonly runs testscripts for \"purchase\"\n"; + print "\t\t -admin\tonly runs testscripts for \"administration\"\n"; + print "\t\t -testbed\tcreates a standardized test database\n"; + print "\t\t -nodb\t\tdoesn't create a db! Only use with \n\t\t\t\t--username, --userpasswd, --dbname, --dbport, --dbhost, --dbuser, --dbpasswd, --rootpasswd arguments!\n"; + print "\t\t -showtests\tfinally shows all tests available only\n"; + print "\t\t -singletest\toption flag for using single tests shown in \"-showtests\"\n"; + printf "\n\t\targuments:\n\t\t%s\n","\xAF" x 10; + print "\t\t --test=\tname of Test shown in showtests seperated by , (Only joined by -singletest)\n"; + print "\t\t --username=\tuser login name\n"; + print "\t\t --userpasswd=\tuser login password\n"; + print "\t\t --dbname=\tname of used db (leave empty whether dbname is seleniumtestdatabase)\n"; + print "\t\t --dbport=\tport of used db (leave empty whether port is 5432)\n"; + print "\t\t --dbhost=\thost of used db (leave empty whether host is localhost [127.0.0.1])\n"; + print "\t\t --dbuser=\tdb username (leave empty whether name is postgres)\n"; + print "\t\t --dbpasswd=\tthe password for used db (leave empty while none)\n"; + print "\t\t --rootpasswd=\troot password for admin.pl login\n"; + printf "\t\t NOTE: Configuration in lxtest.conf will be temporaly overwritten by using this arguments!\n\t\t %s\n", "\xAF" x 6; + exit; + } + + while ( $#ARGV>=0 ) + { + $_ = $ARGV[0]; + + if ( /^--help$/ ) { usage; last } + elsif ( /^-showtests$/) { $showtests = 1; shift; next } + elsif ( /^-nodb$/ ) { $nodb = 1; shift; next } + elsif ( /^-(masterdata)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(system)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(selling)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(testbed)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(payments)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(admin)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(printing)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(reports)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(accounting)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(programm)$/ ) { push @totest, $1; shift; next } + elsif ( /^-singletest$/ ) { $singletest = 1; shift; next } + elsif ( /^--username=(.*)$/ ) { $lxtest{testuserlogin} = $1; shift; next } + elsif ( /^--userpasswd=(.*)$/ ) { $lxtest{testuserpasswd} = $1; shift; next } + elsif ( /^--dbname=(.*)$/ ) { $lxtest{db} = $1; shift; next } + elsif ( /^--dbport=(.*)$/ ) { $lxtest{dbport} = $1; shift; next } + elsif ( /^--dbhost=(.*)$/ ) { $lxtest{dbhost} = $1; shift; next } + elsif ( /^--dbuser=(.*)$/ ) { $lxtest{dbuser} = $1; shift; next } + elsif ( /^--dbpasswd=(.*)$/ ) { $lxtest{dbpasswd} = $1; shift; next } + elsif ( /^--rootpasswd=(.*)$/ ) { $lxtest{rpw} = $1; shift; next } + elsif ( /^--test=(.*)$/ ) { foreach (split(/\,/, $1)) { push @totest, $_; } shift; next } + elsif ( /^([A-Z].*)$/ ) { push @totest, shift; next } + else { + print STDERR "$0: ERROR: unrecognized option '$_' ?\n"; + usage; + } + last; + } + unlink("/tmp/lxtest-temp.conf") if (-f "/tmp/lxtest-temp.conf"); + open TEMPCONF, "+>/tmp/lxtest-temp.conf"; + print TEMPCONF '$lxtest = {'."\n"; + foreach (keys(%lxtest)) { + print TEMPCONF '"' . $_ . '" => "' . $lxtest{$_} . "\",\n"; + } + print TEMPCONF '};'; + close TEMPCONF; + + if($singletest || $showtests) { + my $testscriptdir = 't/selenium/testscripts/'; + opendir(ROOT, $testscriptdir); + foreach my $dir ( readdir( ROOT ) ) { + if(-d $testscriptdir . $dir && $dir ne "begin" && $dir ne "end" && $dir ne "..") { + opendir(DIR, $testscriptdir . $dir . "/begin"); + foreach ( readdir(DIR) ) { + $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "begin/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); + } + closedir(DIR); + opendir(DIR, $testscriptdir . $dir . "/end"); + foreach (readdir(DIR)) { + $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "end/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); + } + closedir(DIR); + } + } + closedir(ROOT); + } + push @totest, "all" if(!$totest[0]); + + +## Backendtests: +# &runtests( +# ); + + +## Frontendtests: + if (!$showtests) { + foreach (@totest) { + &runtests( + $tests{$_}, + ); + } + } + elsif($showtests) { + printf "\tFollowing testscripts are present:\n\t%s\n","\xAF" x 34;; + foreach (sort(keys(%tests))) { + print "\t\t" . $_ ."\n" if( /^[A-Z].*$/ ); + } + printf "\n\t\%s\n\t%s\n","Be ensure, that usage is promitted by login and db status!","\xAF" x 58; + } +unlink("/tmp/lxtest-temp.conf"); + + +exit 1; \ No newline at end of file diff --git a/t/old/lxtest.conf.default b/t/old/lxtest.conf.default new file mode 100644 index 000000000..d570cf54b --- /dev/null +++ b/t/old/lxtest.conf.default @@ -0,0 +1,55 @@ +# This is the main configuration file for testing Lx-Office. +# The file t/lxtest.conf.default contains the configuration for +# testing the unstable trunk in the internet repository on +# https://lx-office.linet-services.de/svn-installationen/unstable/ +# Simply copy the file +# t/lxtest.conf.default to t/lxtest.conf +# If you like to test the unstable trunk of the repository, start +# perl t/lx-office.t . +# If you like to test your own Lx installation, customize the file +# t/lx-office.t for your own. +# Btw. a running Selenium server is required for testing Lx! +# See README for more informations. + +$lxtest = { + + # Lx location and user configuration: + # Please edit the following lines + # for testing a local installation + + lxbaseurl => 'https://lx-office.linet-services.de/svn-installationen/unstable/', + rpw => 'ro26F.eQBldoA', # root passwordhash! is only + # neccessary if you test a remote instalation + testlogin => 'seleniumtestuser',# will be extended with unix time + + + # Testdatabase configuration: + # Please edit the following lines + # for testing a local installation + # ATTENTION: Testdatabase will be deleted after testrun! + db => 'seleniumtestdatabase', + dbhost => 'localhost', + dbport => '5432', + dbuser => 'postgres', + dbpasswd => '', + dbdefault => 'template1', + + # Selenium preferences: + # Edit the selenium preferences for your system. + # A running Selenium server is required for testing Lx! + # See README for more informations. + seleniumhost => '192.168.1.10', # edit host of running selenium server + seleniumbrowser => '*chrome C:\Programme\Mozilla Firefox\firefox.exe', # edit the path + + seleniumport => '4444', + timeout => '30000', #timeout for waiting Page load in ms + timeoutlong => '60000', #timeout for waiting longer Page load in ms.... + + + #Lx defaults (usualy no need for editing) + rootlogin => "root login", + memberfile => "users/members", + + # Put your own setting for individual tests after here... + +}; diff --git a/t/old/selenium/AllTests.t b/t/old/selenium/AllTests.t new file mode 100644 index 000000000..c5ebf1d19 --- /dev/null +++ b/t/old/selenium/AllTests.t @@ -0,0 +1,153 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2006/2007 +# Web http://www.lx-office.org +# +#===================================================================== +# +# Author: Udo Spallek, Thomas Kasulke +# Email: udono@gmx.net, tkasulke@linet-services.de +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# Selenium Main Caller +# Call all Selenium scripts from here. To use Selenium tests in +# Lx-Office you need to Install Selenium Remote Control. Take a look at +# the README Document for further informatinons on installing Selenium +# and testing Lx-Office and of course writing your own testcases. +# +####################################################################### + no strict; + push @INC, ['/t/selenium', \&init_server]; + use vars qw( $lxdebug $lxtest $sel ); + use strict; + use Carp; + + use Test::WWW::Selenium; + use Test::More qw(no_plan); + use IO::Socket; + + if(-f "/tmp/lxtest-temp.conf") { + eval { require('/tmp/lxtest-temp.conf'); }; + } + else { + eval { require('t/lxtest.conf'); }; + } + if ($@) { + diag("No test configuration found in t/lxtest.conf.\n + Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"); + exit 0; + } + + sub server_is_running { + return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, + PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, + ); + } + +# if (server_is_running) { +# plan tests => 200; # Need to be cutomized +# } + sub init_server { + my $singlefileonly = 0; + if ($_[0] eq "singlefileonly") { + $singlefileonly = 1; + shift; + } + if(!server_is_running) { + print "No selenium server found! " + ."Maybe you forgot to start it or " + ."the preferences in t/lxtest.conf doesen't fit to your system"; + exit 0; + } + + diag('Pretests and initialisation'); + + + + $lxtest->{test_id} = time; # create individual ids by unixtime + $lxtest->{testuserlogin} = $lxtest->{testlogin} . $lxtest->{test_id} if(!$lxtest->{testuserlogin}); + $lxtest->{testuserpasswd} = $lxtest->{test_id} if(!$lxtest->{testuserpasswd}); + $lxtest->{db} = $lxtest->{db} . $lxtest->{test_id} if(!($lxtest->{db} =~ /^seleniumtestdatabase[0-9]{10}$/)); + + ok(defined $lxtest->{rpw}, "Get root password"); + + ok(defined $lxtest->{dbhost}, "found dbhost in config"); + ok(defined $lxtest->{dbport}, "found dbport in config"); + ok(defined $lxtest->{dbuser}, "found dbuser in config"); + ok(defined $lxtest->{dbpasswd}, "found dbpasswd in config"); + + $lxtest->{lxadmin_url} = $lxtest->{lxbaseurl} . "admin.pl"; + $lxtest->{lxadmin_with_get} = $lxtest->{lxadmin_url} . "?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; + $lxtest->{lxadmin} = $lxtest->{lxadmin_url} . "?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; + + + + + eval { $sel = Test::WWW::Selenium->new( + host => $lxtest->{seleniumhost}, + port => $lxtest->{seleniumport}, + browser => $lxtest->{seleniumbrowser}, + browser_url => $lxtest->{lxadmin}, + auto_stop => '0', + ); + }; + if ($@) { + diag("No Selenium Server running, or wrong preferences\n\n"); + exit 0; + } + + ok(defined $sel, 'Creating Selenium Object'); + + diag('Starting Selenium tests...'); + + if(!$singlefileonly) { + foreach my $scriptdir (@_) { + opendir(SCRIPTS, 't/selenium/testscripts/' . $scriptdir) or die "Can't open directory!" . $!; + foreach (sort readdir(SCRIPTS)) { + if ( $_ =~ /^\w\d\d\d.*\.t$|^\d\d\d.*\.t$/ && !$sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_}) { + require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_); + $sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_} = 1; + } + } + closedir(SCRIPTS); + } + } + else { + foreach (@_) { + if ( $_ =~ /^.*\/\w\d\d\d.*\.t$|^.*\/\d\d\d.*\.t$/ && !$sel->{ran_tests}{$_}) { + require_ok($_); + $sel->{ran_tests}{$_} = 1; + } + } + } + if($!) { + @! = ("Test fehlgeschlagen!"); + } + $sel->stop(); + } + + sub start_login() { + require "t/selenium/testscripts/base/000Login.t" if(!$sel->{_page_opened}); + skip("Failed page to load pages!",) if(!$sel->{_page_opened}); + + if($sel->get_title() ne "Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}){ + require "t/selenium/testscripts/base/000Login.t"; + } + + $sel->select_frame_ok("relative=up"); + } + +1; diff --git a/t/old/selenium/README b/t/old/selenium/README new file mode 100644 index 000000000..35ae59a71 --- /dev/null +++ b/t/old/selenium/README @@ -0,0 +1,7 @@ +This directory contains all selenium testscripts for lx-office. +Selenium testscrips are the prefered way to test the higher lx +functionalities. For the selenium tests you need to install and +run a local selenium server on a machine whitch is able to start +a browser session. See README for more informations. + + diff --git a/t/old/selenium/TestAccounting.t b/t/old/selenium/TestAccounting.t new file mode 100644 index 000000000..ea1ebd343 --- /dev/null +++ b/t/old/selenium/TestAccounting.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("accounting/begin", "accounting/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestAdmin.t b/t/old/selenium/TestAdmin.t new file mode 100644 index 000000000..130f6cc04 --- /dev/null +++ b/t/old/selenium/TestAdmin.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("administration/begin", "administration/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestAllTests.t b/t/old/selenium/TestAllTests.t new file mode 100644 index 000000000..442563820 --- /dev/null +++ b/t/old/selenium/TestAllTests.t @@ -0,0 +1,8 @@ +require "t/selenium/AllTests.t"; + +init_server("administration/begin", "system/begin", "masterdata/begin", "selling/begin", "purchase/begin", + "accounting/begin", "payments/begin", "reports/begin", "programm/begin", + "programm/end", "reports/end", "payments/end", "accounting/end", "purchase/end", "selling/end", + "masterdata/end", "system/end", "administration/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestCreateTestbed.t b/t/old/selenium/TestCreateTestbed.t new file mode 100644 index 000000000..012ce9bdf --- /dev/null +++ b/t/old/selenium/TestCreateTestbed.t @@ -0,0 +1,8 @@ +require "t/selenium/AllTests.t"; + +init_server("administration/begin", "system/begin", "masterdata/begin"); + +diag("\n\nUsername: " . $lxtest->{testuserlogin} . "\n" . "Password: " . $lxtest->{testuserpasswd} . "\n\n"); + +1; + diff --git a/t/old/selenium/TestMasterData.t b/t/old/selenium/TestMasterData.t new file mode 100644 index 000000000..86c43a882 --- /dev/null +++ b/t/old/selenium/TestMasterData.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("masterdata/begin", "masterdata/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestPayments.t b/t/old/selenium/TestPayments.t new file mode 100644 index 000000000..2e2a8d5ac --- /dev/null +++ b/t/old/selenium/TestPayments.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("payments/begin", "payments/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestPrinting.t b/t/old/selenium/TestPrinting.t new file mode 100644 index 000000000..75b9851d2 --- /dev/null +++ b/t/old/selenium/TestPrinting.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("printing/begin", "printing/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestProgramm.t b/t/old/selenium/TestProgramm.t new file mode 100644 index 000000000..dffb6a306 --- /dev/null +++ b/t/old/selenium/TestProgramm.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("programm/begin", "programm/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestPurchase.t b/t/old/selenium/TestPurchase.t new file mode 100644 index 000000000..19cdf560a --- /dev/null +++ b/t/old/selenium/TestPurchase.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("purchase/begin", "purchase/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestReports.t b/t/old/selenium/TestReports.t new file mode 100644 index 000000000..1f935a36d --- /dev/null +++ b/t/old/selenium/TestReports.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("reports/begin", "reports/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestSelling.t b/t/old/selenium/TestSelling.t new file mode 100644 index 000000000..ca31eccec --- /dev/null +++ b/t/old/selenium/TestSelling.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("selling/begin", "selling/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/TestSystem.t b/t/old/selenium/TestSystem.t new file mode 100644 index 000000000..6dee18cf8 --- /dev/null +++ b/t/old/selenium/TestSystem.t @@ -0,0 +1,5 @@ +require "t/selenium/AllTests.t"; + +init_server("system/begin", "system/end"); + +1; \ No newline at end of file diff --git a/t/old/selenium/cleanup.pl b/t/old/selenium/cleanup.pl new file mode 100644 index 000000000..7e6bf6dea --- /dev/null +++ b/t/old/selenium/cleanup.pl @@ -0,0 +1,157 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2006 +# Web http://www.lx-office.org +# +#===================================================================== +# +# Author: Udo Spallek +# Email: udono@gmx.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# Selenium Cleanup Script +# To clean up all the messy databases and users while debugging testcases +# +####################################################################### + no strict; + push @INC, ['/t/selenium']; + use vars qw( $lxdebug $lxtest $sel ); + use strict; + use Carp; + + use WWW::Selenium; + use IO::Socket; + + my $cleanedupdb = ''; + my $cleanedupusers = ''; + + eval { require('t/lxtest.conf'); }; + if ($@) { + print "No test configuration found in t/lxtest.conf.\n + Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"; + exit 0; + }; + + sub server_is_running { + return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, + PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, + ); + } + if (server_is_running) { + } + else { + exit 0; + } + + $lxtest->{testuserlogin} = $lxtest->{testlogin}; + $lxtest->{db} = $lxtest->{db}; + + $lxtest->{lxadmin} = $lxtest->{lxbaseurl} . "admin.pl?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; + + eval { $sel = WWW::Selenium->new( + host => $lxtest->{seleniumhost}, + port => $lxtest->{seleniumport}, + browser => $lxtest->{seleniumbrowser}, + browser_url => $lxtest->{lxadmin}, + auto_stop => '0', + ); + }; + if ($@) { + print "No Selenium Server running, or wrong preferences\n\n"; + exit 0; + } + + + print "\nStarting Testdebugging Cleanup...\n"; + + +### Delete user + +$sel->start; +print "Cleanup all users '$lxtest->{testuserlogin}*'\n"; +$sel->open($lxtest->{lxadmin}); + +my @links= $sel->get_all_links(); +my $testuserlogin = $lxtest->{testuserlogin}; + +foreach my $link (@links) { + + if ($link =~ /$testuserlogin\d\d\d\d\d\d\d\d\d\d/){ + $sel->click("link=$lxtest->{testuserlogin}11*"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $cleanedupusers .= " $link\n"; + } +} + +print "Lock the system\n"; +$sel->click("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +$sel->wait_for_page_to_load($lxtest->{timeout}); + +print "Cleanup all test databasees: '$lxtest->{db}*'\n"; + + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->type("dbhost", $lxtest->{dbhost}); + $sel->type("dbport", $lxtest->{dbport}); + $sel->type("dbuser", $lxtest->{dbuser}); + $sel->type("dbpasswd", $lxtest->{dbpasswd}); + + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); + $sel->wait_for_page_to_load($lxtest->{timeoutlong}); + + my $field = $sel->get_body_text(); + my $database= $lxtest->{db}; + my @fields = split(' ', $field); + + + foreach my $field (@fields) { + + if ($field =~ /$database\d\d\d\d\d\d\d\d\d\d/){ + $sel->open($lxtest->{lxadmin}); + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->type("dbhost", $lxtest->{dbhost}); + $sel->type("dbport", $lxtest->{dbport}); + $sel->type("dbuser", $lxtest->{dbuser}); + $sel->type("dbpasswd", $lxtest->{dbpasswd}); + + $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); + $sel->wait_for_page_to_load($lxtest->{timeoutlong}); + $sel->check("name=db value=$field"); + $sel->click("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); + $cleanedupdb .= " $field\n"; + + } + } + +$sel->open($lxtest->{lxadmin}); +print "Unlock the system\n"; + +$sel->click("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +$sel->wait_for_page_to_load($lxtest->{timeout}); + +$cleanedupdb = "none.\n" if ($cleanedupdb eq ''); +$cleanedupusers = "none.\n" if ($cleanedupusers eq ''); + +print "Ready. \nReport:\n--- Cleaned up Users:\n$cleanedupusers---Cleaned up Databases:\n$cleanedupdb"; + +$sel->stop; + +exit 1; + + diff --git a/t/old/selenium/incomming/ustva-Inland-linet.html b/t/old/selenium/incomming/ustva-Inland-linet.html new file mode 100644 index 000000000..c8e12bedd --- /dev/null +++ b/t/old/selenium/incomming/ustva-Inland-linet.html @@ -0,0 +1,3073 @@ + + + +ustva-Inland-linet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ustva-Inland-linet
break
setTimeout120000
selectFramerelative=top
openhttps://lx-office.linet-services.de/svn-installationen/unstable/admin.pl?path=bin/mozilla/&rpw=roXyrPyqv9wE2&nextsub=list_users&action=Weiter
assertTitleLx-Office ERP Administration -
clickAndWaitdocument.forms[0].action[2]
assertTitleLx-Office ERP / Datenbankadministration -
selectWindownull
clickAndWaitaction
assertTitleLx-Office ERP Datenbankadministration / Datenbank anlegen -
typedbSelenium_Testdb-_SKR03_IST_1619_2006_2007
clickdocument.forms[0].chart[2]
clickAndWaitaction
clickAndWaitaction
clickAndWaitlink=demo-1619
assertTitleLx-Office ERP Administration / Benutzerdaten bearbeiten -
typedbnameSelenium_Testdb-_SKR03_IST_1619_2006_2007
clickAndWaitaction
assertTitleLx-Office ERP Administration -
typelogindemo-1619
typepassworddemo
clickAndWaitdocument.forms[1].action
assertTitleDatenbankaktualisierung*
clickAndWait//input[@value='Weiter']
assertTitleLx-Office Version*
selectFramerelative=top
clicklink=Kunde erfassen
selectFramemain_window
waitForPageToLoad120000
typenameTestkunde
clickAndWaitaction
selectFramerelative=top
clicklink=Lieferant erfassen
selectFramemain_window
waitForPageToLoad120000
typenameTestlieferant
clickAndWaitaction
selectFramerelative=top
clicklink=Ware erfassen
selectFramemain_window
waitForPageToLoad120000
typepartnumber100-7%
typedescriptionTestware 7%
selectbuchungsgruppen_idlabel=Standard 7%
typelastcost50
typesellprice100
clickAndWaitdocument.ic.action[1]
selectFramerelative=top
clicklink=Ware erfassen
selectFramemain_window
waitForPageToLoad120000
typepartnumber1
typedescriptionTestware 16%/19%
selectbuchungsgruppen_idlabel=Standard 16%/19%
typelastcost50
typesellprice100
clickAndWaitdocument.ic.action[1]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber1
typepartnumber_11
typeinvdate1.3.2007
typedatepaid_110.3.2007
typesource_11
typememo_11
typepaid_1119
clickAndWaitdocument.invoice.action[6]
clickndx
clickAndWaitaction
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber2
typeinvdate11.11.2006
typedatepaid_120.11.2006
typepartnumber_11
typesource_14
typememo_14
typepaid_1116
clickAndWaitdocument.invoice.action[6]
clickndx
clickAndWaitaction
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber3
typeinvdate03.12.2006
typeduedate10.12.2006
typepartnumber_11
clickAndWaitupdate_button
clickndx
clickAndWaitaction
assertTextPresentUmsatzsteuer
assertTextPresent16,00
typedeliverydate15.12.2006
clickAndWaitupdate_button
assertTextPresentUmsatzsteuer
assertTextPresent16,00
typedatepaid_120.12.2006
typesource_14
typememo_14
typepaid_1116
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber4
typeinvdate8.08.2006
typedeliverydate10.09.2006
typepartnumber_11
clickAndWaitupdate_button
clickndx
clickAndWaitaction
assertText//td[3]/table/tbody/tr[2]/td16,00
typedatepaid_12.2.2007
typesource_17
typememo_17
typepaid_1116
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber5
typeinvdate10.06.2006
typedeliverydate13.1.2007
typepartnumber_11
typedatepaid_112.7.2006
typesource_145
typememo_144
typepaid_1119
clickAndWaitdocument.invoice.action[6]
clickndx
clickAndWaitaction
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Dialogbuchen
selectFramemain_window
waitForPageToLoad120000
selectaccno_1label=1588--Bezahlte Einfuhrumsatzsteuer
selectaccno_2label=1200--Bank
typereferenceTest 1588 Kz62
typedescriptionTest 1588 Kz62
typetransdate1.10.2005
typedebit_1143,2455
typecredit_2143,2455
clickAndWaitaction
clickAndWaitdocument.gl.action[1]
waitForTextPresentgespeichert
selectFramerelative=top
clicklink=Debitorenbuchung
selectFramemain_window
waitForPageToLoad120000
selectAR_amount_1label=8400--Erlöse 16%/19% USt.
typeamount_12000
clickAndWaitaction
typetransdate19.2.2007
clickAndWaitaction
typedatepaid_11.4.2007
typesource_12
typememo_12
typepaid_12000
selectAR_paid_1label=1200--Bank
typeinvnumberDebitorenbuchung
clickAndWaitdocument.arledger.action[1]
selectFramerelative=top
clicklink=Kreditorenbuchung
selectFramemain_window
waitForPageToLoad120000
selectAP_amount_1label=0420--Büroeinrichtung
typeinvnumberKreditorenbuchung
typeamount_12000
clickAndWaitaction
typetransdate20.05.2007
typedatepaid_11.6.2007
typesource_1123
typememo_1123
typepaid_11000
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber9-7%
typeinvdate1.1.2008
typedeliverydate3.1.2008
typepartnumber_1100-7%
typedatepaid_110.1.2008
typesource_145
typememo_144
typepaid_1107
clickAndWaitupdate_button
selectWindowmain_window
assertText//td[3]/table/tbody/tr[2]/td7,00
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber120
typeinvdate1.1.2005
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber130
typeinvdate1.1.2006
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber131
typeinvdate1.2.2006
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber132
typeinvdate1.3.2006
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Konto erfassen
selectFramemain_window
waitForPageToLoad120000
typeaccno1775Skonto
typedescriptionUmsatzsteuerkorrektur 16% bei Skonto
selectAccountTypelabel=Aufwandskonto (E)
clickAR_paid
clickAR_tax
clickAndWaitaction
waitForPageToLoad120000
clickAndWaitlink=1775Skonto
typetaxkey_startdate_01.1.1970
selecttaxkey_pos_ustva_0label=511
clickAndWaitaction
waitForPageToLoad120000
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber14-3%-SKONTO
typeinvdate1.2.2003
typedeliverydate3.2.2003
typepartnumber_11
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clicktaxincluded
typesellprice_11431,79
clickAndWaitupdate_button
typedatepaid_104.02.2003
typesource_112345
typepaid_11388,84
selectAR_paid_1label=1200--Bank
clickAndWaitupdate_button
typedatepaid_204.02.2003
typesource_212345
typepaid_237,03
selectAR_paid_2label=8735--Gewährte Skonti 16%/19% USt.
clickAndWaitupdate_button
typedatepaid_304.02.2003
typesource_312345
typememo_3Skontokorrektur UST 16%
typepaid_35,92
selectAR_paid_3label=1775Skonto--Umsatzsteuerkorrektur 16% bei Skonto
clickAndWaitupdate_button
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=UStVa Einstellungen
selectFramemain_window
waitForPageToLoad120000
selectelsterland_newlabel=Nordrhein Westfalen
selectelsterFFFF_newlabel=Aachen-Innenstadt (5201)
clickcash
clickmonth
clickAndWaitaction
selectpart_1_1label=1
selectpart_1_2label=2
selectpart_1_3label=3
selectpart_1_4label=4
selectpart_2_1label=5
selectpart_2_2label=6
selectpart_2_3label=7
selectpart_2_4label=8
clickAndWaitdocument.elsterform.action[1]
selectFramerelative=up
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=März
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=November
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Dezember
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Februar
clickAndWaitaction
assertText//tr[11]/td[2]35
assertText//tr[11]/td[3]100
assertText//tr[11]/td[4]36
assertText//tr[11]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Juli
clickAndWaitaction
assertText//tr[11]/td[2]35
assertText//tr[11]/td[3]100
assertText//tr[11]/td[4]36
assertText//tr[11]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2005
selectzeitraumlabel=Oktober
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[39]/td[2]62
assertText//tr[39]/td[3]143,25
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=April
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]1681
assertText//tr[9]/td[5]319,33
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Mai
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[37]/td[3]319,33
assertText//tr[37]/td[2](Spalte 66)
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2008
selectzeitraumlabel=Januar
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[10]/td[2](Spalte 86)
assertText//tr[10]/td[3]100
assertText//tr[10]/td[5]7,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2005
selectzeitraumlabel=Januar
clickAndWaitaction
selectFramerelative=top
selectFramemain_window
assertText//tr[37]/td[3]8,00
assertText//tr[37]/td[2](Spalte 66)
selectFramerelative=up
clicklink=UStVa
waitForPageToLoad120000
selectFramemain_window
selectyearlabel=2003
selectzeitraumlabel=Februar
clickAndWaitaction
selectFramerelative=top
selectFramemain_window
assertText//tr[9]/td[3]1197
assertText//tr[9]/td[5]191,57
selectFramerelative=top
clicklink=UStVa Einstellungen
selectFramemain_window
waitForPageToLoad120000
clickaccrual
clickmonth
clickAndWaitaction
selectpart_1_1label=1
selectpart_1_2label=2
selectpart_1_3label=3
selectpart_1_4label=4
selectpart_2_1label=5
selectpart_2_2label=6
selectpart_2_3label=7
selectpart_2_4label=8
clickAndWaitdocument.elsterform.action[1]
selectFramerelative=up
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=März
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=November
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Dezember
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=August
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[4](Spalte 51 rechts)
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Juni
clickAndWaitaction
assertText//tr[11]/td[2]35
assertText//tr[11]/td[3]100
assertText//tr[11]/td[4]36
assertText//tr[11]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2005
selectzeitraumlabel=Oktober
clickAndWaitaction
assertText//tr[39]/td[2]62
assertText//tr[39]/td[3]143,25
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Februar
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]1681
assertText//tr[9]/td[5]319,33
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Mai
clickAndWaitaction
assertText//tr[37]/td[3]319,33
assertText//tr[37]/td[2](Spalte 66)
selectFramerelative=up
clicklink=UStVa
waitForPageToLoad120000
selectFramemain_window
selectyearlabel=2003
selectzeitraumlabel=Februar
clickAndWaitaction
selectFramerelative=top
selectFramemain_window
assertText//tr[9]/td[3]1197
assertText//tr[9]/td[5]191,57
breakSet the Startpoint to the next command manually
selectFramerelative=top
openhttps://lx-office.linet-services.de/svn-installationen/unstable/admin.pl?path=bin/mozilla/&rpw=roXyrPyqv9wE2&nextsub=list_users&action=Weiter
assertTitleLx-Office ERP Administration -
clickAndWaitlink=demo-1619
typedbnameleer
assertTitleLx-Office ERP Administration / Benutzerdaten bearbeiten -
clickAndWaitdocument.forms[0].action[0]
clickAndWaitdocument.forms[0].action[2]
assertTitleLx-Office ERP / Datenbankadministration -
clickAndWaitdocument.forms[0].action[2]
assertTitleLx-Office ERP Datenbankadministration / Datenbank löschen -
selectdblabel=Selenium_Testdb-_SKR03_IST_1619_2006_2007
clickAndWaitaction
assertTitleLx-Office ERP Datenbankadministration / Datenbank löschen -
clickAndWaitaction
assertTitleLx-Office ERP Administration -
+ + diff --git a/t/old/selenium/testscripts/README b/t/old/selenium/testscripts/README new file mode 100644 index 000000000..70b4818d7 --- /dev/null +++ b/t/old/selenium/testscripts/README @@ -0,0 +1,2 @@ +All Selenium testscripts can be found here. The tests will be included +sequential from 001 to 999. \ No newline at end of file diff --git a/t/old/selenium/testscripts/accounting/begin/A000Login.t b/t/old/selenium/testscripts/accounting/begin/A000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/accounting/begin/A000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/accounting/begin/A999Logout.t b/t/old/selenium/testscripts/accounting/begin/A999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/accounting/begin/A999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/accounting/end/A000Login.t b/t/old/selenium/testscripts/accounting/end/A000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/accounting/end/A000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/accounting/end/A999Logout.t b/t/old/selenium/testscripts/accounting/end/A999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/accounting/end/A999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/administration/begin/A001CreateTestDatabase.t b/t/old/selenium/testscripts/administration/begin/A001CreateTestDatabase.t new file mode 100644 index 000000000..7a568f0e8 --- /dev/null +++ b/t/old/selenium/testscripts/administration/begin/A001CreateTestDatabase.t @@ -0,0 +1,48 @@ +### Create Database +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", $0); + exit(0); +} +$sel->open_ok($lxtest->{lxadmin}); + +if($sel->get_title() eq "") { + $sel->open_ok($lxtest->{lxadmin_url}); + $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Anmeldung\")]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} + +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Lock the system'); +$sel->click_ok("document.forms[0].action[3]"); # Button für System sperren +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +$sel->title_is("Lx-Office ERP Administration -"); +diag("Create test database '$lxtest->{db}'"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP / Datenbankadministration -"); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbdefault", $lxtest->{dbdefault}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank anlegen\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); +$sel->type_ok("db", $lxtest->{db}); +$sel->select_ok("encoding", "label=ISO 8859-1"); +$sel->select_ok("chart", "label=Germany-DATEV-SKR03EU"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Unlock the system'); +$sel->click_ok("document.forms[0].action[3]"); # BUtton für System entsperren +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/administration/begin/A002CreateTestUser.t b/t/old/selenium/testscripts/administration/begin/A002CreateTestUser.t new file mode 100644 index 000000000..58200e617 --- /dev/null +++ b/t/old/selenium/testscripts/administration/begin/A002CreateTestUser.t @@ -0,0 +1,40 @@ +### Create new user + +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", $0); + exit(0); +} + +diag("Create test user '$lxtest->{testuserlogin}'"); +$sel->open_ok($lxtest->{lxadmin}); + +$sel->title_is("Lx-Office ERP Administration -"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration / Benutzer erfassen -"); +$sel->type_ok("login", $lxtest->{testuserlogin}); +$sel->type_ok("password", $lxtest->{testuserpasswd}); +$sel->type_ok("name", "Selenium"); +$sel->type_ok("email", "selenium\@lx-office.org"); +$sel->type_ok("signature", "Selenium Testuser"); +$sel->type_ok("tel", "0000"); +$sel->type_ok("fax", "1111"); +$sel->type_ok("company", "Sel-enium"); +$sel->type_ok("signature", "Selenium Testuser\nTestfirma"); +$sel->type_ok("address", "Testfirma"); +$sel->type_ok("taxnumber", "111-222-333-444"); +$sel->type_ok("co_ustid", "1234567"); +$sel->type_ok("duns", "0987654321"); +#$sel->click_ok("dbdriver"); +$sel->type_ok("newtemplates", "seleniumtestuser"); +$sel->click_ok("menustyle"); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbname", $lxtest->{db}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t b/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t new file mode 100644 index 000000000..e835959ee --- /dev/null +++ b/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t @@ -0,0 +1,68 @@ +### Update Database +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", $0); + exit(0); +} + +# NOTEST: some preruns for initializing missing parameters +$sel->open($lxtest->{lxadmin}); + +$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->type("dbuser", $lxtest->{dbuser}); +$sel->type("dbpasswd", $lxtest->{dbpasswd}); +$sel->type("dbuser", $lxtest->{dbuser}); +$sel->type("dbhost", $lxtest->{dbhost}); +$sel->type("dbport", $lxtest->{dbport}); +$sel->type("dbdefault", $lxtest->{dbdefault}); +$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); +$sel->wait_for_page_to_load($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); + +my $count =0; + +while (){ # count the number of radiobuttons + eval { $sel->is_checked("//input[(\@id=\"$count\")]"); }; + if ( $@ ) { $count--; last; }; + $count++; +} + +#TEST: Now run the Tests + +$sel->open_ok($lxtest->{lxadmin}); +$sel->title_is("Lx-Office ERP Administration -"); + +#diag('Lock the system'); +#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +diag('Update the database'); + +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP / Datenbankadministration -"); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbdefault", $lxtest->{dbdefault}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); + +for (my $i=0; $i <= $count; $i++){ + $sel->uncheck_ok("//input[(\@id=\"$i\")]"); +} + +#$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]"); +#$sel->check_ok("//input[\@name=\"db$lxtest->{db}\"]"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->title_like( qr/Lx-Office ERP Datenbankadministration/ ); + +#diag('Unlock the system'); +#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +#$sel->title_is("Lx-Office ERP Administration -"); +1; diff --git a/t/old/selenium/testscripts/administration/end/A998DeleteTestUser.t b/t/old/selenium/testscripts/administration/end/A998DeleteTestUser.t new file mode 100644 index 000000000..45cb7d32c --- /dev/null +++ b/t/old/selenium/testscripts/administration/end/A998DeleteTestUser.t @@ -0,0 +1,17 @@ +### Delete user +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + +diag("Delete test user '$lxtest->{testuserlogin}'"); +$sel->open_ok($lxtest->{lxadmin}); + +$sel->title_is("Lx-Office ERP Administration -"); +$sel->click_ok("link=$lxtest->{testuserlogin}"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration / Benutzerdaten bearbeiten -"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/administration/end/A999DeleteTestDatabase.t b/t/old/selenium/testscripts/administration/end/A999DeleteTestDatabase.t new file mode 100644 index 000000000..1051dfbd9 --- /dev/null +++ b/t/old/selenium/testscripts/administration/end/A999DeleteTestDatabase.t @@ -0,0 +1,40 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + +$sel->open_ok($lxtest->{lxadmin}); + +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Lock the system'); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +diag("Delete test database '$lxtest->{db}'"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP / Datenbankadministration -"); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank löschen -"); + +$sel->select_ok("db", "label=" . $lxtest->{db}); + +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->body_text_is("Lx-Office ERP Datenbankadministration / Datenbank löschen Die Datenbank $lxtest->{db} wurde erfolgreich gelöscht."); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); + +diag('Unlock the system'); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP Administration -"); +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/base/000Login.t b/t/old/selenium/testscripts/base/000Login.t new file mode 100644 index 000000000..864ebd120 --- /dev/null +++ b/t/old/selenium/testscripts/base/000Login.t @@ -0,0 +1,36 @@ +### Login + +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + +diag("Login"); + +$sel->open_ok($lxtest->{lxbaseurl}."/login.pl"); + +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office Version ".$lxtest->{version}); +$sel->type_ok("login", $lxtest->{testuserlogin}); +$sel->type_ok("password", $lxtest->{testuserpasswd}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Anmeldung\")]"); + +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +if($sel->get_text("//td") eq "Ungültiger Benutzername oder falsches Passwort!") { + diag("\n\n\n\nWrong username or password!\n\n\n\n"); + $sel->stop; + exit(-1); +} + +if($sel->get_title() eq "Datenbankaktualisierung - Lx-Office Version 2.4.3 - -") { + $sel->click_ok("//input[(\@name=\"dummy\") and (\@value=\"Weiter\")]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); + $sel->click_ok("//input[(\@type=\"submit\") and (\@value=\"Weiter\")]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} + +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->{ran_tests}{"t/selenium/testscripts/base/999Logout.t"} = 0; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/base/999Logout.t b/t/old/selenium/testscripts/base/999Logout.t new file mode 100644 index 000000000..247d61e18 --- /dev/null +++ b/t/old/selenium/testscripts/base/999Logout.t @@ -0,0 +1,15 @@ +### Logout + +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", "t/selenium/testscripts/base/000Login.t", $0); + exit(0); +} + +diag("Logout"); +$sel->select_frame_ok("relative=top"); +$sel->click_ok("link=abmelden"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office Version ".$lxtest->{version}); +$sel->{ran_tests}{"t/selenium/testscripts/base/000Login.t"} = 0; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M000Login.t b/t/old/selenium/testscripts/masterdata/begin/M000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M001CreateCustomer.t b/t/old/selenium/testscripts/masterdata/begin/M001CreateCustomer.t new file mode 100644 index 000000000..43a97a5d7 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M001CreateCustomer.t @@ -0,0 +1,112 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create first Customer"); +SKIP: { + start_login(); + + $sel->click_ok("link=Kunde erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("customernumber"); + $sel->type_ok("customernumber", "001"); + $sel->type_ok("greeting", "Firma"); + $sel->type_ok("name", "Selenium-Testfirma1"); + $sel->type_ok("department_1", "Einkauf"); + $sel->type_ok("department_2", "extern"); + $sel->type_ok("street", "Grummelburger 111"); + $sel->type_ok("zipcode", "37115"); + $sel->type_ok("city", "Musterstadt"); + $sel->type_ok("country", "Germany"); + $sel->type_ok("creditlimit", "10000000"); + $sel->type_ok("discount", "5"); + $sel->type_ok("account_number", "1"); + $sel->select_ok("salesman_id", "label=Selenium"); + $sel->type_ok("notes", "keine Bemerkungen"); + $sel->click_ok("link=Lieferadresse"); + $sel->click_ok("shipto_id"); + $sel->select_ok("shipto_id", "label=Alle"); + $sel->click_ok("//tr[1]/td/select/option[2]"); + $sel->click_ok("shiptoname"); + $sel->click_ok("shiptodepartment_1"); + $sel->type_ok("shiptodepartment_1", "Einkauf"); + $sel->type_ok("shiptostreet", "Donnerburger 12"); + $sel->type_ok("shiptozipcode", "37115"); + $sel->type_ok("shiptocity", "Musterstadt"); + $sel->type_ok("shiptocountry", "Germany"); + $sel->type_ok("shiptocontact", "Herr Mustermann"); + $sel->type_ok("shiptophone", "0"); + $sel->type_ok("shiptofax", "1"); + $sel->type_ok("shiptoemail", "mustermann\@linet-services.de"); + $sel->click_ok("link=Ansprechpartner"); + $sel->click_ok("cp_greeting"); + $sel->type_ok("cp_greeting", "Frau"); + $sel->type_ok("cp_title", "Dr."); + $sel->type_ok("cp_abteilung", "Verkauf"); + $sel->type_ok("cp_givenname", "Mechtilde"); + $sel->type_ok("cp_name", "Grosshaupt"); + $sel->type_ok("cp_phone1", "05528 111111111"); + $sel->type_ok("cp_phone2", "05528 222222222"); + $sel->type_ok("cp_fax", "05528 222222223"); + $sel->type_ok("cp_mobile1", "05528 2222222224"); + $sel->type_ok("cp_mobile2", "05528 2222222225"); + $sel->type_ok("cp_satphone", "05528 2222222226"); + $sel->type_ok("cp_satfax", "05528 2222222227"); + $sel->type_ok("cp_project", "1"); + $sel->type_ok("cp_email", "mustergrosshaupt\@linet-services.de"); + $sel->type_ok("cp_privatphone", "05528 2222222220"); + $sel->type_ok("cp_privatemail", "keine\@linet-services.de"); + $sel->type_ok("cp_birthday", "05.09.1982"); + $sel->click_ok("link=Lieferungen"); + $sel->click_ok("delivery_id"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + + diag("Create second Customer"); + $sel->title_is("Kunde erfassen - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->select_frame_ok("relative=up"); + $sel->click_ok("link=Kunde erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=Rechnungsadresse"); + $sel->click_ok("customernumber"); + $sel->type_ok("creditlimit", "10000000"); + $sel->type_ok("customernumber", "2"); + $sel->click_ok("greeting"); + $sel->type_ok("greeting", "Herr"); + $sel->type_ok("name", "TestMann2"); + $sel->type_ok("street", "Goettingweg 3"); + $sel->type_ok("zipcode", "38100"); + $sel->type_ok("city", "Braunschweig"); + $sel->type_ok("country", "Germany"); + $sel->type_ok("phone", "0531 010101010101"); + $sel->type_ok("email", "testmann\@linet-services.de"); + $sel->click_ok("document.ct.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + + diag("Create third Customer"); + $sel->title_is("Kunde erfassen - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->select_frame_ok("relative=up"); + $sel->click_ok("link=Kunde erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("customernumber"); + $sel->type_ok("customernumber", "3"); + $sel->type_ok("creditlimit", "10000000"); + $sel->click_ok("greeting"); + $sel->type_ok("greeting", "Frau"); + $sel->type_ok("name", "TestFrau3"); + $sel->type_ok("department_1", "Outsourced"); + $sel->type_ok("street", "Billighäuser 3444"); + $sel->click_ok("street"); + $sel->click_ok("zipcode"); + $sel->type_ok("zipcode", "67899"); + $sel->type_ok("city", "Brunnenberge"); + $sel->type_ok("country", "Austria"); + $sel->click_ok("document.ct.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M002CreateVendor.t b/t/old/selenium/testscripts/masterdata/begin/M002CreateVendor.t new file mode 100644 index 000000000..b1f2603c4 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M002CreateVendor.t @@ -0,0 +1,124 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create vendor"); +SKIP: { + start_login(); + + $sel->click_ok("link=Lieferant erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + diag("Create first vendor"); + $sel->select_frame_ok("main_window"); + $sel->click_ok("vendornumber"); + $sel->type_ok("vendornumber", "1"); + $sel->click_ok("selected_company_greeting"); + $sel->select_ok("selected_company_greeting", "label=Firma"); + $sel->click_ok("//option[2]"); + $sel->click_ok("name"); + $sel->type_ok("name", "TestLieferant1"); + $sel->type_ok("department_1", "GossAus"); + $sel->type_ok("street", "Berger 1"); + $sel->type_ok("zipcode", "11990"); + $sel->type_ok("city", "Drehmel"); + $sel->type_ok("country", "Germany"); + $sel->type_ok("contact", "Herr Custom"); + $sel->type_ok("phone", "01234 56787902"); + $sel->type_ok("fax", "01234 567879023"); + $sel->type_ok("email", "custom\@linet-services.de"); + $sel->type_ok("account_number", "2"); + $sel->click_ok("obsolete"); + $sel->click_ok("obsolete"); + $sel->type_ok("notes", "keine Bemerkungen"); + $sel->click_ok("link=Lieferadresse"); + $sel->click_ok("shipto_id"); + $sel->select_ok("shipto_id", "label=Alle"); + $sel->click_ok("//tr[1]/td/select/option[2]"); + $sel->click_ok("link=Ansprechpartner"); + $sel->click_ok("cp_id"); + $sel->click_ok("cp_id"); + $sel->click_ok("cp_greeting"); + $sel->click_ok("selected_cp_greeting"); + $sel->select_ok("selected_cp_greeting", "label=Frau"); + $sel->click_ok("//tr[2]/td/select/option[2]"); + $sel->click_ok("cp_title"); + $sel->click_ok("selected_cp_title"); + $sel->click_ok("cp_title"); + $sel->type_ok("cp_title", "Diplom Meterologin"); + $sel->click_ok("cp_abteilung"); + $sel->type_ok("cp_title", "Dipl. Inf."); + $sel->click_ok("cp_title"); + $sel->click_ok("cp_title"); + $sel->type_ok("cp_title", "Dipl. Ing."); + $sel->click_ok("cp_abteilung"); + $sel->type_ok("cp_abteilung", "Externes"); + $sel->type_ok("cp_givenname", "Hildegunde"); + $sel->type_ok("cp_name", "Riess"); + $sel->type_ok("cp_phone1", "0111 222333444 5"); + $sel->click_ok("cp_birthday"); + $sel->type_ok("cp_birthday", "12.03.1964"); + $sel->click_ok("link=Lieferungen"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=Rechnungsadresse"); + $sel->click_ok("document.ct.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + diag("Create second vendor"); + $sel->click_ok("vendornumber"); + $sel->type_ok("vendornumber", "2"); + $sel->click_ok("greeting"); + $sel->click_ok("selected_company_greeting"); + $sel->select_ok("selected_company_greeting", "label=Firma"); + $sel->click_ok("//option[2]"); + $sel->click_ok("name"); + $sel->type_ok("name", "TestLieferant2"); + $sel->type_ok("department_1", "Verkauf"); + $sel->type_ok("department_2", "Orga"); + $sel->type_ok("street", "Wlkenweg 3"); + $sel->type_ok("zipcode", "09090"); + $sel->type_ok("city", "Brummbach"); + $sel->click_ok("city"); + $sel->type_ok("city", "Markt Brummbach"); + $sel->click_ok("country"); + $sel->type_ok("country", "Germany"); + $sel->click_ok("document.ct.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + diag("Create third vendor"); + $sel->click_ok("link=Rechnungsadresse"); + $sel->click_ok("vendornumber"); + $sel->type_ok("vendornumber", "3"); + $sel->click_ok("selected_company_greeting"); + $sel->select_ok("selected_company_greeting", "label=Firma"); + $sel->click_ok("//option[2]"); + $sel->type_ok("name", "TestFirma3 GmbH"); + $sel->type_ok("fax", "03232 7272727273"); + $sel->type_ok("creditlimit", "50000"); + $sel->type_ok("discount", "10"); + $sel->click_ok("link=Lieferadresse"); + $sel->click_ok("shiptoname"); + $sel->type_ok("shiptoname", "TestFirma3 GmbH"); + $sel->type_ok("shiptodepartment_1", "Vertrieb"); + $sel->type_ok("shiptostreet", "Grummelsburger 1423"); + $sel->type_ok("shiptozipcode", "40000"); + $sel->type_ok("shiptocity", "Hansastadt"); + $sel->type_ok("shiptocountry", "Germany"); + $sel->type_ok("shiptocontact", "Herr Baumann von Clausen"); + $sel->type_ok("shiptophone", "03232 7272727272"); + $sel->type_ok("shiptofax", "03232 7272727273"); + $sel->type_ok("shiptoemail", "baumann\@linet-services.de"); + $sel->click_ok("link=Ansprechpartner"); + $sel->click_ok("selected_cp_greeting"); + $sel->click_ok("cp_greeting"); + $sel->type_ok("cp_greeting", "Herr"); + $sel->type_ok("cp_abteilung", "Vertrieb"); + $sel->type_ok("cp_givenname", "Dietmar"); + $sel->type_ok("cp_name", "Baumann von Clausen"); + $sel->type_ok("cp_phone1", "03232 7272727272"); + $sel->type_ok("cp_fax", "03232 7272727273"); + $sel->type_ok("cp_birthday", "14.05.1971"); + $sel->click_ok("link=Lieferungen"); + $sel->click_ok("document.ct.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M003CreateGoods.t b/t/old/selenium/testscripts/masterdata/begin/M003CreateGoods.t new file mode 100644 index 000000000..593384127 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M003CreateGoods.t @@ -0,0 +1,67 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create goods"); +SKIP: { + start_login(); + + $sel->click_ok("link=Ware erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("partnumber", "1"); + $sel->type_ok("description", "TestWare1"); + $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe1"); + $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); + $sel->click_ok("trigger1"); + $sel->type_ok("listprice", "100,00"); + $sel->type_ok("sellprice", "150,00"); + $sel->type_ok("lastcost", "50,00"); + $sel->select_ok("price_factor_id", "label=pro 10"); + $sel->type_ok("notes", "Zu dieser Testware existiert keine Bemerkung"); + $sel->select_ok("unit", "label=kg"); + $sel->type_ok("weight", "10"); + $sel->type_ok("rop", "10"); + $sel->type_ok("bin", "1"); + $sel->type_ok("ve", "10"); + $sel->click_ok("shop"); + $sel->type_ok("microfiche", "27 drei 4tel"); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + # Spracheinstellungen müssen überarbeitet werden, bevor der Test laufen kann! + # $sel->click_ok("//button[\@type='button']"); + # $sel->wait_for_pop_up_ok("_new_generic", $lxtest->{timeout}); + # $sel->click_ok("//button[\@type='button']"); + # $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("price_1", "115,00"); + $sel->type_ok("price_2", "150,00"); + $sel->type_ok("make_1", "TestFabrikant1"); + $sel->type_ok("model_1", "TestWare1"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber", "2"); + $sel->type_ok("description", "TestWareSelenium2"); + $sel->type_ok("listprice", "0,50"); + $sel->type_ok("sellprice", "1,00"); + $sel->type_ok("lastcost", ",25"); + $sel->select_ok("unit", "label=kg"); + $sel->type_ok("weight", "0,5"); + $sel->type_ok("rop", "2"); + $sel->type_ok("bin", "2"); + $sel->click_ok("not_discountable"); + $sel->type_ok("ve", "1"); + $sel->type_ok("notes", "Die ist Brot"); + # Spracheinstellungen müssen überarbeitet werden, bevor der Test laufen kann! + # $sel->click_ok("//button[\@type='button']"); + # $sel->wait_for_pop_up_ok("_new_generic", $lxtest->{timeout}); + # $sel->click_ok("//button[\@type='button']"); + # $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M004AddService.t b/t/old/selenium/testscripts/masterdata/begin/M004AddService.t new file mode 100644 index 000000000..5a0dd19fc --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M004AddService.t @@ -0,0 +1,44 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Add service"); +SKIP: { + start_login(); + + $sel->click_ok("link=Dienstleistung erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("partnumber", "999"); + $sel->type_ok("description", "Programmierstunde"); + $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3"); + $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); + $sel->type_ok("notes", "Eine Programmierstunde wird immer besser bezahlt"); + $sel->type_ok("listprice", "50,00"); + $sel->type_ok("sellprice", "100"); + $sel->type_ok("lastcost", "45"); + $sel->select_ok("unit", "label=Std"); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->type_ok("price_1", "100"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber", "998"); + $sel->type_ok("description", "Telefonstunde"); + $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3"); + $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); + $sel->type_ok("notes", "gibt's beim Telekomunikator"); + $sel->type_ok("listprice", "0,05"); + $sel->type_ok("sellprice", "0,10"); + $sel->type_ok("lastcost", "0,02"); + $sel->select_ok("unit", "label=psch"); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->type_ok("price_1", "0,02"); + $sel->type_ok("price_2", "0,1"); + $sel->type_ok("price_1", "0,1"); + $sel->click_ok("document.ic.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M005AddProduct.t b/t/old/selenium/testscripts/masterdata/begin/M005AddProduct.t new file mode 100644 index 000000000..4bba0b218 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M005AddProduct.t @@ -0,0 +1,35 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Add product"); +SKIP: { + start_login(); + + $sel->click_ok("link=Erzeugnis erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("partnumber", "991"); + $sel->type_ok("description", "Handykarten"); + $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe2"); + $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); + $sel->click_ok("trigger1"); + $sel->type_ok("listprice", "3,00"); + $sel->type_ok("sellprice", "30,00"); + $sel->select_ok("unit", "label=Stck"); + $sel->type_ok("stock", "100"); + $sel->type_ok("rop", "10"); + $sel->type_ok("bin", "991"); + $sel->click_ok("not_discountable"); + $sel->click_ok("shop"); + $sel->type_ok("price_1", "30,00"); + $sel->type_ok("price_2", "30,00"); + $sel->type_ok("make_1", "TCom"); + $sel->type_ok("model_1", "standard"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M006AddProject.t b/t/old/selenium/testscripts/masterdata/begin/M006AddProject.t new file mode 100644 index 000000000..ad82886cf --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M006AddProject.t @@ -0,0 +1,19 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + +diag("Add project"); +SKIP: { + start_login(); + + $sel->click_ok("link=Projekt erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("projectnumber", "1001"); + $sel->type_ok("description", "tausend und eine Nacht"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/begin/M999Logout.t b/t/old/selenium/testscripts/masterdata/begin/M999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/begin/M999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/end/M000Login.t b/t/old/selenium/testscripts/masterdata/end/M000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/end/M000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/end/M995DeleteGoods.t b/t/old/selenium/testscripts/masterdata/end/M995DeleteGoods.t new file mode 100644 index 000000000..d7af1353d --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/end/M995DeleteGoods.t @@ -0,0 +1,17 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete good"); +SKIP: { + start_login(); + + $sel->click_ok("link=Erzeugnisse"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); +}; + +# an dieser Stelle muss noch überleegt werdne, wie der Zusaamenhang zwischen Lagerbestand und "Löschen" vernünftigt gehandhabt werdne kann + +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/end/M996DeleteProject.t b/t/old/selenium/testscripts/masterdata/end/M996DeleteProject.t new file mode 100644 index 000000000..d062010e4 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/end/M996DeleteProject.t @@ -0,0 +1,24 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete project"); +SKIP: { + start_login(); + + $sel->click_ok("link=Projekte"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->text_is("link=1001", "1001"); + $sel->click_ok("link=1001"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + TODO: { + local $TODO= "Benutzte Projekte können nicht gelöscht werden!"; +# $sel->click_ok("document.forms[0].action[1]"); +# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + } +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/end/M997DeleteService.t b/t/old/selenium/testscripts/masterdata/end/M997DeleteService.t new file mode 100644 index 000000000..d206423d2 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/end/M997DeleteService.t @@ -0,0 +1,28 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete service"); +SKIP: { + start_login(); + + $sel->click_ok("link=Dienstleistungen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->text_is("link=999", "999"); + $sel->text_is("link=998", "998"); + $sel->text_is("link=Programmierstunde", "Programmierstunde"); + $sel->text_is("link=Telefonstunde", "Telefonstunde"); + $sel->click_ok("link=999"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[3]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=Telefonstunde"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[3]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/end/M998DeleteProduct.t b/t/old/selenium/testscripts/masterdata/end/M998DeleteProduct.t new file mode 100644 index 000000000..d3f41a000 --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/end/M998DeleteProduct.t @@ -0,0 +1,31 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete product"); +SKIP: { + start_login(); + + $sel->click_ok("link=Waren"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->text_is("link=TestWare1", "TestWare1"); + $sel->text_is("link=TestWareSelenium2", "TestWareSelenium2"); + $sel->text_is("link=1", "1"); + $sel->text_is("link=2", "2"); + TODO: { + local $TODO = "Waren in Rechnungen können nicht gelöscht werden!"; +# $sel->click_ok("link=1"); +# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +# $sel->click_ok("document.ic.action[3]"); +# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +# $sel->click_ok("link=TestWareSelenium2"); +# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +# $sel->click_ok("document.ic.action[3]"); +# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + } +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/masterdata/end/M999Logout.t b/t/old/selenium/testscripts/masterdata/end/M999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/masterdata/end/M999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/payments/begin/P000Login.t b/t/old/selenium/testscripts/payments/begin/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/payments/begin/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/payments/begin/P999Logout.t b/t/old/selenium/testscripts/payments/begin/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/payments/begin/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/payments/end/P000Login.t b/t/old/selenium/testscripts/payments/end/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/payments/end/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/payments/end/P999Logout.t b/t/old/selenium/testscripts/payments/end/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/payments/end/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/printing/begin/P000Login.t b/t/old/selenium/testscripts/printing/begin/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/printing/begin/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/printing/begin/P999Logout.t b/t/old/selenium/testscripts/printing/begin/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/printing/begin/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/printing/end/P000Login.t b/t/old/selenium/testscripts/printing/end/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/printing/end/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/printing/end/P999Logout.t b/t/old/selenium/testscripts/printing/end/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/printing/end/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/programm/begin/P000Login.t b/t/old/selenium/testscripts/programm/begin/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/programm/begin/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/programm/begin/P999Logout.t b/t/old/selenium/testscripts/programm/begin/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/programm/begin/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/programm/end/P000Login.t b/t/old/selenium/testscripts/programm/end/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/programm/end/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/programm/end/P999Logout.t b/t/old/selenium/testscripts/programm/end/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/programm/end/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/purchase/begin/P000Login.t b/t/old/selenium/testscripts/purchase/begin/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/purchase/begin/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t b/t/old/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t new file mode 100644 index 000000000..80597ce30 --- /dev/null +++ b/t/old/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t @@ -0,0 +1,42 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create quote request"); +SKIP: { + start_login(); + + $sel->click_ok("link=Neue Preisanfrage"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("partnumber_1"); + $sel->type_ok("partnumber_1", "1"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("quonumber"); + $sel->type_ok("quonumber", "1"); + $sel->click_ok("cp_id"); + $sel->select_ok("cp_id", "label=Baumann von Clausen (Vertrieb)"); + $sel->click_ok("//option[\@value='905']"); + $sel->click_ok("shipto_id"); + $sel->click_ok("shipto_id"); + $sel->click_ok("taxzone_id"); + $sel->click_ok("taxzone_id"); + $sel->click_ok("cb_show_details"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("payment_id"); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->click_ok("//option[\@value='886']"); + $sel->click_ok("//tr[5]/td/table/tbody/tr/td[3]"); + $sel->click_ok("taxincluded"); + $sel->click_ok("qty_1"); + $sel->type_ok("qty_1", "21"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/purchase/begin/P999Logout.t b/t/old/selenium/testscripts/purchase/begin/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/purchase/begin/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/purchase/end/P000Login.t b/t/old/selenium/testscripts/purchase/end/P000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/purchase/end/P000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/purchase/end/P999Logout.t b/t/old/selenium/testscripts/purchase/end/P999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/purchase/end/P999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/reports/begin/R000Login.t b/t/old/selenium/testscripts/reports/begin/R000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/reports/begin/R000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/reports/begin/R999Logout.t b/t/old/selenium/testscripts/reports/begin/R999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/reports/begin/R999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/reports/end/R000Login.t b/t/old/selenium/testscripts/reports/end/R000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/reports/end/R000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/reports/end/R999Logout.t b/t/old/selenium/testscripts/reports/end/R999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/reports/end/R999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/selling/begin/S000Login.t b/t/old/selenium/testscripts/selling/begin/S000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/selling/begin/S000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/selling/begin/S001CreateOffers.t b/t/old/selenium/testscripts/selling/begin/S001CreateOffers.t new file mode 100644 index 000000000..a171a52e5 --- /dev/null +++ b/t/old/selenium/testscripts/selling/begin/S001CreateOffers.t @@ -0,0 +1,71 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create offers"); +SKIP: { + start_login(); + + $sel->click_ok("link=Angebot erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); + $sel->select_ok("customer", "label=TestFrau3"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("customer", "label=Selenium-Testfirma1"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); + $sel->type_ok("shipvia", "per pedes"); + $sel->type_ok("transaction_description", "alpha"); + $sel->type_ok("quonumber", "1"); + $sel->select_ok("globalproject_id", "label=1001"); + $sel->click_ok("cb_show_details"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber_1", "1"); +# TODO: { +# local $TODO = "Popups werden von Selenium noch nicht unterstützt!"; +# $sel->click_ok("//button[\@type='button']"); +# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +# } + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[5]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("customer", "label=TestFrau3"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber_1", "991"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("qty_1", "5"); + $sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("taxincluded"); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("customer", "label=TestMann2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber_1", "1"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); + $sel->type_ok("qty_1", "19"); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/selling/begin/S002CreateCharge.t b/t/old/selenium/testscripts/selling/begin/S002CreateCharge.t new file mode 100644 index 000000000..d3b5318e7 --- /dev/null +++ b/t/old/selenium/testscripts/selling/begin/S002CreateCharge.t @@ -0,0 +1,84 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create charge"); +SKIP: { + start_login(); + + $sel->click_ok("link=Auftrag erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); + $sel->type_ok("shippingpoint", "Braunschweig"); + $sel->type_ok("shipvia", "LKW"); + $sel->type_ok("transaction_description", "beta"); + $sel->click_ok("delivered"); + $sel->type_ok("ordnumber", "1"); + $sel->type_ok("quonumber", "1"); + $sel->type_ok("cusordnumber", "97862"); + $sel->select_ok("globalproject_id", "label=1001"); + $sel->type_ok("partnumber_1", "1"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("ship_1", "20"); + $sel->type_ok("qty_1", "20"); + $sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("customer", "label=TestFrau3"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("shippingpoint", "Göttingen"); + $sel->type_ok("shipvia", "PKW"); + $sel->type_ok("transaction_description", "teta"); + $sel->type_ok("ordnumber", "2"); + $sel->type_ok("quonumber", "2"); + $sel->type_ok("cusordnumber", "23453666"); + $sel->type_ok("partnumber_1", "911"); + $sel->type_ok("ship_1", "5"); + $sel->type_ok("qty_1", "5"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("description", "Handykarten D2"); + $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3"); + $sel->type_ok("listprice", "10,00"); + $sel->type_ok("sellprice", "20,00"); + $sel->type_ok("lastcost", "5,00"); + $sel->select_ok("price_factor_id", "label=pro 10"); + $sel->select_ok("unit", "label=Stck"); + $sel->type_ok("bin", "911"); + $sel->click_ok("not_discountable"); + $sel->click_ok("shop"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("customer", "label=TestMann2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber_1", "991"); + $sel->type_ok("ship_1", "10"); + $sel->type_ok("qty_1", "10"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_ok("price_factor_id_1", "label=pro 10"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("sellprice_1", "1000"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.oe.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/selling/begin/S003CreateInvoice.t b/t/old/selenium/testscripts/selling/begin/S003CreateInvoice.t new file mode 100644 index 000000000..a74b581ef --- /dev/null +++ b/t/old/selenium/testscripts/selling/begin/S003CreateInvoice.t @@ -0,0 +1,34 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create invoice"); +SKIP: { + start_login(); + + $sel->click_ok("link=Rechnung erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->select_ok("customer", "label=TestFrau3"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber_1", "1"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partnumber_2", "991"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("invnumber", "1"); + $sel->click_ok("trigger3"); + $sel->click_ok("trigger_orddate"); + $sel->type_ok("quonumber", "2"); + $sel->click_ok("trigger_quodate"); + $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); + $sel->click_ok("update_button"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.invoice.action[6]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/selling/begin/S999Logout.t b/t/old/selenium/testscripts/selling/begin/S999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/selling/begin/S999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/selling/end/S000Login.t b/t/old/selenium/testscripts/selling/end/S000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/selling/end/S000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/selling/end/S999Logout.t b/t/old/selenium/testscripts/selling/end/S999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/selling/end/S999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S000Login.t b/t/old/selenium/testscripts/system/begin/S000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S001CreateProductGroups.t b/t/old/selenium/testscripts/system/begin/S001CreateProductGroups.t new file mode 100644 index 000000000..1f166e695 --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S001CreateProductGroups.t @@ -0,0 +1,41 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create product groups"); +SKIP: { + start_login(); + + $sel->click_ok("link=Warengruppe erfassen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("partsgroup", "TestSeleniumWarengruppe1"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partsgroup", "TestSeleniumWarengruppe2"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("relative=up"); + $sel->click_ok("link=Warengruppen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe1"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("partsgroup", "TestSeleniumWarengruppe3"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe3"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S002CreatePriceBrackets.t b/t/old/selenium/testscripts/system/begin/S002CreatePriceBrackets.t new file mode 100644 index 000000000..3cb85409e --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S002CreatePriceBrackets.t @@ -0,0 +1,21 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create price brackets"); +SKIP: { + start_login(); + + $sel->click_ok("link=Preisgruppe erfassen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + + $sel->select_frame_ok("main_window"); + $sel->type_ok("pricegroup", "SeleniumTestPreisgruppe1"); + $sel->click_ok("action","value=Speichern"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->type_ok("pricegroup", "SeleniumTestPreisgruppe2"); + $sel->click_ok("action","value=Speichern"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S003AddLanguage.t b/t/old/selenium/testscripts/system/begin/S003AddLanguage.t new file mode 100644 index 000000000..4d745b87b --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S003AddLanguage.t @@ -0,0 +1,31 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Add languages"); +SKIP: { + start_login(); + + $sel->click_ok("link=Sprache hinzufügen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("description", "elbisch"); + $sel->type_ok("template_code", "elb"); + $sel->type_ok("article_code", "elb"); + $sel->select_ok("output_numberformat", "label=1.000,00"); + $sel->select_ok("output_dateformat", "label=yyyy-mm-dd"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + + ### Folgende Zeilen sind notwendig , um später herausfinden zu können, welche Sprache gelöscht werden kann. + use DBI; + $lxtest->{dsn} = 'dbi:Pg:dbname=' . $lxtest->{db} . ';host=' . $lxtest->{dbhost} . ';port=' . $lxtest->{dbport}; + my $dbh = DBI->connect( $lxtest->{dsn}, $lxtest->{dbuser}, $lxtest->{dbpasswd} ) or die "Cannot connect to database!\n $DBI::errstr"; + my $sth = $dbh->prepare("SELECT id FROM language WHERE description ILIKE 'elbisch'") or die "Error while preparing sql statement!\n $DBI::errstr\n"; + $sth->execute() or die "Error while excecuting sql statement!\n $DBI::errstr"; + $lxtest->{lang_id} = $sth->fetchrow_array() or die "Nothing to fetch!\n$DBI::errstr"; + $sth->finish(); + $dbh->disconnect(); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S004ShowLanguages.t b/t/old/selenium/testscripts/system/begin/S004ShowLanguages.t new file mode 100644 index 000000000..0f55e6d3b --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S004ShowLanguages.t @@ -0,0 +1,18 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Show languages"); +SKIP: { + start_login(); + + $sel->click_ok("link=Sprachen anzeigen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=elbisch"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S005AddPaymentConditions.t b/t/old/selenium/testscripts/system/begin/S005AddPaymentConditions.t new file mode 100644 index 000000000..7f20e4b41 --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S005AddPaymentConditions.t @@ -0,0 +1,22 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Add payment conditions"); +SKIP: { + start_login(); + + $sel->click_ok("link=Zahlungskonditionen hinzufügen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("description", "Schnellzahler/Skonto"); + $sel->type_ok("description_long", "Schnellzahler bekommen sofort ein Skonto von 3% gewährleistet"); + $sel->type_ok("description_long_" . $lxtest->{lang_id}, "This is a test in elbisch"); + $sel->type_ok("terms_netto", "100"); + $sel->type_ok("percent_skonto", "3"); + $sel->type_ok("terms_skonto", "97"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S006ShowPaymentConditions.t b/t/old/selenium/testscripts/system/begin/S006ShowPaymentConditions.t new file mode 100644 index 000000000..bf3e9bcb2 --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S006ShowPaymentConditions.t @@ -0,0 +1,18 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Show payment conditions"); +SKIP: { + start_login(); + + $sel->click_ok("link=Zahlungskonditionen anzeigen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=Schnellzahler/Skonto"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t b/t/old/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t new file mode 100644 index 000000000..b2ec59d00 --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t @@ -0,0 +1,23 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Add customer/vendor types"); +SKIP: { + start_login(); + + $sel->click_ok("link=Kunden-/Lieferantentyp erfassen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("description", "Großabnehmer"); + $sel->type_ok("discount", "3"); + $sel->type_ok("customernumberinit", "100"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->type_ok("description", "Kleinkäufer"); + $sel->type_ok("customernumberinit", "200"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t b/t/old/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t new file mode 100644 index 000000000..2a728322f --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t @@ -0,0 +1,22 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Show customer/vendor types"); +SKIP: { + start_login(); + + $sel->click_ok("link=Kunden\-\/Lieferantentypen\ anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=Großabnehmer"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=Kleinkäufer"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t b/t/old/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t new file mode 100644 index 000000000..1fe22da2d --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t @@ -0,0 +1,49 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Add show and delete measure"); +SKIP: { + start_login(); + + $sel->click_ok("link=Maßeinheiten"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("new_name", "ogge"); + $sel->select_ok("new_base_unit", "label=Stck"); + $sel->type_ok("new_factor", "3,5"); + $sel->type_ok("new_localized_" . $lxtest->{lang_id}, "kogge"); + $sel->type_ok("new_localized_plural_" . $lxtest->{lang_id}, "kogges"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->type_ok("localized_1_" . $lxtest->{lang_id}, "gm"); + $sel->type_ok("localized_plural_1_" . $lxtest->{lang_id}, "gms"); + $sel->type_ok("localized_2_" . $lxtest->{lang_id}, "gg"); + $sel->type_ok("localized_plural_2_" . $lxtest->{lang_id}, "ggs"); + $sel->type_ok("localized_3_" . $lxtest->{lang_id}, "gk"); + $sel->type_ok("localized_plural_3_" . $lxtest->{lang_id}, "gks"); + $sel->type_ok("localized_4_" . $lxtest->{lang_id}, "tt"); + $sel->type_ok("localized_plural_4_" . $lxtest->{lang_id}, "tts"); + $sel->type_ok("localized_5_" . $lxtest->{lang_id}, "lm"); + $sel->type_ok("localized_plural_5_" . $lxtest->{lang_id}, "lms"); + $sel->type_ok("localized_6_" . $lxtest->{lang_id}, "LL"); + $sel->type_ok("localized_plural_6_" . $lxtest->{lang_id}, "LLs"); + $sel->type_ok("localized_7_" . $lxtest->{lang_id}, "kctS"); + $sel->type_ok("localized_plural_7_" . $lxtest->{lang_id}, "kctSs"); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("delete_8"); + $sel->click_ok("//tr[9]/td[1]/a/img"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("//tr[8]/td[1]/a[1]/img"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("//tr[7]/td[1]/a[2]/img"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("//tr[8]/td[1]/a[2]/img"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("delete_8"); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t b/t/old/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t new file mode 100644 index 000000000..8991780fa --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t @@ -0,0 +1,28 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Add show and delete service measure"); +SKIP: { + start_login(); + + $sel->click_ok("link=Dienstleistungseinheiten"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("new_name", "ProggerStunde"); + $sel->select_ok("new_base_unit", "label=Std"); + $sel->type_ok("new_factor", "2,0"); + $sel->type_ok("new_localized_" . $lxtest->{lang_id}, "Dinges"); + $sel->type_ok("new_localized_plural_" . $lxtest->{lang_id}, "Dingeses"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("//tr[6]/td[1]/a/img"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("//tr[5]/td[1]/a[2]/img"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->click_ok("delete_5"); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S011CreateAccount.t b/t/old/selenium/testscripts/system/begin/S011CreateAccount.t new file mode 100644 index 000000000..983d2ae51 --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S011CreateAccount.t @@ -0,0 +1,40 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create Account"); +SKIP: { + start_login(); + + $sel->click_ok("link=Konto erfassen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->type_ok("accno", "000000000001"); + $sel->type_ok("description", "TestSeleniumKonto"); + $sel->select_ok("AccountType", "label=Aktiva/Mittelverwendung (A)"); + $sel->click_ok("AR"); + $sel->click_ok("AP"); + $sel->click_ok("IC"); + $sel->click_ok("AR_amount"); + $sel->click_ok("AR_paid"); + $sel->click_ok("AR_tax"); + $sel->click_ok("AP_amount"); + $sel->click_ok("AP_paid"); + $sel->click_ok("AP_tax"); + $sel->click_ok("IC_sale"); + $sel->click_ok("IC_cogs"); + $sel->click_ok("IC_taxpart"); + $sel->click_ok("IC_income"); + $sel->click_ok("IC_expense"); + $sel->click_ok("IC_taxservice"); + $sel->select_ok("pos_eur", "label=05. Ausserordentliche Erträge"); + $sel->select_ok("pos_bwa", "label=05. So.betr.Erlöse"); + $sel->select_ok("pos_bilanz", "label=02."); + $sel->click_ok("datevautomatik"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok("30000"); + $sel->is_element_present_ok("link=000000000001"); + $sel->is_text_present_ok("TestSeleniumKonto"); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S012ShowAccount.t b/t/old/selenium/testscripts/system/begin/S012ShowAccount.t new file mode 100644 index 000000000..6f842556b --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S012ShowAccount.t @@ -0,0 +1,395 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Show Accounts"); +SKIP: { + start_login(); + + $sel->click_ok("link=Konten anzeigen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->title_is("Kontenübersicht - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->is_element_present_ok("link=000000000001"); + $sel->is_element_present_ok("link=0027"); + $sel->is_element_present_ok("link=0090"); + $sel->is_element_present_ok("link=0200"); + $sel->is_element_present_ok("link=0210"); + $sel->is_element_present_ok("link=0380"); + $sel->is_element_present_ok("link=0400"); + $sel->is_element_present_ok("link=0410"); + $sel->is_element_present_ok("link=0420"); + $sel->is_element_present_ok("link=0430"); + $sel->is_element_present_ok("link=0440"); + $sel->is_element_present_ok("link=0480"); + $sel->is_element_present_ok("link=0631"); + $sel->is_element_present_ok("link=0640"); + $sel->is_element_present_ok("link=0650"); + $sel->is_element_present_ok("link=0853"); + $sel->is_element_present_ok("link=1000"); + $sel->is_element_present_ok("link=1200"); + $sel->is_element_present_ok("link=1360"); + $sel->is_element_present_ok("link=1400"); + $sel->is_element_present_ok("link=1445"); + $sel->is_element_present_ok("link=1446"); + $sel->is_element_present_ok("link=1447"); + $sel->is_element_present_ok("link=1448"); + $sel->is_element_present_ok("link=1449"); + $sel->is_element_present_ok("link=1450"); + $sel->is_element_present_ok("link=1570"); + $sel->is_element_present_ok("link=1571"); + $sel->is_element_present_ok("link=1572"); + $sel->is_element_present_ok("link=1573"); + $sel->is_element_present_ok("link=1574"); + $sel->is_element_present_ok("link=1575"); + $sel->is_element_present_ok("link=1576"); + $sel->is_element_present_ok("link=1577"); + $sel->is_element_present_ok("link=1578"); + $sel->is_element_present_ok("link=1580"); + $sel->is_element_present_ok("link=1581"); + $sel->is_element_present_ok("link=1582"); + $sel->is_element_present_ok("link=1584"); + $sel->is_element_present_ok("link=1588"); + $sel->is_element_present_ok("link=1590"); + $sel->is_element_present_ok("link=1592"); + $sel->is_element_present_ok("link=1600"); + $sel->is_element_present_ok("link=1605"); + $sel->is_element_present_ok("link=1606"); + $sel->is_element_present_ok("link=1607"); + $sel->is_element_present_ok("link=1609"); + $sel->is_element_present_ok("link=1767"); + $sel->is_element_present_ok("link=1771"); + $sel->is_element_present_ok("link=1772"); + $sel->is_element_present_ok("link=1773"); + $sel->is_element_present_ok("link=1774"); + $sel->is_element_present_ok("link=1775"); + $sel->is_element_present_ok("link=1776"); + $sel->is_element_present_ok("link=1780"); + $sel->is_element_present_ok("link=1785"); + $sel->is_element_present_ok("link=1790"); + $sel->is_element_present_ok("link=1791"); + $sel->is_element_present_ok("link=1800"); + $sel->is_element_present_ok("link=1810"); + $sel->is_element_present_ok("link=1820"); + $sel->is_element_present_ok("link=1830"); + $sel->is_element_present_ok("link=1840"); + $sel->is_element_present_ok("link=1890"); + $sel->is_element_present_ok("link=2000"); + $sel->is_element_present_ok("link=2010"); + $sel->is_element_present_ok("link=2020"); + $sel->is_element_present_ok("link=2100"); + $sel->is_element_present_ok("link=2107"); + $sel->is_element_present_ok("link=2110"); + $sel->is_element_present_ok("link=2120"); + $sel->is_element_present_ok("link=2125"); + $sel->is_element_present_ok("link=2130"); + $sel->is_element_present_ok("link=2140"); + $sel->is_element_present_ok("link=2150"); + $sel->is_element_present_ok("link=2170"); + $sel->is_element_present_ok("link=2171"); + $sel->is_element_present_ok("link=2175"); + $sel->is_element_present_ok("link=2200"); + $sel->is_element_present_ok("link=2208"); + $sel->is_element_present_ok("link=2209"); + $sel->is_element_present_ok("link=2212"); + $sel->is_element_present_ok("link=2214"); + $sel->is_element_present_ok("link=2215"); + $sel->is_element_present_ok("link=2218"); + $sel->is_element_present_ok("link=2280"); + $sel->is_element_present_ok("link=2282"); + $sel->is_element_present_ok("link=2284"); + $sel->is_element_present_ok("link=2285"); + $sel->is_element_present_ok("link=2287"); + $sel->is_element_present_ok("link=2289"); + $sel->is_element_present_ok("link=2310"); + $sel->is_element_present_ok("link=2315"); + $sel->is_element_present_ok("link=2320"); + $sel->is_element_present_ok("link=2341"); + $sel->is_element_present_ok("link=2342"); + $sel->is_element_present_ok("link=2350"); + $sel->is_element_present_ok("link=2351"); + $sel->is_element_present_ok("link=2375"); + $sel->is_element_present_ok("link=2376"); + $sel->is_element_present_ok("link=2380"); + $sel->is_element_present_ok("link=2400"); + $sel->is_element_present_ok("link=2401"); + $sel->is_element_present_ok("link=2405"); + $sel->is_element_present_ok("link=2450"); + $sel->is_element_present_ok("link=2500"); + $sel->is_element_present_ok("link=2501"); + $sel->is_element_present_ok("link=2505"); + $sel->is_element_present_ok("link=2510"); + $sel->is_element_present_ok("link=2520"); + $sel->is_element_present_ok("link=2600"); + $sel->is_element_present_ok("link=2650"); + $sel->is_element_present_ok("link=2657"); + $sel->is_element_present_ok("link=2660"); + $sel->is_element_present_ok("link=2670"); + $sel->is_element_present_ok("link=2680"); + $sel->is_element_present_ok("link=2700"); + $sel->is_element_present_ok("link=2710"); + $sel->is_element_present_ok("link=2715"); + $sel->is_element_present_ok("link=2720"); + $sel->is_element_present_ok("link=2725"); + $sel->is_element_present_ok("link=2730"); + $sel->is_element_present_ok("link=2732"); + $sel->is_element_present_ok("link=2733"); + $sel->is_element_present_ok("link=2735"); + $sel->is_element_present_ok("link=2739"); + $sel->is_element_present_ok("link=2742"); + $sel->is_element_present_ok("link=2743"); + $sel->is_element_present_ok("link=2744"); + $sel->is_element_present_ok("link=2746"); + $sel->is_element_present_ok("link=2747"); + $sel->is_element_present_ok("link=2750"); + $sel->is_element_present_ok("link=2797"); + $sel->is_element_present_ok("link=3000"); + $sel->is_element_present_ok("link=3090"); + $sel->is_element_present_ok("link=3100"); + $sel->is_element_present_ok("link=3110"); + $sel->is_element_present_ok("link=3120"); + $sel->is_element_present_ok("link=3300"); + $sel->is_element_present_ok("link=3400"); + $sel->is_element_present_ok("link=3420"); + $sel->is_element_present_ok("link=3425"); + $sel->is_element_present_ok("link=3440"); + $sel->is_element_present_ok("link=3550"); + $sel->is_element_present_ok("link=3559"); + $sel->is_element_present_ok("link=3580"); + $sel->is_element_present_ok("link=3581"); + $sel->is_element_present_ok("link=3582"); + $sel->is_element_present_ok("link=3589"); + $sel->is_element_present_ok("link=3600"); + $sel->is_element_present_ok("link=3610"); + $sel->is_element_present_ok("link=3650"); + $sel->is_element_present_ok("link=3731"); + $sel->is_element_present_ok("link=3735"); + $sel->is_element_present_ok("link=3750"); + $sel->is_element_present_ok("link=3760"); + $sel->is_element_present_ok("link=3780"); + $sel->is_element_present_ok("link=3790"); + $sel->is_element_present_ok("link=3800"); + $sel->is_element_present_ok("link=3830"); + $sel->is_element_present_ok("link=3850"); + $sel->is_element_present_ok("link=3960"); + $sel->is_element_present_ok("link=3970"); + $sel->is_element_present_ok("link=3980"); + $sel->is_element_present_ok("link=3990"); + $sel->is_element_present_ok("link=4000"); + $sel->is_element_present_ok("link=4110"); + $sel->is_element_present_ok("link=4120"); + $sel->is_element_present_ok("link=4125"); + $sel->is_element_present_ok("link=4126"); + $sel->is_element_present_ok("link=4127"); + $sel->is_element_present_ok("link=4130"); + $sel->is_element_present_ok("link=4138"); + $sel->is_element_present_ok("link=4139"); + $sel->is_element_present_ok("link=4140"); + $sel->is_element_present_ok("link=4145"); + $sel->is_element_present_ok("link=4149"); + $sel->is_element_present_ok("link=4150"); + $sel->is_element_present_ok("link=4167"); + $sel->is_element_present_ok("link=4170"); + $sel->is_element_present_ok("link=4175"); + $sel->is_element_present_ok("link=4180"); + $sel->is_element_present_ok("link=4190"); + $sel->is_element_present_ok("link=4199"); + $sel->is_element_present_ok("link=4200"); + $sel->is_element_present_ok("link=4210"); + $sel->is_element_present_ok("link=4220"); + $sel->is_element_present_ok("link=4230"); + $sel->is_element_present_ok("link=4240"); + $sel->is_element_present_ok("link=4250"); + $sel->is_element_present_ok("link=4260"); + $sel->is_element_present_ok("link=4261"); + $sel->is_element_present_ok("link=4271"); + $sel->is_element_present_ok("link=4280"); + $sel->is_element_present_ok("link=4288"); + $sel->is_element_present_ok("link=4289"); + $sel->is_element_present_ok("link=4301"); + $sel->is_element_present_ok("link=4305"); + $sel->is_element_present_ok("link=4320"); + $sel->is_element_present_ok("link=4340"); + $sel->is_element_present_ok("link=4350"); + $sel->is_element_present_ok("link=4355"); + $sel->is_element_present_ok("link=4360"); + $sel->is_element_present_ok("link=4361"); + $sel->is_element_present_ok("link=4380"); + $sel->is_element_present_ok("link=4390"); + $sel->is_element_present_ok("link=4396"); + $sel->is_element_present_ok("link=4397"); + $sel->is_element_present_ok("link=4500"); + $sel->is_element_present_ok("link=4505"); + $sel->is_element_present_ok("link=4510"); + $sel->is_element_present_ok("link=4515"); + $sel->is_element_present_ok("link=4520"); + $sel->is_element_present_ok("link=4525"); + $sel->is_element_present_ok("link=4530"); + $sel->is_element_present_ok("link=4535"); + $sel->is_element_present_ok("link=4540"); + $sel->is_element_present_ok("link=4545"); + $sel->is_element_present_ok("link=4550"); + $sel->is_element_present_ok("link=4560"); + $sel->is_element_present_ok("link=4565"); + $sel->is_element_present_ok("link=4570"); + $sel->is_element_present_ok("link=4580"); + $sel->is_element_present_ok("link=4595"); + $sel->is_element_present_ok("link=4600"); + $sel->is_element_present_ok("link=4610"); + $sel->is_element_present_ok("link=4630"); + $sel->is_element_present_ok("link=4635"); + $sel->is_element_present_ok("link=4638"); + $sel->is_element_present_ok("link=4640"); + $sel->is_element_present_ok("link=4650"); + $sel->is_element_present_ok("link=4651"); + $sel->is_element_present_ok("link=4652"); + $sel->is_element_present_ok("link=4653"); + $sel->is_element_present_ok("link=4654"); + $sel->is_element_present_ok("link=4655"); + $sel->is_element_present_ok("link=4660"); + $sel->is_element_present_ok("link=4663"); + $sel->is_element_present_ok("link=4664"); + $sel->is_element_present_ok("link=4666"); + $sel->is_element_present_ok("link=4668"); + $sel->is_element_present_ok("link=4670"); + $sel->is_element_present_ok("link=4673"); + $sel->is_element_present_ok("link=4674"); + $sel->is_element_present_ok("link=4676"); + $sel->is_element_present_ok("link=4678"); + $sel->is_element_present_ok("link=4679"); + $sel->is_element_present_ok("link=4680"); + $sel->is_element_present_ok("link=4700"); + $sel->is_element_present_ok("link=4710"); + $sel->is_element_present_ok("link=4730"); + $sel->is_element_present_ok("link=4750"); + $sel->is_element_present_ok("link=4760"); + $sel->is_element_present_ok("link=4780"); + $sel->is_element_present_ok("link=4790"); + $sel->is_element_present_ok("link=4800"); + $sel->is_element_present_ok("link=4805"); + $sel->is_element_present_ok("link=4806"); + $sel->is_element_present_ok("link=4809"); + $sel->is_element_present_ok("link=4810"); + $sel->is_element_present_ok("link=4815"); + $sel->is_element_present_ok("link=4822"); + $sel->is_element_present_ok("link=4824"); + $sel->is_element_present_ok("link=4826"); + $sel->is_element_present_ok("link=4830"); + $sel->is_element_present_ok("link=4831"); + $sel->is_element_present_ok("link=4832"); + $sel->is_element_present_ok("link=4840"); + $sel->is_element_present_ok("link=4841"); + $sel->is_element_present_ok("link=4842"); + $sel->is_element_present_ok("link=4843"); + $sel->is_element_present_ok("link=4850"); + $sel->is_element_present_ok("link=4851"); + $sel->is_element_present_ok("link=4852"); + $sel->is_element_present_ok("link=4855"); + $sel->is_element_present_ok("link=4860"); + $sel->is_element_present_ok("link=4870"); + $sel->is_element_present_ok("link=4875"); + $sel->is_element_present_ok("link=4880"); + $sel->is_element_present_ok("link=4900"); + $sel->is_element_present_ok("link=4905"); + $sel->is_element_present_ok("link=4909"); + $sel->is_element_present_ok("link=4910"); + $sel->is_element_present_ok("link=4920"); + $sel->is_element_present_ok("link=4925"); + $sel->is_element_present_ok("link=4930"); + $sel->is_element_present_ok("link=4940"); + $sel->is_element_present_ok("link=4945"); + $sel->is_element_present_ok("link=4946"); + $sel->is_element_present_ok("link=4950"); + $sel->is_element_present_ok("link=4955"); + $sel->is_element_present_ok("link=4957"); + $sel->is_element_present_ok("link=4960"); + $sel->is_element_present_ok("link=4965"); + $sel->is_element_present_ok("link=4966"); + $sel->is_element_present_ok("link=4969"); + $sel->is_element_present_ok("link=4970"); + $sel->is_element_present_ok("link=4980"); + $sel->is_element_present_ok("link=4985"); + $sel->is_element_present_ok("link=4990"); + $sel->is_element_present_ok("link=4992"); + $sel->is_element_present_ok("link=4993"); + $sel->is_element_present_ok("link=4994"); + $sel->is_element_present_ok("link=4995"); + $sel->is_element_present_ok("link=8100"); + $sel->is_element_present_ok("link=8110"); + $sel->is_element_present_ok("link=8120"); + $sel->is_element_present_ok("link=8125"); + $sel->is_element_present_ok("link=8130"); + $sel->is_element_present_ok("link=8135"); + $sel->is_element_present_ok("link=8150"); + $sel->is_element_present_ok("link=8190"); + $sel->is_element_present_ok("link=8195"); + $sel->is_element_present_ok("link=8200"); + $sel->is_element_present_ok("link=8300"); + $sel->is_element_present_ok("link=8310"); + $sel->is_element_present_ok("link=8315"); + $sel->is_element_present_ok("link=8320"); + $sel->is_element_present_ok("link=8400"); + $sel->is_element_present_ok("link=8500"); + $sel->is_element_present_ok("link=8506"); + $sel->is_element_present_ok("link=8508"); + $sel->is_element_present_ok("link=8520"); + $sel->is_element_present_ok("link=8540"); + $sel->is_element_present_ok("link=8580"); + $sel->is_element_present_ok("link=8581"); + $sel->is_element_present_ok("link=8582"); + $sel->is_element_present_ok("link=8589"); + $sel->is_element_present_ok("link=8590"); + $sel->is_element_present_ok("link=8591"); + $sel->is_element_present_ok("link=8595"); + $sel->is_element_present_ok("link=8600"); + $sel->is_element_present_ok("link=8650"); + $sel->is_element_present_ok("link=8700"); + $sel->is_element_present_ok("link=8710"); + $sel->is_element_present_ok("link=8720"); + $sel->is_element_present_ok("link=8725"); + $sel->is_element_present_ok("link=8726"); + $sel->is_element_present_ok("link=8727"); + $sel->is_element_present_ok("link=8731"); + $sel->is_element_present_ok("link=8735"); + $sel->is_element_present_ok("link=8750"); + $sel->is_element_present_ok("link=8760"); + $sel->is_element_present_ok("link=8780"); + $sel->is_element_present_ok("link=8790"); + $sel->is_element_present_ok("link=8800"); + $sel->is_element_present_ok("link=8801"); + $sel->is_element_present_ok("link=8807"); + $sel->is_element_present_ok("link=8808"); + $sel->is_element_present_ok("link=8809"); + $sel->is_element_present_ok("link=8820"); + $sel->is_element_present_ok("link=8827"); + $sel->is_element_present_ok("link=8828"); + $sel->is_element_present_ok("link=8829"); + $sel->is_element_present_ok("link=8900"); + $sel->is_element_present_ok("link=8905"); + $sel->is_element_present_ok("link=8910"); + $sel->is_element_present_ok("link=8915"); + $sel->is_element_present_ok("link=8919"); + $sel->is_element_present_ok("link=8920"); + $sel->is_element_present_ok("link=8921"); + $sel->is_element_present_ok("link=8922"); + $sel->is_element_present_ok("link=8924"); + $sel->is_element_present_ok("link=8925"); + $sel->is_element_present_ok("link=8930"); + $sel->is_element_present_ok("link=8935"); + $sel->is_element_present_ok("link=8939"); + $sel->is_element_present_ok("link=8940"); + $sel->is_element_present_ok("link=8945"); + $sel->is_element_present_ok("link=8949"); + $sel->is_element_present_ok("link=8950"); + $sel->is_element_present_ok("link=8955"); + $sel->is_element_present_ok("link=8960"); + $sel->is_element_present_ok("link=8970"); + $sel->is_element_present_ok("link=8980"); + $sel->is_element_present_ok("link=8990"); + $sel->is_element_present_ok("link=9000"); + $sel->is_element_present_ok("link=9008"); + $sel->is_element_present_ok("link=9009"); + $sel->is_element_present_ok("link=9090"); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S013TestAccount.t b/t/old/selenium/testscripts/system/begin/S013TestAccount.t new file mode 100644 index 000000000..5515ba73f --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S013TestAccount.t @@ -0,0 +1,32 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Test Account"); +SKIP: { + start_login(); + + $sel->click_ok("link=Konten anzeigen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=000000000001"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + # Die folegenden Zeilen testen die Checkboxen im Formular, welche nach bestimmten Regeln gelöscht werden. + # Hiefür muß erst ein Konzept erstellt werden, wann eine Checkbox aktiviert ist und wann nicht. + + # Test für das erste Konto, bei dem alle Felder deaktiviert werden müssen + isnt($sel->is_checked("//input[(\@name=\"AR_amount\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"AR_paid\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"AR_tax\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"AP_amount\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"AP_paid\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"AP_tax\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"IC_sale\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"IC_cogs\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"IC_taxpart\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"IC_income\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"IC_expense\")]"), 1, "Checkboxcheck"); + isnt($sel->is_checked("//input[(\@name=\"IC_taxservice\")]"), 1, "Checkboxcheck"); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/begin/S999Logout.t b/t/old/selenium/testscripts/system/begin/S999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/system/begin/S999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S000Login.t b/t/old/selenium/testscripts/system/end/S000Login.t new file mode 120000 index 000000000..11cbb2686 --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S000Login.t @@ -0,0 +1 @@ +../../base/000Login.t \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S992DeleteProductGroups.t b/t/old/selenium/testscripts/system/end/S992DeleteProductGroups.t new file mode 100644 index 000000000..1b95d4622 --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S992DeleteProductGroups.t @@ -0,0 +1,35 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + +diag("Delete product groups"); + +SKIP: { + start_login(); + $sel->click_ok("link=Warengruppen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe1"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + + skip("Produktgruppen, die noch benutzt werden, können nicht gelöscht werden!", 10) if(!$sel->is_element_present("document.forms[0].action[1]","Löschen")); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + + skip("Produktgruppen, die noch benutzt werden, können nicht gelöscht werden!", 6) if($sel->get_value("document.forms[0].action[1]") ne "Löschen"); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe3"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + + skip("Produktgruppen, die noch benutzt werden, können nicht gelöscht werden!", 2) if($sel->get_value("document.forms[0].action[1]") ne "Löschen"); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S994DeleteAccount.t b/t/old/selenium/testscripts/system/end/S994DeleteAccount.t new file mode 100644 index 000000000..97549350c --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S994DeleteAccount.t @@ -0,0 +1,21 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete Account"); +SKIP: { + start_login(); + + $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->click_ok("link=Konten anzeigen"); + $sel->wait_for_page_to_load($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=000000000001"); + $sel->wait_for_page_to_load_ok("30000"); + $sel->click_ok("document.EditAccount.action[1]"); + $sel->wait_for_page_to_load_ok("30000"); + isnt($sel->is_element_present("link=000000000001"),1,"Tests whether link for created acc is present"); + isnt($sel->is_text_present("TestSeleniumKonto"),1,"Tests wheter text of created acc is present"); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t b/t/old/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t new file mode 100644 index 000000000..171304614 --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t @@ -0,0 +1,23 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete customer/vendor types"); +SKIP: { + start_login(); + + $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->click_ok("link=Kunden-/Lieferantentypen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=Großabnehmer"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=Kleinkäufer"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S996DeletePaymentConditions.t b/t/old/selenium/testscripts/system/end/S996DeletePaymentConditions.t new file mode 100644 index 000000000..1df211b7d --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S996DeletePaymentConditions.t @@ -0,0 +1,18 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete payment conditions"); +SKIP: { + start_login(); + + $sel->click_ok("link=Zahlungskonditionen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=Schnellzahler/Skonto"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S997DeleteLanguages.t b/t/old/selenium/testscripts/system/end/S997DeleteLanguages.t new file mode 100644 index 000000000..ec8433fc0 --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S997DeleteLanguages.t @@ -0,0 +1,18 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete languages"); +SKIP: { + start_login(); + + $sel->click_ok("link=Sprachen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("link=elbisch"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S998DeletePriceBrackets.t b/t/old/selenium/testscripts/system/end/S998DeletePriceBrackets.t new file mode 100644 index 000000000..4f28ec6c7 --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S998DeletePriceBrackets.t @@ -0,0 +1,27 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete price brackets"); +SKIP: { + start_login(); + + $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->click_ok("link=Preisgruppen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=SeleniumTestPreisgruppe1"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + skip("Preisgruppen, die noch benutzt werden, können nicht gelöscht werden!", 6) if(!$sel->is_element_present("document.forms[0].action[1]","Löschen")); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=SeleniumTestPreisgruppe2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + skip("Preisgruppen, die noch benutzt werden, können nicht gelöscht werden!", 2) if(!$sel->is_element_present("document.forms[0].action[1]","Löschen")); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +}; +1; \ No newline at end of file diff --git a/t/old/selenium/testscripts/system/end/S999Logout.t b/t/old/selenium/testscripts/system/end/S999Logout.t new file mode 120000 index 000000000..43ce84a0d --- /dev/null +++ b/t/old/selenium/testscripts/system/end/S999Logout.t @@ -0,0 +1 @@ +../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/AllTests.t b/t/selenium/AllTests.t deleted file mode 100644 index c5ebf1d19..000000000 --- a/t/selenium/AllTests.t +++ /dev/null @@ -1,153 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2006/2007 -# Web http://www.lx-office.org -# -#===================================================================== -# -# Author: Udo Spallek, Thomas Kasulke -# Email: udono@gmx.net, tkasulke@linet-services.de -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#====================================================================== -# -# Selenium Main Caller -# Call all Selenium scripts from here. To use Selenium tests in -# Lx-Office you need to Install Selenium Remote Control. Take a look at -# the README Document for further informatinons on installing Selenium -# and testing Lx-Office and of course writing your own testcases. -# -####################################################################### - no strict; - push @INC, ['/t/selenium', \&init_server]; - use vars qw( $lxdebug $lxtest $sel ); - use strict; - use Carp; - - use Test::WWW::Selenium; - use Test::More qw(no_plan); - use IO::Socket; - - if(-f "/tmp/lxtest-temp.conf") { - eval { require('/tmp/lxtest-temp.conf'); }; - } - else { - eval { require('t/lxtest.conf'); }; - } - if ($@) { - diag("No test configuration found in t/lxtest.conf.\n - Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"); - exit 0; - } - - sub server_is_running { - return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, - PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, - ); - } - -# if (server_is_running) { -# plan tests => 200; # Need to be cutomized -# } - sub init_server { - my $singlefileonly = 0; - if ($_[0] eq "singlefileonly") { - $singlefileonly = 1; - shift; - } - if(!server_is_running) { - print "No selenium server found! " - ."Maybe you forgot to start it or " - ."the preferences in t/lxtest.conf doesen't fit to your system"; - exit 0; - } - - diag('Pretests and initialisation'); - - - - $lxtest->{test_id} = time; # create individual ids by unixtime - $lxtest->{testuserlogin} = $lxtest->{testlogin} . $lxtest->{test_id} if(!$lxtest->{testuserlogin}); - $lxtest->{testuserpasswd} = $lxtest->{test_id} if(!$lxtest->{testuserpasswd}); - $lxtest->{db} = $lxtest->{db} . $lxtest->{test_id} if(!($lxtest->{db} =~ /^seleniumtestdatabase[0-9]{10}$/)); - - ok(defined $lxtest->{rpw}, "Get root password"); - - ok(defined $lxtest->{dbhost}, "found dbhost in config"); - ok(defined $lxtest->{dbport}, "found dbport in config"); - ok(defined $lxtest->{dbuser}, "found dbuser in config"); - ok(defined $lxtest->{dbpasswd}, "found dbpasswd in config"); - - $lxtest->{lxadmin_url} = $lxtest->{lxbaseurl} . "admin.pl"; - $lxtest->{lxadmin_with_get} = $lxtest->{lxadmin_url} . "?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; - $lxtest->{lxadmin} = $lxtest->{lxadmin_url} . "?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; - - - - - eval { $sel = Test::WWW::Selenium->new( - host => $lxtest->{seleniumhost}, - port => $lxtest->{seleniumport}, - browser => $lxtest->{seleniumbrowser}, - browser_url => $lxtest->{lxadmin}, - auto_stop => '0', - ); - }; - if ($@) { - diag("No Selenium Server running, or wrong preferences\n\n"); - exit 0; - } - - ok(defined $sel, 'Creating Selenium Object'); - - diag('Starting Selenium tests...'); - - if(!$singlefileonly) { - foreach my $scriptdir (@_) { - opendir(SCRIPTS, 't/selenium/testscripts/' . $scriptdir) or die "Can't open directory!" . $!; - foreach (sort readdir(SCRIPTS)) { - if ( $_ =~ /^\w\d\d\d.*\.t$|^\d\d\d.*\.t$/ && !$sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_}) { - require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_); - $sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_} = 1; - } - } - closedir(SCRIPTS); - } - } - else { - foreach (@_) { - if ( $_ =~ /^.*\/\w\d\d\d.*\.t$|^.*\/\d\d\d.*\.t$/ && !$sel->{ran_tests}{$_}) { - require_ok($_); - $sel->{ran_tests}{$_} = 1; - } - } - } - if($!) { - @! = ("Test fehlgeschlagen!"); - } - $sel->stop(); - } - - sub start_login() { - require "t/selenium/testscripts/base/000Login.t" if(!$sel->{_page_opened}); - skip("Failed page to load pages!",) if(!$sel->{_page_opened}); - - if($sel->get_title() ne "Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}){ - require "t/selenium/testscripts/base/000Login.t"; - } - - $sel->select_frame_ok("relative=up"); - } - -1; diff --git a/t/selenium/README b/t/selenium/README deleted file mode 100644 index 35ae59a71..000000000 --- a/t/selenium/README +++ /dev/null @@ -1,7 +0,0 @@ -This directory contains all selenium testscripts for lx-office. -Selenium testscrips are the prefered way to test the higher lx -functionalities. For the selenium tests you need to install and -run a local selenium server on a machine whitch is able to start -a browser session. See README for more informations. - - diff --git a/t/selenium/TestAccounting.t b/t/selenium/TestAccounting.t deleted file mode 100644 index ea1ebd343..000000000 --- a/t/selenium/TestAccounting.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("accounting/begin", "accounting/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestAdmin.t b/t/selenium/TestAdmin.t deleted file mode 100644 index 130f6cc04..000000000 --- a/t/selenium/TestAdmin.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("administration/begin", "administration/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestAllTests.t b/t/selenium/TestAllTests.t deleted file mode 100644 index 442563820..000000000 --- a/t/selenium/TestAllTests.t +++ /dev/null @@ -1,8 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("administration/begin", "system/begin", "masterdata/begin", "selling/begin", "purchase/begin", - "accounting/begin", "payments/begin", "reports/begin", "programm/begin", - "programm/end", "reports/end", "payments/end", "accounting/end", "purchase/end", "selling/end", - "masterdata/end", "system/end", "administration/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestCreateTestbed.t b/t/selenium/TestCreateTestbed.t deleted file mode 100644 index 012ce9bdf..000000000 --- a/t/selenium/TestCreateTestbed.t +++ /dev/null @@ -1,8 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("administration/begin", "system/begin", "masterdata/begin"); - -diag("\n\nUsername: " . $lxtest->{testuserlogin} . "\n" . "Password: " . $lxtest->{testuserpasswd} . "\n\n"); - -1; - diff --git a/t/selenium/TestMasterData.t b/t/selenium/TestMasterData.t deleted file mode 100644 index 86c43a882..000000000 --- a/t/selenium/TestMasterData.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("masterdata/begin", "masterdata/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestPayments.t b/t/selenium/TestPayments.t deleted file mode 100644 index 2e2a8d5ac..000000000 --- a/t/selenium/TestPayments.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("payments/begin", "payments/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestPrinting.t b/t/selenium/TestPrinting.t deleted file mode 100644 index 75b9851d2..000000000 --- a/t/selenium/TestPrinting.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("printing/begin", "printing/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestProgramm.t b/t/selenium/TestProgramm.t deleted file mode 100644 index dffb6a306..000000000 --- a/t/selenium/TestProgramm.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("programm/begin", "programm/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestPurchase.t b/t/selenium/TestPurchase.t deleted file mode 100644 index 19cdf560a..000000000 --- a/t/selenium/TestPurchase.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("purchase/begin", "purchase/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestReports.t b/t/selenium/TestReports.t deleted file mode 100644 index 1f935a36d..000000000 --- a/t/selenium/TestReports.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("reports/begin", "reports/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestSelling.t b/t/selenium/TestSelling.t deleted file mode 100644 index ca31eccec..000000000 --- a/t/selenium/TestSelling.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("selling/begin", "selling/end"); - -1; \ No newline at end of file diff --git a/t/selenium/TestSystem.t b/t/selenium/TestSystem.t deleted file mode 100644 index 6dee18cf8..000000000 --- a/t/selenium/TestSystem.t +++ /dev/null @@ -1,5 +0,0 @@ -require "t/selenium/AllTests.t"; - -init_server("system/begin", "system/end"); - -1; \ No newline at end of file diff --git a/t/selenium/cleanup.pl b/t/selenium/cleanup.pl deleted file mode 100644 index 7e6bf6dea..000000000 --- a/t/selenium/cleanup.pl +++ /dev/null @@ -1,157 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2006 -# Web http://www.lx-office.org -# -#===================================================================== -# -# Author: Udo Spallek -# Email: udono@gmx.net -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#====================================================================== -# -# Selenium Cleanup Script -# To clean up all the messy databases and users while debugging testcases -# -####################################################################### - no strict; - push @INC, ['/t/selenium']; - use vars qw( $lxdebug $lxtest $sel ); - use strict; - use Carp; - - use WWW::Selenium; - use IO::Socket; - - my $cleanedupdb = ''; - my $cleanedupusers = ''; - - eval { require('t/lxtest.conf'); }; - if ($@) { - print "No test configuration found in t/lxtest.conf.\n - Maybe you forget to copy t/lxtest.conf.default to t/lxtest.conf. Exit test...\n"; - exit 0; - }; - - sub server_is_running { - return IO::Socket::INET->new(PeerAddr => $ENV{SRC_HOST} || $lxtest->{seleniumhost}, - PeerPort => $ENV{SRC_PORT} || $lxtest->{seleniumport}, - ); - } - if (server_is_running) { - } - else { - exit 0; - } - - $lxtest->{testuserlogin} = $lxtest->{testlogin}; - $lxtest->{db} = $lxtest->{db}; - - $lxtest->{lxadmin} = $lxtest->{lxbaseurl} . "admin.pl?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter"; - - eval { $sel = WWW::Selenium->new( - host => $lxtest->{seleniumhost}, - port => $lxtest->{seleniumport}, - browser => $lxtest->{seleniumbrowser}, - browser_url => $lxtest->{lxadmin}, - auto_stop => '0', - ); - }; - if ($@) { - print "No Selenium Server running, or wrong preferences\n\n"; - exit 0; - } - - - print "\nStarting Testdebugging Cleanup...\n"; - - -### Delete user - -$sel->start; -print "Cleanup all users '$lxtest->{testuserlogin}*'\n"; -$sel->open($lxtest->{lxadmin}); - -my @links= $sel->get_all_links(); -my $testuserlogin = $lxtest->{testuserlogin}; - -foreach my $link (@links) { - - if ($link =~ /$testuserlogin\d\d\d\d\d\d\d\d\d\d/){ - $sel->click("link=$lxtest->{testuserlogin}11*"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $cleanedupusers .= " $link\n"; - } -} - -print "Lock the system\n"; -$sel->click("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); -$sel->wait_for_page_to_load($lxtest->{timeout}); - -print "Cleanup all test databasees: '$lxtest->{db}*'\n"; - - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->type("dbhost", $lxtest->{dbhost}); - $sel->type("dbport", $lxtest->{dbport}); - $sel->type("dbuser", $lxtest->{dbuser}); - $sel->type("dbpasswd", $lxtest->{dbpasswd}); - - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); - $sel->wait_for_page_to_load($lxtest->{timeoutlong}); - - my $field = $sel->get_body_text(); - my $database= $lxtest->{db}; - my @fields = split(' ', $field); - - - foreach my $field (@fields) { - - if ($field =~ /$database\d\d\d\d\d\d\d\d\d\d/){ - $sel->open($lxtest->{lxadmin}); - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->type("dbhost", $lxtest->{dbhost}); - $sel->type("dbport", $lxtest->{dbport}); - $sel->type("dbuser", $lxtest->{dbuser}); - $sel->type("dbpasswd", $lxtest->{dbpasswd}); - - $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); - $sel->wait_for_page_to_load($lxtest->{timeoutlong}); - $sel->check("name=db value=$field"); - $sel->click("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); - $cleanedupdb .= " $field\n"; - - } - } - -$sel->open($lxtest->{lxadmin}); -print "Unlock the system\n"; - -$sel->click("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); -$sel->wait_for_page_to_load($lxtest->{timeout}); - -$cleanedupdb = "none.\n" if ($cleanedupdb eq ''); -$cleanedupusers = "none.\n" if ($cleanedupusers eq ''); - -print "Ready. \nReport:\n--- Cleaned up Users:\n$cleanedupusers---Cleaned up Databases:\n$cleanedupdb"; - -$sel->stop; - -exit 1; - - diff --git a/t/selenium/incomming/ustva-Inland-linet.html b/t/selenium/incomming/ustva-Inland-linet.html deleted file mode 100644 index c8e12bedd..000000000 --- a/t/selenium/incomming/ustva-Inland-linet.html +++ /dev/null @@ -1,3073 +0,0 @@ - - - -ustva-Inland-linet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ustva-Inland-linet
break
setTimeout120000
selectFramerelative=top
openhttps://lx-office.linet-services.de/svn-installationen/unstable/admin.pl?path=bin/mozilla/&rpw=roXyrPyqv9wE2&nextsub=list_users&action=Weiter
assertTitleLx-Office ERP Administration -
clickAndWaitdocument.forms[0].action[2]
assertTitleLx-Office ERP / Datenbankadministration -
selectWindownull
clickAndWaitaction
assertTitleLx-Office ERP Datenbankadministration / Datenbank anlegen -
typedbSelenium_Testdb-_SKR03_IST_1619_2006_2007
clickdocument.forms[0].chart[2]
clickAndWaitaction
clickAndWaitaction
clickAndWaitlink=demo-1619
assertTitleLx-Office ERP Administration / Benutzerdaten bearbeiten -
typedbnameSelenium_Testdb-_SKR03_IST_1619_2006_2007
clickAndWaitaction
assertTitleLx-Office ERP Administration -
typelogindemo-1619
typepassworddemo
clickAndWaitdocument.forms[1].action
assertTitleDatenbankaktualisierung*
clickAndWait//input[@value='Weiter']
assertTitleLx-Office Version*
selectFramerelative=top
clicklink=Kunde erfassen
selectFramemain_window
waitForPageToLoad120000
typenameTestkunde
clickAndWaitaction
selectFramerelative=top
clicklink=Lieferant erfassen
selectFramemain_window
waitForPageToLoad120000
typenameTestlieferant
clickAndWaitaction
selectFramerelative=top
clicklink=Ware erfassen
selectFramemain_window
waitForPageToLoad120000
typepartnumber100-7%
typedescriptionTestware 7%
selectbuchungsgruppen_idlabel=Standard 7%
typelastcost50
typesellprice100
clickAndWaitdocument.ic.action[1]
selectFramerelative=top
clicklink=Ware erfassen
selectFramemain_window
waitForPageToLoad120000
typepartnumber1
typedescriptionTestware 16%/19%
selectbuchungsgruppen_idlabel=Standard 16%/19%
typelastcost50
typesellprice100
clickAndWaitdocument.ic.action[1]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber1
typepartnumber_11
typeinvdate1.3.2007
typedatepaid_110.3.2007
typesource_11
typememo_11
typepaid_1119
clickAndWaitdocument.invoice.action[6]
clickndx
clickAndWaitaction
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber2
typeinvdate11.11.2006
typedatepaid_120.11.2006
typepartnumber_11
typesource_14
typememo_14
typepaid_1116
clickAndWaitdocument.invoice.action[6]
clickndx
clickAndWaitaction
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber3
typeinvdate03.12.2006
typeduedate10.12.2006
typepartnumber_11
clickAndWaitupdate_button
clickndx
clickAndWaitaction
assertTextPresentUmsatzsteuer
assertTextPresent16,00
typedeliverydate15.12.2006
clickAndWaitupdate_button
assertTextPresentUmsatzsteuer
assertTextPresent16,00
typedatepaid_120.12.2006
typesource_14
typememo_14
typepaid_1116
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber4
typeinvdate8.08.2006
typedeliverydate10.09.2006
typepartnumber_11
clickAndWaitupdate_button
clickndx
clickAndWaitaction
assertText//td[3]/table/tbody/tr[2]/td16,00
typedatepaid_12.2.2007
typesource_17
typememo_17
typepaid_1116
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber5
typeinvdate10.06.2006
typedeliverydate13.1.2007
typepartnumber_11
typedatepaid_112.7.2006
typesource_145
typememo_144
typepaid_1119
clickAndWaitdocument.invoice.action[6]
clickndx
clickAndWaitaction
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Dialogbuchen
selectFramemain_window
waitForPageToLoad120000
selectaccno_1label=1588--Bezahlte Einfuhrumsatzsteuer
selectaccno_2label=1200--Bank
typereferenceTest 1588 Kz62
typedescriptionTest 1588 Kz62
typetransdate1.10.2005
typedebit_1143,2455
typecredit_2143,2455
clickAndWaitaction
clickAndWaitdocument.gl.action[1]
waitForTextPresentgespeichert
selectFramerelative=top
clicklink=Debitorenbuchung
selectFramemain_window
waitForPageToLoad120000
selectAR_amount_1label=8400--Erlöse 16%/19% USt.
typeamount_12000
clickAndWaitaction
typetransdate19.2.2007
clickAndWaitaction
typedatepaid_11.4.2007
typesource_12
typememo_12
typepaid_12000
selectAR_paid_1label=1200--Bank
typeinvnumberDebitorenbuchung
clickAndWaitdocument.arledger.action[1]
selectFramerelative=top
clicklink=Kreditorenbuchung
selectFramemain_window
waitForPageToLoad120000
selectAP_amount_1label=0420--Büroeinrichtung
typeinvnumberKreditorenbuchung
typeamount_12000
clickAndWaitaction
typetransdate20.05.2007
typedatepaid_11.6.2007
typesource_1123
typememo_1123
typepaid_11000
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber9-7%
typeinvdate1.1.2008
typedeliverydate3.1.2008
typepartnumber_1100-7%
typedatepaid_110.1.2008
typesource_145
typememo_144
typepaid_1107
clickAndWaitupdate_button
selectWindowmain_window
assertText//td[3]/table/tbody/tr[2]/td7,00
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber120
typeinvdate1.1.2005
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber130
typeinvdate1.1.2006
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber131
typeinvdate1.2.2006
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Einkaufsrechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber132
typeinvdate1.3.2006
typepartnumber_11
selectFramerelative=up
selectFramemain_window
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clickAndWaitaction
clickAndWaitdocument.forms[0].action[1]
selectFramerelative=top
clicklink=Konto erfassen
selectFramemain_window
waitForPageToLoad120000
typeaccno1775Skonto
typedescriptionUmsatzsteuerkorrektur 16% bei Skonto
selectAccountTypelabel=Aufwandskonto (E)
clickAR_paid
clickAR_tax
clickAndWaitaction
waitForPageToLoad120000
clickAndWaitlink=1775Skonto
typetaxkey_startdate_01.1.1970
selecttaxkey_pos_ustva_0label=511
clickAndWaitaction
waitForPageToLoad120000
selectFramerelative=top
clicklink=Rechnung erfassen
selectFramemain_window
waitForPageToLoad120000
typeinvnumber14-3%-SKONTO
typeinvdate1.2.2003
typedeliverydate3.2.2003
typepartnumber_11
clickAndWaitupdate_button
clickndx
clickAndWaitaction
clicktaxincluded
typesellprice_11431,79
clickAndWaitupdate_button
typedatepaid_104.02.2003
typesource_112345
typepaid_11388,84
selectAR_paid_1label=1200--Bank
clickAndWaitupdate_button
typedatepaid_204.02.2003
typesource_212345
typepaid_237,03
selectAR_paid_2label=8735--Gewährte Skonti 16%/19% USt.
clickAndWaitupdate_button
typedatepaid_304.02.2003
typesource_312345
typememo_3Skontokorrektur UST 16%
typepaid_35,92
selectAR_paid_3label=1775Skonto--Umsatzsteuerkorrektur 16% bei Skonto
clickAndWaitupdate_button
clickAndWaitdocument.invoice.action[6]
selectFramerelative=top
clicklink=UStVa Einstellungen
selectFramemain_window
waitForPageToLoad120000
selectelsterland_newlabel=Nordrhein Westfalen
selectelsterFFFF_newlabel=Aachen-Innenstadt (5201)
clickcash
clickmonth
clickAndWaitaction
selectpart_1_1label=1
selectpart_1_2label=2
selectpart_1_3label=3
selectpart_1_4label=4
selectpart_2_1label=5
selectpart_2_2label=6
selectpart_2_3label=7
selectpart_2_4label=8
clickAndWaitdocument.elsterform.action[1]
selectFramerelative=up
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=März
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=November
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Dezember
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Februar
clickAndWaitaction
assertText//tr[11]/td[2]35
assertText//tr[11]/td[3]100
assertText//tr[11]/td[4]36
assertText//tr[11]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Juli
clickAndWaitaction
assertText//tr[11]/td[2]35
assertText//tr[11]/td[3]100
assertText//tr[11]/td[4]36
assertText//tr[11]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2005
selectzeitraumlabel=Oktober
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[39]/td[2]62
assertText//tr[39]/td[3]143,25
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=April
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]1681
assertText//tr[9]/td[5]319,33
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Mai
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[37]/td[3]319,33
assertText//tr[37]/td[2](Spalte 66)
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2008
selectzeitraumlabel=Januar
clickAndWaitaction
selectFramerelative=up
selectFramemain_window
assertText//tr[10]/td[2](Spalte 86)
assertText//tr[10]/td[3]100
assertText//tr[10]/td[5]7,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2005
selectzeitraumlabel=Januar
clickAndWaitaction
selectFramerelative=top
selectFramemain_window
assertText//tr[37]/td[3]8,00
assertText//tr[37]/td[2](Spalte 66)
selectFramerelative=up
clicklink=UStVa
waitForPageToLoad120000
selectFramemain_window
selectyearlabel=2003
selectzeitraumlabel=Februar
clickAndWaitaction
selectFramerelative=top
selectFramemain_window
assertText//tr[9]/td[3]1197
assertText//tr[9]/td[5]191,57
selectFramerelative=top
clicklink=UStVa Einstellungen
selectFramemain_window
waitForPageToLoad120000
clickaccrual
clickmonth
clickAndWaitaction
selectpart_1_1label=1
selectpart_1_2label=2
selectpart_1_3label=3
selectpart_1_4label=4
selectpart_2_1label=5
selectpart_2_2label=6
selectpart_2_3label=7
selectpart_2_4label=8
clickAndWaitdocument.elsterform.action[1]
selectFramerelative=up
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=März
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=November
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Dezember
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=August
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 51)
assertText//tr[9]/td[3]100
assertText//tr[9]/td[4](Spalte 51 rechts)
assertText//tr[9]/td[5]16,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2006
selectzeitraumlabel=Juni
clickAndWaitaction
assertText//tr[11]/td[2]35
assertText//tr[11]/td[3]100
assertText//tr[11]/td[4]36
assertText//tr[11]/td[5]19,00
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2005
selectzeitraumlabel=Oktober
clickAndWaitaction
assertText//tr[39]/td[2]62
assertText//tr[39]/td[3]143,25
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Februar
clickAndWaitaction
assertText//tr[9]/td[2](Spalte 81)
assertText//tr[9]/td[3]1681
assertText//tr[9]/td[5]319,33
selectFramerelative=top
clicklink=UStVa
selectFramemain_window
waitForPageToLoad120000
selectyearlabel=2007
selectzeitraumlabel=Mai
clickAndWaitaction
assertText//tr[37]/td[3]319,33
assertText//tr[37]/td[2](Spalte 66)
selectFramerelative=up
clicklink=UStVa
waitForPageToLoad120000
selectFramemain_window
selectyearlabel=2003
selectzeitraumlabel=Februar
clickAndWaitaction
selectFramerelative=top
selectFramemain_window
assertText//tr[9]/td[3]1197
assertText//tr[9]/td[5]191,57
breakSet the Startpoint to the next command manually
selectFramerelative=top
openhttps://lx-office.linet-services.de/svn-installationen/unstable/admin.pl?path=bin/mozilla/&rpw=roXyrPyqv9wE2&nextsub=list_users&action=Weiter
assertTitleLx-Office ERP Administration -
clickAndWaitlink=demo-1619
typedbnameleer
assertTitleLx-Office ERP Administration / Benutzerdaten bearbeiten -
clickAndWaitdocument.forms[0].action[0]
clickAndWaitdocument.forms[0].action[2]
assertTitleLx-Office ERP / Datenbankadministration -
clickAndWaitdocument.forms[0].action[2]
assertTitleLx-Office ERP Datenbankadministration / Datenbank löschen -
selectdblabel=Selenium_Testdb-_SKR03_IST_1619_2006_2007
clickAndWaitaction
assertTitleLx-Office ERP Datenbankadministration / Datenbank löschen -
clickAndWaitaction
assertTitleLx-Office ERP Administration -
- - diff --git a/t/selenium/testscripts/README b/t/selenium/testscripts/README deleted file mode 100644 index 70b4818d7..000000000 --- a/t/selenium/testscripts/README +++ /dev/null @@ -1,2 +0,0 @@ -All Selenium testscripts can be found here. The tests will be included -sequential from 001 to 999. \ No newline at end of file diff --git a/t/selenium/testscripts/accounting/begin/A000Login.t b/t/selenium/testscripts/accounting/begin/A000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/accounting/begin/A000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/accounting/begin/A999Logout.t b/t/selenium/testscripts/accounting/begin/A999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/accounting/begin/A999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/accounting/end/A000Login.t b/t/selenium/testscripts/accounting/end/A000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/accounting/end/A000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/accounting/end/A999Logout.t b/t/selenium/testscripts/accounting/end/A999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/accounting/end/A999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t b/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t deleted file mode 100644 index 7a568f0e8..000000000 --- a/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t +++ /dev/null @@ -1,48 +0,0 @@ -### Create Database -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly", $0); - exit(0); -} -$sel->open_ok($lxtest->{lxadmin}); - -if($sel->get_title() eq "") { - $sel->open_ok($lxtest->{lxadmin_url}); - $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Anmeldung\")]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -} - -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Lock the system'); -$sel->click_ok("document.forms[0].action[3]"); # Button für System sperren -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); - -$sel->title_is("Lx-Office ERP Administration -"); -diag("Create test database '$lxtest->{db}'"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP / Datenbankadministration -"); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); -$sel->type_ok("dbhost", $lxtest->{dbhost}); -$sel->type_ok("dbport", $lxtest->{dbport}); -$sel->type_ok("dbdefault", $lxtest->{dbdefault}); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank anlegen\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); -$sel->type_ok("db", $lxtest->{db}); -$sel->select_ok("encoding", "label=ISO 8859-1"); -$sel->select_ok("chart", "label=Germany-DATEV-SKR03EU"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Unlock the system'); -$sel->click_ok("document.forms[0].action[3]"); # BUtton für System entsperren -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); -1; \ No newline at end of file diff --git a/t/selenium/testscripts/administration/begin/A002CreateTestUser.t b/t/selenium/testscripts/administration/begin/A002CreateTestUser.t deleted file mode 100644 index 58200e617..000000000 --- a/t/selenium/testscripts/administration/begin/A002CreateTestUser.t +++ /dev/null @@ -1,40 +0,0 @@ -### Create new user - -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly", $0); - exit(0); -} - -diag("Create test user '$lxtest->{testuserlogin}'"); -$sel->open_ok($lxtest->{lxadmin}); - -$sel->title_is("Lx-Office ERP Administration -"); -$sel->click_ok("action"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration / Benutzer erfassen -"); -$sel->type_ok("login", $lxtest->{testuserlogin}); -$sel->type_ok("password", $lxtest->{testuserpasswd}); -$sel->type_ok("name", "Selenium"); -$sel->type_ok("email", "selenium\@lx-office.org"); -$sel->type_ok("signature", "Selenium Testuser"); -$sel->type_ok("tel", "0000"); -$sel->type_ok("fax", "1111"); -$sel->type_ok("company", "Sel-enium"); -$sel->type_ok("signature", "Selenium Testuser\nTestfirma"); -$sel->type_ok("address", "Testfirma"); -$sel->type_ok("taxnumber", "111-222-333-444"); -$sel->type_ok("co_ustid", "1234567"); -$sel->type_ok("duns", "0987654321"); -#$sel->click_ok("dbdriver"); -$sel->type_ok("newtemplates", "seleniumtestuser"); -$sel->click_ok("menustyle"); -$sel->type_ok("dbhost", $lxtest->{dbhost}); -$sel->type_ok("dbname", $lxtest->{db}); -$sel->type_ok("dbport", $lxtest->{dbport}); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); -$sel->click_ok("action"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); -1; \ No newline at end of file diff --git a/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t b/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t deleted file mode 100644 index e835959ee..000000000 --- a/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t +++ /dev/null @@ -1,68 +0,0 @@ -### Update Database -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly", $0); - exit(0); -} - -# NOTEST: some preruns for initializing missing parameters -$sel->open($lxtest->{lxadmin}); - -$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -$sel->wait_for_page_to_load($lxtest->{timeout}); -$sel->type("dbuser", $lxtest->{dbuser}); -$sel->type("dbpasswd", $lxtest->{dbpasswd}); -$sel->type("dbuser", $lxtest->{dbuser}); -$sel->type("dbhost", $lxtest->{dbhost}); -$sel->type("dbport", $lxtest->{dbport}); -$sel->type("dbdefault", $lxtest->{dbdefault}); -$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); -$sel->wait_for_page_to_load($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); - -my $count =0; - -while (){ # count the number of radiobuttons - eval { $sel->is_checked("//input[(\@id=\"$count\")]"); }; - if ( $@ ) { $count--; last; }; - $count++; -} - -#TEST: Now run the Tests - -$sel->open_ok($lxtest->{lxadmin}); -$sel->title_is("Lx-Office ERP Administration -"); - -#diag('Lock the system'); -#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); -#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); - -diag('Update the database'); - -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP / Datenbankadministration -"); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbhost", $lxtest->{dbhost}); -$sel->type_ok("dbport", $lxtest->{dbport}); -$sel->type_ok("dbdefault", $lxtest->{dbdefault}); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); - -for (my $i=0; $i <= $count; $i++){ - $sel->uncheck_ok("//input[(\@id=\"$i\")]"); -} - -#$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]"); -#$sel->check_ok("//input[\@name=\"db$lxtest->{db}\"]"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->title_like( qr/Lx-Office ERP Datenbankadministration/ ); - -#diag('Unlock the system'); -#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); -#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -#$sel->title_is("Lx-Office ERP Administration -"); -1; diff --git a/t/selenium/testscripts/administration/end/A998DeleteTestUser.t b/t/selenium/testscripts/administration/end/A998DeleteTestUser.t deleted file mode 100644 index 45cb7d32c..000000000 --- a/t/selenium/testscripts/administration/end/A998DeleteTestUser.t +++ /dev/null @@ -1,17 +0,0 @@ -### Delete user -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} - -diag("Delete test user '$lxtest->{testuserlogin}'"); -$sel->open_ok($lxtest->{lxadmin}); - -$sel->title_is("Lx-Office ERP Administration -"); -$sel->click_ok("link=$lxtest->{testuserlogin}"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration / Benutzerdaten bearbeiten -"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -1; \ No newline at end of file diff --git a/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t b/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t deleted file mode 100644 index 1051dfbd9..000000000 --- a/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t +++ /dev/null @@ -1,40 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} - -$sel->open_ok($lxtest->{lxadmin}); - -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Lock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); - -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); -diag("Delete test database '$lxtest->{db}'"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP / Datenbankadministration -"); -$sel->type_ok("dbhost", $lxtest->{dbhost}); -$sel->type_ok("dbport", $lxtest->{dbport}); -$sel->type_ok("dbuser", $lxtest->{dbuser}); -$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank löschen\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); -$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank löschen -"); - -$sel->select_ok("db", "label=" . $lxtest->{db}); - -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->body_text_is("Lx-Office ERP Datenbankadministration / Datenbank löschen Die Datenbank $lxtest->{db} wurde erfolgreich gelöscht."); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); - -diag('Unlock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); -1; \ No newline at end of file diff --git a/t/selenium/testscripts/base/000Login.t b/t/selenium/testscripts/base/000Login.t deleted file mode 100644 index 864ebd120..000000000 --- a/t/selenium/testscripts/base/000Login.t +++ /dev/null @@ -1,36 +0,0 @@ -### Login - -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} - -diag("Login"); - -$sel->open_ok($lxtest->{lxbaseurl}."/login.pl"); - -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office Version ".$lxtest->{version}); -$sel->type_ok("login", $lxtest->{testuserlogin}); -$sel->type_ok("password", $lxtest->{testuserpasswd}); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Anmeldung\")]"); - -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); - -if($sel->get_text("//td") eq "Ungültiger Benutzername oder falsches Passwort!") { - diag("\n\n\n\nWrong username or password!\n\n\n\n"); - $sel->stop; - exit(-1); -} - -if($sel->get_title() eq "Datenbankaktualisierung - Lx-Office Version 2.4.3 - -") { - $sel->click_ok("//input[(\@name=\"dummy\") and (\@value=\"Weiter\")]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); - $sel->click_ok("//input[(\@type=\"submit\") and (\@value=\"Weiter\")]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -} - -$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); -$sel->{ran_tests}{"t/selenium/testscripts/base/999Logout.t"} = 0; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/base/999Logout.t b/t/selenium/testscripts/base/999Logout.t deleted file mode 100644 index 247d61e18..000000000 --- a/t/selenium/testscripts/base/999Logout.t +++ /dev/null @@ -1,15 +0,0 @@ -### Logout - -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly", "t/selenium/testscripts/base/000Login.t", $0); - exit(0); -} - -diag("Logout"); -$sel->select_frame_ok("relative=top"); -$sel->click_ok("link=abmelden"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office Version ".$lxtest->{version}); -$sel->{ran_tests}{"t/selenium/testscripts/base/000Login.t"} = 0; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M000Login.t b/t/selenium/testscripts/masterdata/begin/M000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/masterdata/begin/M000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t b/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t deleted file mode 100644 index 43a97a5d7..000000000 --- a/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t +++ /dev/null @@ -1,112 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create first Customer"); -SKIP: { - start_login(); - - $sel->click_ok("link=Kunde erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("customernumber"); - $sel->type_ok("customernumber", "001"); - $sel->type_ok("greeting", "Firma"); - $sel->type_ok("name", "Selenium-Testfirma1"); - $sel->type_ok("department_1", "Einkauf"); - $sel->type_ok("department_2", "extern"); - $sel->type_ok("street", "Grummelburger 111"); - $sel->type_ok("zipcode", "37115"); - $sel->type_ok("city", "Musterstadt"); - $sel->type_ok("country", "Germany"); - $sel->type_ok("creditlimit", "10000000"); - $sel->type_ok("discount", "5"); - $sel->type_ok("account_number", "1"); - $sel->select_ok("salesman_id", "label=Selenium"); - $sel->type_ok("notes", "keine Bemerkungen"); - $sel->click_ok("link=Lieferadresse"); - $sel->click_ok("shipto_id"); - $sel->select_ok("shipto_id", "label=Alle"); - $sel->click_ok("//tr[1]/td/select/option[2]"); - $sel->click_ok("shiptoname"); - $sel->click_ok("shiptodepartment_1"); - $sel->type_ok("shiptodepartment_1", "Einkauf"); - $sel->type_ok("shiptostreet", "Donnerburger 12"); - $sel->type_ok("shiptozipcode", "37115"); - $sel->type_ok("shiptocity", "Musterstadt"); - $sel->type_ok("shiptocountry", "Germany"); - $sel->type_ok("shiptocontact", "Herr Mustermann"); - $sel->type_ok("shiptophone", "0"); - $sel->type_ok("shiptofax", "1"); - $sel->type_ok("shiptoemail", "mustermann\@linet-services.de"); - $sel->click_ok("link=Ansprechpartner"); - $sel->click_ok("cp_greeting"); - $sel->type_ok("cp_greeting", "Frau"); - $sel->type_ok("cp_title", "Dr."); - $sel->type_ok("cp_abteilung", "Verkauf"); - $sel->type_ok("cp_givenname", "Mechtilde"); - $sel->type_ok("cp_name", "Grosshaupt"); - $sel->type_ok("cp_phone1", "05528 111111111"); - $sel->type_ok("cp_phone2", "05528 222222222"); - $sel->type_ok("cp_fax", "05528 222222223"); - $sel->type_ok("cp_mobile1", "05528 2222222224"); - $sel->type_ok("cp_mobile2", "05528 2222222225"); - $sel->type_ok("cp_satphone", "05528 2222222226"); - $sel->type_ok("cp_satfax", "05528 2222222227"); - $sel->type_ok("cp_project", "1"); - $sel->type_ok("cp_email", "mustergrosshaupt\@linet-services.de"); - $sel->type_ok("cp_privatphone", "05528 2222222220"); - $sel->type_ok("cp_privatemail", "keine\@linet-services.de"); - $sel->type_ok("cp_birthday", "05.09.1982"); - $sel->click_ok("link=Lieferungen"); - $sel->click_ok("delivery_id"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - - diag("Create second Customer"); - $sel->title_is("Kunde erfassen - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - $sel->select_frame_ok("relative=up"); - $sel->click_ok("link=Kunde erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=Rechnungsadresse"); - $sel->click_ok("customernumber"); - $sel->type_ok("creditlimit", "10000000"); - $sel->type_ok("customernumber", "2"); - $sel->click_ok("greeting"); - $sel->type_ok("greeting", "Herr"); - $sel->type_ok("name", "TestMann2"); - $sel->type_ok("street", "Goettingweg 3"); - $sel->type_ok("zipcode", "38100"); - $sel->type_ok("city", "Braunschweig"); - $sel->type_ok("country", "Germany"); - $sel->type_ok("phone", "0531 010101010101"); - $sel->type_ok("email", "testmann\@linet-services.de"); - $sel->click_ok("document.ct.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - - diag("Create third Customer"); - $sel->title_is("Kunde erfassen - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - $sel->select_frame_ok("relative=up"); - $sel->click_ok("link=Kunde erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("customernumber"); - $sel->type_ok("customernumber", "3"); - $sel->type_ok("creditlimit", "10000000"); - $sel->click_ok("greeting"); - $sel->type_ok("greeting", "Frau"); - $sel->type_ok("name", "TestFrau3"); - $sel->type_ok("department_1", "Outsourced"); - $sel->type_ok("street", "Billighäuser 3444"); - $sel->click_ok("street"); - $sel->click_ok("zipcode"); - $sel->type_ok("zipcode", "67899"); - $sel->type_ok("city", "Brunnenberge"); - $sel->type_ok("country", "Austria"); - $sel->click_ok("document.ct.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t b/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t deleted file mode 100644 index b1f2603c4..000000000 --- a/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t +++ /dev/null @@ -1,124 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create vendor"); -SKIP: { - start_login(); - - $sel->click_ok("link=Lieferant erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - diag("Create first vendor"); - $sel->select_frame_ok("main_window"); - $sel->click_ok("vendornumber"); - $sel->type_ok("vendornumber", "1"); - $sel->click_ok("selected_company_greeting"); - $sel->select_ok("selected_company_greeting", "label=Firma"); - $sel->click_ok("//option[2]"); - $sel->click_ok("name"); - $sel->type_ok("name", "TestLieferant1"); - $sel->type_ok("department_1", "GossAus"); - $sel->type_ok("street", "Berger 1"); - $sel->type_ok("zipcode", "11990"); - $sel->type_ok("city", "Drehmel"); - $sel->type_ok("country", "Germany"); - $sel->type_ok("contact", "Herr Custom"); - $sel->type_ok("phone", "01234 56787902"); - $sel->type_ok("fax", "01234 567879023"); - $sel->type_ok("email", "custom\@linet-services.de"); - $sel->type_ok("account_number", "2"); - $sel->click_ok("obsolete"); - $sel->click_ok("obsolete"); - $sel->type_ok("notes", "keine Bemerkungen"); - $sel->click_ok("link=Lieferadresse"); - $sel->click_ok("shipto_id"); - $sel->select_ok("shipto_id", "label=Alle"); - $sel->click_ok("//tr[1]/td/select/option[2]"); - $sel->click_ok("link=Ansprechpartner"); - $sel->click_ok("cp_id"); - $sel->click_ok("cp_id"); - $sel->click_ok("cp_greeting"); - $sel->click_ok("selected_cp_greeting"); - $sel->select_ok("selected_cp_greeting", "label=Frau"); - $sel->click_ok("//tr[2]/td/select/option[2]"); - $sel->click_ok("cp_title"); - $sel->click_ok("selected_cp_title"); - $sel->click_ok("cp_title"); - $sel->type_ok("cp_title", "Diplom Meterologin"); - $sel->click_ok("cp_abteilung"); - $sel->type_ok("cp_title", "Dipl. Inf."); - $sel->click_ok("cp_title"); - $sel->click_ok("cp_title"); - $sel->type_ok("cp_title", "Dipl. Ing."); - $sel->click_ok("cp_abteilung"); - $sel->type_ok("cp_abteilung", "Externes"); - $sel->type_ok("cp_givenname", "Hildegunde"); - $sel->type_ok("cp_name", "Riess"); - $sel->type_ok("cp_phone1", "0111 222333444 5"); - $sel->click_ok("cp_birthday"); - $sel->type_ok("cp_birthday", "12.03.1964"); - $sel->click_ok("link=Lieferungen"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=Rechnungsadresse"); - $sel->click_ok("document.ct.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - diag("Create second vendor"); - $sel->click_ok("vendornumber"); - $sel->type_ok("vendornumber", "2"); - $sel->click_ok("greeting"); - $sel->click_ok("selected_company_greeting"); - $sel->select_ok("selected_company_greeting", "label=Firma"); - $sel->click_ok("//option[2]"); - $sel->click_ok("name"); - $sel->type_ok("name", "TestLieferant2"); - $sel->type_ok("department_1", "Verkauf"); - $sel->type_ok("department_2", "Orga"); - $sel->type_ok("street", "Wlkenweg 3"); - $sel->type_ok("zipcode", "09090"); - $sel->type_ok("city", "Brummbach"); - $sel->click_ok("city"); - $sel->type_ok("city", "Markt Brummbach"); - $sel->click_ok("country"); - $sel->type_ok("country", "Germany"); - $sel->click_ok("document.ct.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - diag("Create third vendor"); - $sel->click_ok("link=Rechnungsadresse"); - $sel->click_ok("vendornumber"); - $sel->type_ok("vendornumber", "3"); - $sel->click_ok("selected_company_greeting"); - $sel->select_ok("selected_company_greeting", "label=Firma"); - $sel->click_ok("//option[2]"); - $sel->type_ok("name", "TestFirma3 GmbH"); - $sel->type_ok("fax", "03232 7272727273"); - $sel->type_ok("creditlimit", "50000"); - $sel->type_ok("discount", "10"); - $sel->click_ok("link=Lieferadresse"); - $sel->click_ok("shiptoname"); - $sel->type_ok("shiptoname", "TestFirma3 GmbH"); - $sel->type_ok("shiptodepartment_1", "Vertrieb"); - $sel->type_ok("shiptostreet", "Grummelsburger 1423"); - $sel->type_ok("shiptozipcode", "40000"); - $sel->type_ok("shiptocity", "Hansastadt"); - $sel->type_ok("shiptocountry", "Germany"); - $sel->type_ok("shiptocontact", "Herr Baumann von Clausen"); - $sel->type_ok("shiptophone", "03232 7272727272"); - $sel->type_ok("shiptofax", "03232 7272727273"); - $sel->type_ok("shiptoemail", "baumann\@linet-services.de"); - $sel->click_ok("link=Ansprechpartner"); - $sel->click_ok("selected_cp_greeting"); - $sel->click_ok("cp_greeting"); - $sel->type_ok("cp_greeting", "Herr"); - $sel->type_ok("cp_abteilung", "Vertrieb"); - $sel->type_ok("cp_givenname", "Dietmar"); - $sel->type_ok("cp_name", "Baumann von Clausen"); - $sel->type_ok("cp_phone1", "03232 7272727272"); - $sel->type_ok("cp_fax", "03232 7272727273"); - $sel->type_ok("cp_birthday", "14.05.1971"); - $sel->click_ok("link=Lieferungen"); - $sel->click_ok("document.ct.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t b/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t deleted file mode 100644 index 593384127..000000000 --- a/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t +++ /dev/null @@ -1,67 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create goods"); -SKIP: { - start_login(); - - $sel->click_ok("link=Ware erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("partnumber", "1"); - $sel->type_ok("description", "TestWare1"); - $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe1"); - $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); - $sel->click_ok("trigger1"); - $sel->type_ok("listprice", "100,00"); - $sel->type_ok("sellprice", "150,00"); - $sel->type_ok("lastcost", "50,00"); - $sel->select_ok("price_factor_id", "label=pro 10"); - $sel->type_ok("notes", "Zu dieser Testware existiert keine Bemerkung"); - $sel->select_ok("unit", "label=kg"); - $sel->type_ok("weight", "10"); - $sel->type_ok("rop", "10"); - $sel->type_ok("bin", "1"); - $sel->type_ok("ve", "10"); - $sel->click_ok("shop"); - $sel->type_ok("microfiche", "27 drei 4tel"); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - # Spracheinstellungen müssen überarbeitet werden, bevor der Test laufen kann! - # $sel->click_ok("//button[\@type='button']"); - # $sel->wait_for_pop_up_ok("_new_generic", $lxtest->{timeout}); - # $sel->click_ok("//button[\@type='button']"); - # $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("price_1", "115,00"); - $sel->type_ok("price_2", "150,00"); - $sel->type_ok("make_1", "TestFabrikant1"); - $sel->type_ok("model_1", "TestWare1"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.ic.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber", "2"); - $sel->type_ok("description", "TestWareSelenium2"); - $sel->type_ok("listprice", "0,50"); - $sel->type_ok("sellprice", "1,00"); - $sel->type_ok("lastcost", ",25"); - $sel->select_ok("unit", "label=kg"); - $sel->type_ok("weight", "0,5"); - $sel->type_ok("rop", "2"); - $sel->type_ok("bin", "2"); - $sel->click_ok("not_discountable"); - $sel->type_ok("ve", "1"); - $sel->type_ok("notes", "Die ist Brot"); - # Spracheinstellungen müssen überarbeitet werden, bevor der Test laufen kann! - # $sel->click_ok("//button[\@type='button']"); - # $sel->wait_for_pop_up_ok("_new_generic", $lxtest->{timeout}); - # $sel->click_ok("//button[\@type='button']"); - # $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.ic.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M004AddService.t b/t/selenium/testscripts/masterdata/begin/M004AddService.t deleted file mode 100644 index 5a0dd19fc..000000000 --- a/t/selenium/testscripts/masterdata/begin/M004AddService.t +++ /dev/null @@ -1,44 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Add service"); -SKIP: { - start_login(); - - $sel->click_ok("link=Dienstleistung erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("partnumber", "999"); - $sel->type_ok("description", "Programmierstunde"); - $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3"); - $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); - $sel->type_ok("notes", "Eine Programmierstunde wird immer besser bezahlt"); - $sel->type_ok("listprice", "50,00"); - $sel->type_ok("sellprice", "100"); - $sel->type_ok("lastcost", "45"); - $sel->select_ok("unit", "label=Std"); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->type_ok("price_1", "100"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.ic.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber", "998"); - $sel->type_ok("description", "Telefonstunde"); - $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3"); - $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); - $sel->type_ok("notes", "gibt's beim Telekomunikator"); - $sel->type_ok("listprice", "0,05"); - $sel->type_ok("sellprice", "0,10"); - $sel->type_ok("lastcost", "0,02"); - $sel->select_ok("unit", "label=psch"); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->type_ok("price_1", "0,02"); - $sel->type_ok("price_2", "0,1"); - $sel->type_ok("price_1", "0,1"); - $sel->click_ok("document.ic.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M005AddProduct.t b/t/selenium/testscripts/masterdata/begin/M005AddProduct.t deleted file mode 100644 index 4bba0b218..000000000 --- a/t/selenium/testscripts/masterdata/begin/M005AddProduct.t +++ /dev/null @@ -1,35 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Add product"); -SKIP: { - start_login(); - - $sel->click_ok("link=Erzeugnis erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("partnumber", "991"); - $sel->type_ok("description", "Handykarten"); - $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe2"); - $sel->select_ok("buchungsgruppen_id", "label=Standard 16%/19%"); - $sel->click_ok("trigger1"); - $sel->type_ok("listprice", "3,00"); - $sel->type_ok("sellprice", "30,00"); - $sel->select_ok("unit", "label=Stck"); - $sel->type_ok("stock", "100"); - $sel->type_ok("rop", "10"); - $sel->type_ok("bin", "991"); - $sel->click_ok("not_discountable"); - $sel->click_ok("shop"); - $sel->type_ok("price_1", "30,00"); - $sel->type_ok("price_2", "30,00"); - $sel->type_ok("make_1", "TCom"); - $sel->type_ok("model_1", "standard"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.ic.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M006AddProject.t b/t/selenium/testscripts/masterdata/begin/M006AddProject.t deleted file mode 100644 index ad82886cf..000000000 --- a/t/selenium/testscripts/masterdata/begin/M006AddProject.t +++ /dev/null @@ -1,19 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} - -diag("Add project"); -SKIP: { - start_login(); - - $sel->click_ok("link=Projekt erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("projectnumber", "1001"); - $sel->type_ok("description", "tausend und eine Nacht"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M999Logout.t b/t/selenium/testscripts/masterdata/begin/M999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/masterdata/begin/M999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M000Login.t b/t/selenium/testscripts/masterdata/end/M000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/masterdata/end/M000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M995DeleteGoods.t b/t/selenium/testscripts/masterdata/end/M995DeleteGoods.t deleted file mode 100644 index d7af1353d..000000000 --- a/t/selenium/testscripts/masterdata/end/M995DeleteGoods.t +++ /dev/null @@ -1,17 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete good"); -SKIP: { - start_login(); - - $sel->click_ok("link=Erzeugnisse"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); -}; - -# an dieser Stelle muss noch überleegt werdne, wie der Zusaamenhang zwischen Lagerbestand und "Löschen" vernünftigt gehandhabt werdne kann - -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M996DeleteProject.t b/t/selenium/testscripts/masterdata/end/M996DeleteProject.t deleted file mode 100644 index d062010e4..000000000 --- a/t/selenium/testscripts/masterdata/end/M996DeleteProject.t +++ /dev/null @@ -1,24 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete project"); -SKIP: { - start_login(); - - $sel->click_ok("link=Projekte"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->text_is("link=1001", "1001"); - $sel->click_ok("link=1001"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - TODO: { - local $TODO= "Benutzte Projekte können nicht gelöscht werden!"; -# $sel->click_ok("document.forms[0].action[1]"); -# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - } -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M997DeleteService.t b/t/selenium/testscripts/masterdata/end/M997DeleteService.t deleted file mode 100644 index d206423d2..000000000 --- a/t/selenium/testscripts/masterdata/end/M997DeleteService.t +++ /dev/null @@ -1,28 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete service"); -SKIP: { - start_login(); - - $sel->click_ok("link=Dienstleistungen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->text_is("link=999", "999"); - $sel->text_is("link=998", "998"); - $sel->text_is("link=Programmierstunde", "Programmierstunde"); - $sel->text_is("link=Telefonstunde", "Telefonstunde"); - $sel->click_ok("link=999"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.ic.action[3]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=Telefonstunde"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.ic.action[3]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M998DeleteProduct.t b/t/selenium/testscripts/masterdata/end/M998DeleteProduct.t deleted file mode 100644 index d3f41a000..000000000 --- a/t/selenium/testscripts/masterdata/end/M998DeleteProduct.t +++ /dev/null @@ -1,31 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete product"); -SKIP: { - start_login(); - - $sel->click_ok("link=Waren"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->text_is("link=TestWare1", "TestWare1"); - $sel->text_is("link=TestWareSelenium2", "TestWareSelenium2"); - $sel->text_is("link=1", "1"); - $sel->text_is("link=2", "2"); - TODO: { - local $TODO = "Waren in Rechnungen können nicht gelöscht werden!"; -# $sel->click_ok("link=1"); -# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -# $sel->click_ok("document.ic.action[3]"); -# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -# $sel->click_ok("link=TestWareSelenium2"); -# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -# $sel->click_ok("document.ic.action[3]"); -# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - } -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M999Logout.t b/t/selenium/testscripts/masterdata/end/M999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/masterdata/end/M999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/payments/begin/P000Login.t b/t/selenium/testscripts/payments/begin/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/payments/begin/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/payments/begin/P999Logout.t b/t/selenium/testscripts/payments/begin/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/payments/begin/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/payments/end/P000Login.t b/t/selenium/testscripts/payments/end/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/payments/end/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/payments/end/P999Logout.t b/t/selenium/testscripts/payments/end/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/payments/end/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/printing/begin/P000Login.t b/t/selenium/testscripts/printing/begin/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/printing/begin/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/printing/begin/P999Logout.t b/t/selenium/testscripts/printing/begin/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/printing/begin/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/printing/end/P000Login.t b/t/selenium/testscripts/printing/end/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/printing/end/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/printing/end/P999Logout.t b/t/selenium/testscripts/printing/end/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/printing/end/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/programm/begin/P000Login.t b/t/selenium/testscripts/programm/begin/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/programm/begin/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/programm/begin/P999Logout.t b/t/selenium/testscripts/programm/begin/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/programm/begin/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/programm/end/P000Login.t b/t/selenium/testscripts/programm/end/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/programm/end/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/programm/end/P999Logout.t b/t/selenium/testscripts/programm/end/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/programm/end/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/purchase/begin/P000Login.t b/t/selenium/testscripts/purchase/begin/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/purchase/begin/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t b/t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t deleted file mode 100644 index 80597ce30..000000000 --- a/t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t +++ /dev/null @@ -1,42 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create quote request"); -SKIP: { - start_login(); - - $sel->click_ok("link=Neue Preisanfrage"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("partnumber_1"); - $sel->type_ok("partnumber_1", "1"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("quonumber"); - $sel->type_ok("quonumber", "1"); - $sel->click_ok("cp_id"); - $sel->select_ok("cp_id", "label=Baumann von Clausen (Vertrieb)"); - $sel->click_ok("//option[\@value='905']"); - $sel->click_ok("shipto_id"); - $sel->click_ok("shipto_id"); - $sel->click_ok("taxzone_id"); - $sel->click_ok("taxzone_id"); - $sel->click_ok("cb_show_details"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("payment_id"); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->click_ok("//option[\@value='886']"); - $sel->click_ok("//tr[5]/td/table/tbody/tr/td[3]"); - $sel->click_ok("taxincluded"); - $sel->click_ok("qty_1"); - $sel->type_ok("qty_1", "21"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/purchase/begin/P999Logout.t b/t/selenium/testscripts/purchase/begin/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/purchase/begin/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/purchase/end/P000Login.t b/t/selenium/testscripts/purchase/end/P000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/purchase/end/P000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/purchase/end/P999Logout.t b/t/selenium/testscripts/purchase/end/P999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/purchase/end/P999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/reports/begin/R000Login.t b/t/selenium/testscripts/reports/begin/R000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/reports/begin/R000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/reports/begin/R999Logout.t b/t/selenium/testscripts/reports/begin/R999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/reports/begin/R999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/reports/end/R000Login.t b/t/selenium/testscripts/reports/end/R000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/reports/end/R000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/reports/end/R999Logout.t b/t/selenium/testscripts/reports/end/R999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/reports/end/R999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S000Login.t b/t/selenium/testscripts/selling/begin/S000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/selling/begin/S000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S001CreateOffers.t b/t/selenium/testscripts/selling/begin/S001CreateOffers.t deleted file mode 100644 index a171a52e5..000000000 --- a/t/selenium/testscripts/selling/begin/S001CreateOffers.t +++ /dev/null @@ -1,71 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create offers"); -SKIP: { - start_login(); - - $sel->click_ok("link=Angebot erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); - $sel->select_ok("customer", "label=TestFrau3"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("customer", "label=Selenium-Testfirma1"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); - $sel->type_ok("shipvia", "per pedes"); - $sel->type_ok("transaction_description", "alpha"); - $sel->type_ok("quonumber", "1"); - $sel->select_ok("globalproject_id", "label=1001"); - $sel->click_ok("cb_show_details"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber_1", "1"); -# TODO: { -# local $TODO = "Popups werden von Selenium noch nicht unterstützt!"; -# $sel->click_ok("//button[\@type='button']"); -# $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -# } - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[5]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("customer", "label=TestFrau3"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber_1", "991"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("qty_1", "5"); - $sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("taxincluded"); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("customer", "label=TestMann2"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber_1", "1"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); - $sel->type_ok("qty_1", "19"); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S002CreateCharge.t b/t/selenium/testscripts/selling/begin/S002CreateCharge.t deleted file mode 100644 index d3b5318e7..000000000 --- a/t/selenium/testscripts/selling/begin/S002CreateCharge.t +++ /dev/null @@ -1,84 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create charge"); -SKIP: { - start_login(); - - $sel->click_ok("link=Auftrag erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); - $sel->type_ok("shippingpoint", "Braunschweig"); - $sel->type_ok("shipvia", "LKW"); - $sel->type_ok("transaction_description", "beta"); - $sel->click_ok("delivered"); - $sel->type_ok("ordnumber", "1"); - $sel->type_ok("quonumber", "1"); - $sel->type_ok("cusordnumber", "97862"); - $sel->select_ok("globalproject_id", "label=1001"); - $sel->type_ok("partnumber_1", "1"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("ship_1", "20"); - $sel->type_ok("qty_1", "20"); - $sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("customer", "label=TestFrau3"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("shippingpoint", "Göttingen"); - $sel->type_ok("shipvia", "PKW"); - $sel->type_ok("transaction_description", "teta"); - $sel->type_ok("ordnumber", "2"); - $sel->type_ok("quonumber", "2"); - $sel->type_ok("cusordnumber", "23453666"); - $sel->type_ok("partnumber_1", "911"); - $sel->type_ok("ship_1", "5"); - $sel->type_ok("qty_1", "5"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("description", "Handykarten D2"); - $sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3"); - $sel->type_ok("listprice", "10,00"); - $sel->type_ok("sellprice", "20,00"); - $sel->type_ok("lastcost", "5,00"); - $sel->select_ok("price_factor_id", "label=pro 10"); - $sel->select_ok("unit", "label=Stck"); - $sel->type_ok("bin", "911"); - $sel->click_ok("not_discountable"); - $sel->click_ok("shop"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.ic.action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("customer", "label=TestMann2"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber_1", "991"); - $sel->type_ok("ship_1", "10"); - $sel->type_ok("qty_1", "10"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_ok("price_factor_id_1", "label=pro 10"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("sellprice_1", "1000"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.oe.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S003CreateInvoice.t b/t/selenium/testscripts/selling/begin/S003CreateInvoice.t deleted file mode 100644 index a74b581ef..000000000 --- a/t/selenium/testscripts/selling/begin/S003CreateInvoice.t +++ /dev/null @@ -1,34 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create invoice"); -SKIP: { - start_login(); - - $sel->click_ok("link=Rechnung erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->select_ok("customer", "label=TestFrau3"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber_1", "1"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partnumber_2", "991"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("invnumber", "1"); - $sel->click_ok("trigger3"); - $sel->click_ok("trigger_orddate"); - $sel->type_ok("quonumber", "2"); - $sel->click_ok("trigger_quodate"); - $sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); - $sel->click_ok("update_button"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.invoice.action[6]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S999Logout.t b/t/selenium/testscripts/selling/begin/S999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/selling/begin/S999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/selling/end/S000Login.t b/t/selenium/testscripts/selling/end/S000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/selling/end/S000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/selling/end/S999Logout.t b/t/selenium/testscripts/selling/end/S999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/selling/end/S999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S000Login.t b/t/selenium/testscripts/system/begin/S000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/system/begin/S000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S001CreateProductGroups.t b/t/selenium/testscripts/system/begin/S001CreateProductGroups.t deleted file mode 100644 index 1f166e695..000000000 --- a/t/selenium/testscripts/system/begin/S001CreateProductGroups.t +++ /dev/null @@ -1,41 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create product groups"); -SKIP: { - start_login(); - - $sel->click_ok("link=Warengruppe erfassen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("partsgroup", "TestSeleniumWarengruppe1"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partsgroup", "TestSeleniumWarengruppe2"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("relative=up"); - $sel->click_ok("link=Warengruppen anzeigen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=TestSeleniumWarengruppe1"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=TestSeleniumWarengruppe2"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("partsgroup", "TestSeleniumWarengruppe3"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=TestSeleniumWarengruppe3"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t b/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t deleted file mode 100644 index 3cb85409e..000000000 --- a/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t +++ /dev/null @@ -1,21 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create price brackets"); -SKIP: { - start_login(); - - $sel->click_ok("link=Preisgruppe erfassen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - - $sel->select_frame_ok("main_window"); - $sel->type_ok("pricegroup", "SeleniumTestPreisgruppe1"); - $sel->click_ok("action","value=Speichern"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->type_ok("pricegroup", "SeleniumTestPreisgruppe2"); - $sel->click_ok("action","value=Speichern"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S003AddLanguage.t b/t/selenium/testscripts/system/begin/S003AddLanguage.t deleted file mode 100644 index 4d745b87b..000000000 --- a/t/selenium/testscripts/system/begin/S003AddLanguage.t +++ /dev/null @@ -1,31 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Add languages"); -SKIP: { - start_login(); - - $sel->click_ok("link=Sprache hinzufügen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("description", "elbisch"); - $sel->type_ok("template_code", "elb"); - $sel->type_ok("article_code", "elb"); - $sel->select_ok("output_numberformat", "label=1.000,00"); - $sel->select_ok("output_dateformat", "label=yyyy-mm-dd"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - - ### Folgende Zeilen sind notwendig , um später herausfinden zu können, welche Sprache gelöscht werden kann. - use DBI; - $lxtest->{dsn} = 'dbi:Pg:dbname=' . $lxtest->{db} . ';host=' . $lxtest->{dbhost} . ';port=' . $lxtest->{dbport}; - my $dbh = DBI->connect( $lxtest->{dsn}, $lxtest->{dbuser}, $lxtest->{dbpasswd} ) or die "Cannot connect to database!\n $DBI::errstr"; - my $sth = $dbh->prepare("SELECT id FROM language WHERE description ILIKE 'elbisch'") or die "Error while preparing sql statement!\n $DBI::errstr\n"; - $sth->execute() or die "Error while excecuting sql statement!\n $DBI::errstr"; - $lxtest->{lang_id} = $sth->fetchrow_array() or die "Nothing to fetch!\n$DBI::errstr"; - $sth->finish(); - $dbh->disconnect(); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S004ShowLanguages.t b/t/selenium/testscripts/system/begin/S004ShowLanguages.t deleted file mode 100644 index 0f55e6d3b..000000000 --- a/t/selenium/testscripts/system/begin/S004ShowLanguages.t +++ /dev/null @@ -1,18 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Show languages"); -SKIP: { - start_login(); - - $sel->click_ok("link=Sprachen anzeigen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=elbisch"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t b/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t deleted file mode 100644 index 7f20e4b41..000000000 --- a/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t +++ /dev/null @@ -1,22 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Add payment conditions"); -SKIP: { - start_login(); - - $sel->click_ok("link=Zahlungskonditionen hinzufügen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("description", "Schnellzahler/Skonto"); - $sel->type_ok("description_long", "Schnellzahler bekommen sofort ein Skonto von 3% gewährleistet"); - $sel->type_ok("description_long_" . $lxtest->{lang_id}, "This is a test in elbisch"); - $sel->type_ok("terms_netto", "100"); - $sel->type_ok("percent_skonto", "3"); - $sel->type_ok("terms_skonto", "97"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t b/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t deleted file mode 100644 index bf3e9bcb2..000000000 --- a/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t +++ /dev/null @@ -1,18 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Show payment conditions"); -SKIP: { - start_login(); - - $sel->click_ok("link=Zahlungskonditionen anzeigen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=Schnellzahler/Skonto"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t b/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t deleted file mode 100644 index b2ec59d00..000000000 --- a/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t +++ /dev/null @@ -1,23 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Add customer/vendor types"); -SKIP: { - start_login(); - - $sel->click_ok("link=Kunden-/Lieferantentyp erfassen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("description", "Großabnehmer"); - $sel->type_ok("discount", "3"); - $sel->type_ok("customernumberinit", "100"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->type_ok("description", "Kleinkäufer"); - $sel->type_ok("customernumberinit", "200"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t b/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t deleted file mode 100644 index 2a728322f..000000000 --- a/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t +++ /dev/null @@ -1,22 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Show customer/vendor types"); -SKIP: { - start_login(); - - $sel->click_ok("link=Kunden\-\/Lieferantentypen\ anzeigen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=Großabnehmer"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=Kleinkäufer"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t b/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t deleted file mode 100644 index 1fe22da2d..000000000 --- a/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t +++ /dev/null @@ -1,49 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Add show and delete measure"); -SKIP: { - start_login(); - - $sel->click_ok("link=Maßeinheiten"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("new_name", "ogge"); - $sel->select_ok("new_base_unit", "label=Stck"); - $sel->type_ok("new_factor", "3,5"); - $sel->type_ok("new_localized_" . $lxtest->{lang_id}, "kogge"); - $sel->type_ok("new_localized_plural_" . $lxtest->{lang_id}, "kogges"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->type_ok("localized_1_" . $lxtest->{lang_id}, "gm"); - $sel->type_ok("localized_plural_1_" . $lxtest->{lang_id}, "gms"); - $sel->type_ok("localized_2_" . $lxtest->{lang_id}, "gg"); - $sel->type_ok("localized_plural_2_" . $lxtest->{lang_id}, "ggs"); - $sel->type_ok("localized_3_" . $lxtest->{lang_id}, "gk"); - $sel->type_ok("localized_plural_3_" . $lxtest->{lang_id}, "gks"); - $sel->type_ok("localized_4_" . $lxtest->{lang_id}, "tt"); - $sel->type_ok("localized_plural_4_" . $lxtest->{lang_id}, "tts"); - $sel->type_ok("localized_5_" . $lxtest->{lang_id}, "lm"); - $sel->type_ok("localized_plural_5_" . $lxtest->{lang_id}, "lms"); - $sel->type_ok("localized_6_" . $lxtest->{lang_id}, "LL"); - $sel->type_ok("localized_plural_6_" . $lxtest->{lang_id}, "LLs"); - $sel->type_ok("localized_7_" . $lxtest->{lang_id}, "kctS"); - $sel->type_ok("localized_plural_7_" . $lxtest->{lang_id}, "kctSs"); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("delete_8"); - $sel->click_ok("//tr[9]/td[1]/a/img"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("//tr[8]/td[1]/a[1]/img"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("//tr[7]/td[1]/a[2]/img"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("//tr[8]/td[1]/a[2]/img"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("delete_8"); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t b/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t deleted file mode 100644 index 8991780fa..000000000 --- a/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t +++ /dev/null @@ -1,28 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Add show and delete service measure"); -SKIP: { - start_login(); - - $sel->click_ok("link=Dienstleistungseinheiten"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("new_name", "ProggerStunde"); - $sel->select_ok("new_base_unit", "label=Std"); - $sel->type_ok("new_factor", "2,0"); - $sel->type_ok("new_localized_" . $lxtest->{lang_id}, "Dinges"); - $sel->type_ok("new_localized_plural_" . $lxtest->{lang_id}, "Dingeses"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("//tr[6]/td[1]/a/img"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("//tr[5]/td[1]/a[2]/img"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->click_ok("delete_5"); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S011CreateAccount.t b/t/selenium/testscripts/system/begin/S011CreateAccount.t deleted file mode 100644 index 983d2ae51..000000000 --- a/t/selenium/testscripts/system/begin/S011CreateAccount.t +++ /dev/null @@ -1,40 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Create Account"); -SKIP: { - start_login(); - - $sel->click_ok("link=Konto erfassen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->type_ok("accno", "000000000001"); - $sel->type_ok("description", "TestSeleniumKonto"); - $sel->select_ok("AccountType", "label=Aktiva/Mittelverwendung (A)"); - $sel->click_ok("AR"); - $sel->click_ok("AP"); - $sel->click_ok("IC"); - $sel->click_ok("AR_amount"); - $sel->click_ok("AR_paid"); - $sel->click_ok("AR_tax"); - $sel->click_ok("AP_amount"); - $sel->click_ok("AP_paid"); - $sel->click_ok("AP_tax"); - $sel->click_ok("IC_sale"); - $sel->click_ok("IC_cogs"); - $sel->click_ok("IC_taxpart"); - $sel->click_ok("IC_income"); - $sel->click_ok("IC_expense"); - $sel->click_ok("IC_taxservice"); - $sel->select_ok("pos_eur", "label=05. Ausserordentliche Erträge"); - $sel->select_ok("pos_bwa", "label=05. So.betr.Erlöse"); - $sel->select_ok("pos_bilanz", "label=02."); - $sel->click_ok("datevautomatik"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok("30000"); - $sel->is_element_present_ok("link=000000000001"); - $sel->is_text_present_ok("TestSeleniumKonto"); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S012ShowAccount.t b/t/selenium/testscripts/system/begin/S012ShowAccount.t deleted file mode 100644 index 6f842556b..000000000 --- a/t/selenium/testscripts/system/begin/S012ShowAccount.t +++ /dev/null @@ -1,395 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Show Accounts"); -SKIP: { - start_login(); - - $sel->click_ok("link=Konten anzeigen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->title_is("Kontenübersicht - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - $sel->is_element_present_ok("link=000000000001"); - $sel->is_element_present_ok("link=0027"); - $sel->is_element_present_ok("link=0090"); - $sel->is_element_present_ok("link=0200"); - $sel->is_element_present_ok("link=0210"); - $sel->is_element_present_ok("link=0380"); - $sel->is_element_present_ok("link=0400"); - $sel->is_element_present_ok("link=0410"); - $sel->is_element_present_ok("link=0420"); - $sel->is_element_present_ok("link=0430"); - $sel->is_element_present_ok("link=0440"); - $sel->is_element_present_ok("link=0480"); - $sel->is_element_present_ok("link=0631"); - $sel->is_element_present_ok("link=0640"); - $sel->is_element_present_ok("link=0650"); - $sel->is_element_present_ok("link=0853"); - $sel->is_element_present_ok("link=1000"); - $sel->is_element_present_ok("link=1200"); - $sel->is_element_present_ok("link=1360"); - $sel->is_element_present_ok("link=1400"); - $sel->is_element_present_ok("link=1445"); - $sel->is_element_present_ok("link=1446"); - $sel->is_element_present_ok("link=1447"); - $sel->is_element_present_ok("link=1448"); - $sel->is_element_present_ok("link=1449"); - $sel->is_element_present_ok("link=1450"); - $sel->is_element_present_ok("link=1570"); - $sel->is_element_present_ok("link=1571"); - $sel->is_element_present_ok("link=1572"); - $sel->is_element_present_ok("link=1573"); - $sel->is_element_present_ok("link=1574"); - $sel->is_element_present_ok("link=1575"); - $sel->is_element_present_ok("link=1576"); - $sel->is_element_present_ok("link=1577"); - $sel->is_element_present_ok("link=1578"); - $sel->is_element_present_ok("link=1580"); - $sel->is_element_present_ok("link=1581"); - $sel->is_element_present_ok("link=1582"); - $sel->is_element_present_ok("link=1584"); - $sel->is_element_present_ok("link=1588"); - $sel->is_element_present_ok("link=1590"); - $sel->is_element_present_ok("link=1592"); - $sel->is_element_present_ok("link=1600"); - $sel->is_element_present_ok("link=1605"); - $sel->is_element_present_ok("link=1606"); - $sel->is_element_present_ok("link=1607"); - $sel->is_element_present_ok("link=1609"); - $sel->is_element_present_ok("link=1767"); - $sel->is_element_present_ok("link=1771"); - $sel->is_element_present_ok("link=1772"); - $sel->is_element_present_ok("link=1773"); - $sel->is_element_present_ok("link=1774"); - $sel->is_element_present_ok("link=1775"); - $sel->is_element_present_ok("link=1776"); - $sel->is_element_present_ok("link=1780"); - $sel->is_element_present_ok("link=1785"); - $sel->is_element_present_ok("link=1790"); - $sel->is_element_present_ok("link=1791"); - $sel->is_element_present_ok("link=1800"); - $sel->is_element_present_ok("link=1810"); - $sel->is_element_present_ok("link=1820"); - $sel->is_element_present_ok("link=1830"); - $sel->is_element_present_ok("link=1840"); - $sel->is_element_present_ok("link=1890"); - $sel->is_element_present_ok("link=2000"); - $sel->is_element_present_ok("link=2010"); - $sel->is_element_present_ok("link=2020"); - $sel->is_element_present_ok("link=2100"); - $sel->is_element_present_ok("link=2107"); - $sel->is_element_present_ok("link=2110"); - $sel->is_element_present_ok("link=2120"); - $sel->is_element_present_ok("link=2125"); - $sel->is_element_present_ok("link=2130"); - $sel->is_element_present_ok("link=2140"); - $sel->is_element_present_ok("link=2150"); - $sel->is_element_present_ok("link=2170"); - $sel->is_element_present_ok("link=2171"); - $sel->is_element_present_ok("link=2175"); - $sel->is_element_present_ok("link=2200"); - $sel->is_element_present_ok("link=2208"); - $sel->is_element_present_ok("link=2209"); - $sel->is_element_present_ok("link=2212"); - $sel->is_element_present_ok("link=2214"); - $sel->is_element_present_ok("link=2215"); - $sel->is_element_present_ok("link=2218"); - $sel->is_element_present_ok("link=2280"); - $sel->is_element_present_ok("link=2282"); - $sel->is_element_present_ok("link=2284"); - $sel->is_element_present_ok("link=2285"); - $sel->is_element_present_ok("link=2287"); - $sel->is_element_present_ok("link=2289"); - $sel->is_element_present_ok("link=2310"); - $sel->is_element_present_ok("link=2315"); - $sel->is_element_present_ok("link=2320"); - $sel->is_element_present_ok("link=2341"); - $sel->is_element_present_ok("link=2342"); - $sel->is_element_present_ok("link=2350"); - $sel->is_element_present_ok("link=2351"); - $sel->is_element_present_ok("link=2375"); - $sel->is_element_present_ok("link=2376"); - $sel->is_element_present_ok("link=2380"); - $sel->is_element_present_ok("link=2400"); - $sel->is_element_present_ok("link=2401"); - $sel->is_element_present_ok("link=2405"); - $sel->is_element_present_ok("link=2450"); - $sel->is_element_present_ok("link=2500"); - $sel->is_element_present_ok("link=2501"); - $sel->is_element_present_ok("link=2505"); - $sel->is_element_present_ok("link=2510"); - $sel->is_element_present_ok("link=2520"); - $sel->is_element_present_ok("link=2600"); - $sel->is_element_present_ok("link=2650"); - $sel->is_element_present_ok("link=2657"); - $sel->is_element_present_ok("link=2660"); - $sel->is_element_present_ok("link=2670"); - $sel->is_element_present_ok("link=2680"); - $sel->is_element_present_ok("link=2700"); - $sel->is_element_present_ok("link=2710"); - $sel->is_element_present_ok("link=2715"); - $sel->is_element_present_ok("link=2720"); - $sel->is_element_present_ok("link=2725"); - $sel->is_element_present_ok("link=2730"); - $sel->is_element_present_ok("link=2732"); - $sel->is_element_present_ok("link=2733"); - $sel->is_element_present_ok("link=2735"); - $sel->is_element_present_ok("link=2739"); - $sel->is_element_present_ok("link=2742"); - $sel->is_element_present_ok("link=2743"); - $sel->is_element_present_ok("link=2744"); - $sel->is_element_present_ok("link=2746"); - $sel->is_element_present_ok("link=2747"); - $sel->is_element_present_ok("link=2750"); - $sel->is_element_present_ok("link=2797"); - $sel->is_element_present_ok("link=3000"); - $sel->is_element_present_ok("link=3090"); - $sel->is_element_present_ok("link=3100"); - $sel->is_element_present_ok("link=3110"); - $sel->is_element_present_ok("link=3120"); - $sel->is_element_present_ok("link=3300"); - $sel->is_element_present_ok("link=3400"); - $sel->is_element_present_ok("link=3420"); - $sel->is_element_present_ok("link=3425"); - $sel->is_element_present_ok("link=3440"); - $sel->is_element_present_ok("link=3550"); - $sel->is_element_present_ok("link=3559"); - $sel->is_element_present_ok("link=3580"); - $sel->is_element_present_ok("link=3581"); - $sel->is_element_present_ok("link=3582"); - $sel->is_element_present_ok("link=3589"); - $sel->is_element_present_ok("link=3600"); - $sel->is_element_present_ok("link=3610"); - $sel->is_element_present_ok("link=3650"); - $sel->is_element_present_ok("link=3731"); - $sel->is_element_present_ok("link=3735"); - $sel->is_element_present_ok("link=3750"); - $sel->is_element_present_ok("link=3760"); - $sel->is_element_present_ok("link=3780"); - $sel->is_element_present_ok("link=3790"); - $sel->is_element_present_ok("link=3800"); - $sel->is_element_present_ok("link=3830"); - $sel->is_element_present_ok("link=3850"); - $sel->is_element_present_ok("link=3960"); - $sel->is_element_present_ok("link=3970"); - $sel->is_element_present_ok("link=3980"); - $sel->is_element_present_ok("link=3990"); - $sel->is_element_present_ok("link=4000"); - $sel->is_element_present_ok("link=4110"); - $sel->is_element_present_ok("link=4120"); - $sel->is_element_present_ok("link=4125"); - $sel->is_element_present_ok("link=4126"); - $sel->is_element_present_ok("link=4127"); - $sel->is_element_present_ok("link=4130"); - $sel->is_element_present_ok("link=4138"); - $sel->is_element_present_ok("link=4139"); - $sel->is_element_present_ok("link=4140"); - $sel->is_element_present_ok("link=4145"); - $sel->is_element_present_ok("link=4149"); - $sel->is_element_present_ok("link=4150"); - $sel->is_element_present_ok("link=4167"); - $sel->is_element_present_ok("link=4170"); - $sel->is_element_present_ok("link=4175"); - $sel->is_element_present_ok("link=4180"); - $sel->is_element_present_ok("link=4190"); - $sel->is_element_present_ok("link=4199"); - $sel->is_element_present_ok("link=4200"); - $sel->is_element_present_ok("link=4210"); - $sel->is_element_present_ok("link=4220"); - $sel->is_element_present_ok("link=4230"); - $sel->is_element_present_ok("link=4240"); - $sel->is_element_present_ok("link=4250"); - $sel->is_element_present_ok("link=4260"); - $sel->is_element_present_ok("link=4261"); - $sel->is_element_present_ok("link=4271"); - $sel->is_element_present_ok("link=4280"); - $sel->is_element_present_ok("link=4288"); - $sel->is_element_present_ok("link=4289"); - $sel->is_element_present_ok("link=4301"); - $sel->is_element_present_ok("link=4305"); - $sel->is_element_present_ok("link=4320"); - $sel->is_element_present_ok("link=4340"); - $sel->is_element_present_ok("link=4350"); - $sel->is_element_present_ok("link=4355"); - $sel->is_element_present_ok("link=4360"); - $sel->is_element_present_ok("link=4361"); - $sel->is_element_present_ok("link=4380"); - $sel->is_element_present_ok("link=4390"); - $sel->is_element_present_ok("link=4396"); - $sel->is_element_present_ok("link=4397"); - $sel->is_element_present_ok("link=4500"); - $sel->is_element_present_ok("link=4505"); - $sel->is_element_present_ok("link=4510"); - $sel->is_element_present_ok("link=4515"); - $sel->is_element_present_ok("link=4520"); - $sel->is_element_present_ok("link=4525"); - $sel->is_element_present_ok("link=4530"); - $sel->is_element_present_ok("link=4535"); - $sel->is_element_present_ok("link=4540"); - $sel->is_element_present_ok("link=4545"); - $sel->is_element_present_ok("link=4550"); - $sel->is_element_present_ok("link=4560"); - $sel->is_element_present_ok("link=4565"); - $sel->is_element_present_ok("link=4570"); - $sel->is_element_present_ok("link=4580"); - $sel->is_element_present_ok("link=4595"); - $sel->is_element_present_ok("link=4600"); - $sel->is_element_present_ok("link=4610"); - $sel->is_element_present_ok("link=4630"); - $sel->is_element_present_ok("link=4635"); - $sel->is_element_present_ok("link=4638"); - $sel->is_element_present_ok("link=4640"); - $sel->is_element_present_ok("link=4650"); - $sel->is_element_present_ok("link=4651"); - $sel->is_element_present_ok("link=4652"); - $sel->is_element_present_ok("link=4653"); - $sel->is_element_present_ok("link=4654"); - $sel->is_element_present_ok("link=4655"); - $sel->is_element_present_ok("link=4660"); - $sel->is_element_present_ok("link=4663"); - $sel->is_element_present_ok("link=4664"); - $sel->is_element_present_ok("link=4666"); - $sel->is_element_present_ok("link=4668"); - $sel->is_element_present_ok("link=4670"); - $sel->is_element_present_ok("link=4673"); - $sel->is_element_present_ok("link=4674"); - $sel->is_element_present_ok("link=4676"); - $sel->is_element_present_ok("link=4678"); - $sel->is_element_present_ok("link=4679"); - $sel->is_element_present_ok("link=4680"); - $sel->is_element_present_ok("link=4700"); - $sel->is_element_present_ok("link=4710"); - $sel->is_element_present_ok("link=4730"); - $sel->is_element_present_ok("link=4750"); - $sel->is_element_present_ok("link=4760"); - $sel->is_element_present_ok("link=4780"); - $sel->is_element_present_ok("link=4790"); - $sel->is_element_present_ok("link=4800"); - $sel->is_element_present_ok("link=4805"); - $sel->is_element_present_ok("link=4806"); - $sel->is_element_present_ok("link=4809"); - $sel->is_element_present_ok("link=4810"); - $sel->is_element_present_ok("link=4815"); - $sel->is_element_present_ok("link=4822"); - $sel->is_element_present_ok("link=4824"); - $sel->is_element_present_ok("link=4826"); - $sel->is_element_present_ok("link=4830"); - $sel->is_element_present_ok("link=4831"); - $sel->is_element_present_ok("link=4832"); - $sel->is_element_present_ok("link=4840"); - $sel->is_element_present_ok("link=4841"); - $sel->is_element_present_ok("link=4842"); - $sel->is_element_present_ok("link=4843"); - $sel->is_element_present_ok("link=4850"); - $sel->is_element_present_ok("link=4851"); - $sel->is_element_present_ok("link=4852"); - $sel->is_element_present_ok("link=4855"); - $sel->is_element_present_ok("link=4860"); - $sel->is_element_present_ok("link=4870"); - $sel->is_element_present_ok("link=4875"); - $sel->is_element_present_ok("link=4880"); - $sel->is_element_present_ok("link=4900"); - $sel->is_element_present_ok("link=4905"); - $sel->is_element_present_ok("link=4909"); - $sel->is_element_present_ok("link=4910"); - $sel->is_element_present_ok("link=4920"); - $sel->is_element_present_ok("link=4925"); - $sel->is_element_present_ok("link=4930"); - $sel->is_element_present_ok("link=4940"); - $sel->is_element_present_ok("link=4945"); - $sel->is_element_present_ok("link=4946"); - $sel->is_element_present_ok("link=4950"); - $sel->is_element_present_ok("link=4955"); - $sel->is_element_present_ok("link=4957"); - $sel->is_element_present_ok("link=4960"); - $sel->is_element_present_ok("link=4965"); - $sel->is_element_present_ok("link=4966"); - $sel->is_element_present_ok("link=4969"); - $sel->is_element_present_ok("link=4970"); - $sel->is_element_present_ok("link=4980"); - $sel->is_element_present_ok("link=4985"); - $sel->is_element_present_ok("link=4990"); - $sel->is_element_present_ok("link=4992"); - $sel->is_element_present_ok("link=4993"); - $sel->is_element_present_ok("link=4994"); - $sel->is_element_present_ok("link=4995"); - $sel->is_element_present_ok("link=8100"); - $sel->is_element_present_ok("link=8110"); - $sel->is_element_present_ok("link=8120"); - $sel->is_element_present_ok("link=8125"); - $sel->is_element_present_ok("link=8130"); - $sel->is_element_present_ok("link=8135"); - $sel->is_element_present_ok("link=8150"); - $sel->is_element_present_ok("link=8190"); - $sel->is_element_present_ok("link=8195"); - $sel->is_element_present_ok("link=8200"); - $sel->is_element_present_ok("link=8300"); - $sel->is_element_present_ok("link=8310"); - $sel->is_element_present_ok("link=8315"); - $sel->is_element_present_ok("link=8320"); - $sel->is_element_present_ok("link=8400"); - $sel->is_element_present_ok("link=8500"); - $sel->is_element_present_ok("link=8506"); - $sel->is_element_present_ok("link=8508"); - $sel->is_element_present_ok("link=8520"); - $sel->is_element_present_ok("link=8540"); - $sel->is_element_present_ok("link=8580"); - $sel->is_element_present_ok("link=8581"); - $sel->is_element_present_ok("link=8582"); - $sel->is_element_present_ok("link=8589"); - $sel->is_element_present_ok("link=8590"); - $sel->is_element_present_ok("link=8591"); - $sel->is_element_present_ok("link=8595"); - $sel->is_element_present_ok("link=8600"); - $sel->is_element_present_ok("link=8650"); - $sel->is_element_present_ok("link=8700"); - $sel->is_element_present_ok("link=8710"); - $sel->is_element_present_ok("link=8720"); - $sel->is_element_present_ok("link=8725"); - $sel->is_element_present_ok("link=8726"); - $sel->is_element_present_ok("link=8727"); - $sel->is_element_present_ok("link=8731"); - $sel->is_element_present_ok("link=8735"); - $sel->is_element_present_ok("link=8750"); - $sel->is_element_present_ok("link=8760"); - $sel->is_element_present_ok("link=8780"); - $sel->is_element_present_ok("link=8790"); - $sel->is_element_present_ok("link=8800"); - $sel->is_element_present_ok("link=8801"); - $sel->is_element_present_ok("link=8807"); - $sel->is_element_present_ok("link=8808"); - $sel->is_element_present_ok("link=8809"); - $sel->is_element_present_ok("link=8820"); - $sel->is_element_present_ok("link=8827"); - $sel->is_element_present_ok("link=8828"); - $sel->is_element_present_ok("link=8829"); - $sel->is_element_present_ok("link=8900"); - $sel->is_element_present_ok("link=8905"); - $sel->is_element_present_ok("link=8910"); - $sel->is_element_present_ok("link=8915"); - $sel->is_element_present_ok("link=8919"); - $sel->is_element_present_ok("link=8920"); - $sel->is_element_present_ok("link=8921"); - $sel->is_element_present_ok("link=8922"); - $sel->is_element_present_ok("link=8924"); - $sel->is_element_present_ok("link=8925"); - $sel->is_element_present_ok("link=8930"); - $sel->is_element_present_ok("link=8935"); - $sel->is_element_present_ok("link=8939"); - $sel->is_element_present_ok("link=8940"); - $sel->is_element_present_ok("link=8945"); - $sel->is_element_present_ok("link=8949"); - $sel->is_element_present_ok("link=8950"); - $sel->is_element_present_ok("link=8955"); - $sel->is_element_present_ok("link=8960"); - $sel->is_element_present_ok("link=8970"); - $sel->is_element_present_ok("link=8980"); - $sel->is_element_present_ok("link=8990"); - $sel->is_element_present_ok("link=9000"); - $sel->is_element_present_ok("link=9008"); - $sel->is_element_present_ok("link=9009"); - $sel->is_element_present_ok("link=9090"); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S013TestAccount.t b/t/selenium/testscripts/system/begin/S013TestAccount.t deleted file mode 100644 index 5515ba73f..000000000 --- a/t/selenium/testscripts/system/begin/S013TestAccount.t +++ /dev/null @@ -1,32 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Test Account"); -SKIP: { - start_login(); - - $sel->click_ok("link=Konten anzeigen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=000000000001"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - # Die folegenden Zeilen testen die Checkboxen im Formular, welche nach bestimmten Regeln gelöscht werden. - # Hiefür muß erst ein Konzept erstellt werden, wann eine Checkbox aktiviert ist und wann nicht. - - # Test für das erste Konto, bei dem alle Felder deaktiviert werden müssen - isnt($sel->is_checked("//input[(\@name=\"AR_amount\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"AR_paid\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"AR_tax\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"AP_amount\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"AP_paid\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"AP_tax\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"IC_sale\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"IC_cogs\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"IC_taxpart\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"IC_income\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"IC_expense\")]"), 1, "Checkboxcheck"); - isnt($sel->is_checked("//input[(\@name=\"IC_taxservice\")]"), 1, "Checkboxcheck"); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S999Logout.t b/t/selenium/testscripts/system/begin/S999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/system/begin/S999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S000Login.t b/t/selenium/testscripts/system/end/S000Login.t deleted file mode 120000 index 11cbb2686..000000000 --- a/t/selenium/testscripts/system/end/S000Login.t +++ /dev/null @@ -1 +0,0 @@ -../../base/000Login.t \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S992DeleteProductGroups.t b/t/selenium/testscripts/system/end/S992DeleteProductGroups.t deleted file mode 100644 index 1b95d4622..000000000 --- a/t/selenium/testscripts/system/end/S992DeleteProductGroups.t +++ /dev/null @@ -1,35 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} - -diag("Delete product groups"); - -SKIP: { - start_login(); - $sel->click_ok("link=Warengruppen anzeigen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=TestSeleniumWarengruppe1"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - - skip("Produktgruppen, die noch benutzt werden, können nicht gelöscht werden!", 10) if(!$sel->is_element_present("document.forms[0].action[1]","Löschen")); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=TestSeleniumWarengruppe2"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - - skip("Produktgruppen, die noch benutzt werden, können nicht gelöscht werden!", 6) if($sel->get_value("document.forms[0].action[1]") ne "Löschen"); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=TestSeleniumWarengruppe3"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - - skip("Produktgruppen, die noch benutzt werden, können nicht gelöscht werden!", 2) if($sel->get_value("document.forms[0].action[1]") ne "Löschen"); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S994DeleteAccount.t b/t/selenium/testscripts/system/end/S994DeleteAccount.t deleted file mode 100644 index 97549350c..000000000 --- a/t/selenium/testscripts/system/end/S994DeleteAccount.t +++ /dev/null @@ -1,21 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete Account"); -SKIP: { - start_login(); - - $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - $sel->click_ok("link=Konten anzeigen"); - $sel->wait_for_page_to_load($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=000000000001"); - $sel->wait_for_page_to_load_ok("30000"); - $sel->click_ok("document.EditAccount.action[1]"); - $sel->wait_for_page_to_load_ok("30000"); - isnt($sel->is_element_present("link=000000000001"),1,"Tests whether link for created acc is present"); - isnt($sel->is_text_present("TestSeleniumKonto"),1,"Tests wheter text of created acc is present"); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t b/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t deleted file mode 100644 index 171304614..000000000 --- a/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t +++ /dev/null @@ -1,23 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete customer/vendor types"); -SKIP: { - start_login(); - - $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - $sel->click_ok("link=Kunden-/Lieferantentypen anzeigen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=Großabnehmer"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=Kleinkäufer"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t b/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t deleted file mode 100644 index 1df211b7d..000000000 --- a/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t +++ /dev/null @@ -1,18 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete payment conditions"); -SKIP: { - start_login(); - - $sel->click_ok("link=Zahlungskonditionen anzeigen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=Schnellzahler/Skonto"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -} -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S997DeleteLanguages.t b/t/selenium/testscripts/system/end/S997DeleteLanguages.t deleted file mode 100644 index ec8433fc0..000000000 --- a/t/selenium/testscripts/system/end/S997DeleteLanguages.t +++ /dev/null @@ -1,18 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete languages"); -SKIP: { - start_login(); - - $sel->click_ok("link=Sprachen anzeigen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("link=elbisch"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t b/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t deleted file mode 100644 index 4f28ec6c7..000000000 --- a/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t +++ /dev/null @@ -1,27 +0,0 @@ -if(!defined $sel) { - require "t/selenium/AllTests.t"; - init_server("singlefileonly",$0); - exit(0); -} -diag("Delete price brackets"); -SKIP: { - start_login(); - - $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - $sel->click_ok("link=Preisgruppen anzeigen"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->select_frame_ok("main_window"); - $sel->click_ok("action"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=SeleniumTestPreisgruppe1"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - skip("Preisgruppen, die noch benutzt werden, können nicht gelöscht werden!", 6) if(!$sel->is_element_present("document.forms[0].action[1]","Löschen")); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - $sel->click_ok("link=SeleniumTestPreisgruppe2"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - skip("Preisgruppen, die noch benutzt werden, können nicht gelöscht werden!", 2) if(!$sel->is_element_present("document.forms[0].action[1]","Löschen")); - $sel->click_ok("document.forms[0].action[1]"); - $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -}; -1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S999Logout.t b/t/selenium/testscripts/system/end/S999Logout.t deleted file mode 120000 index 43ce84a0d..000000000 --- a/t/selenium/testscripts/system/end/S999Logout.t +++ /dev/null @@ -1 +0,0 @@ -../../base/999Logout.t \ No newline at end of file diff --git a/t/test.sh b/t/test.sh new file mode 100755 index 000000000..53a737095 --- /dev/null +++ b/t/test.sh @@ -0,0 +1 @@ +perl -MExtUtils::Command::MM -e 'test_harness(0)' t/*.t