@ -44,7 +44,7 @@ $d->fill_element('//*[@id="prefix"]', 'xpath', $prefix);
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Search for LNP carrier" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "LNP carrier successfully created" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "LNP carrier successfully created" , "Correct Alert was shown" ) ;
$ d - > fill_element ( '//*[@id="lnp_carriers_table_filter"]/label/input' , 'xpath' , 'thisshouldnotexist' ) ;
ok ( $ d - > find_element_by_css ( '#lnp_carriers_table tr > td.dataTables_empty' , 'css' ) , 'Garbage text was not found' ) ;
$ d - > fill_element ( '//*[@id="lnp_carriers_table_filter"]/label/input' , 'xpath' , $ lnpcarrier ) ;
@ -62,7 +62,7 @@ $d->fill_element('//*[@id="prefix"]', 'xpath', $prefix);
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Search for LNP carrier" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "LNP carrier successfully updated" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "LNP carrier successfully updated" , "Correct Alert was shown" ) ;
$ d - > fill_element ( '//*[@id="lnp_carriers_table_filter"]/label/input' , 'xpath' , 'thisshouldnotexist' ) ;
ok ( $ d - > find_element_by_css ( '#lnp_carriers_table tr > td.dataTables_empty' , 'css' ) , 'Garbage text was not found' ) ;
$ d - > fill_element ( '//*[@id="lnp_carriers_table_filter"]/label/input' , 'xpath' , $ lnpcarrier ) ;
@ -96,7 +96,7 @@ $d->fill_element('//*[@id="description"]', 'xpath', "This is a simple descriptio
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( 'Search for our new NCOS' ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS level successfully created" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS level successfully created" , "Correct Alert was shown" ) ;
$ d - > fill_element ( '//*[@id="ncos_level_table_filter"]/label/input' , 'xpath' , 'thisshouldnotexist' ) ;
ok ( $ d - > find_element_by_css ( '#ncos_level_table tr > td.dataTables_empty' , 'css' ) , 'Garbage text was not found' ) ;
$ d - > fill_element ( '//*[@id="ncos_level_table_filter"]/label/input' , 'xpath' , $ ncosname ) ;
@ -116,7 +116,7 @@ $d->fill_element('//*[@id="description"]', 'xpath', "This is a very simple descr
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( 'Search for NCOS' ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS level successfully updated" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS level successfully updated" , "Correct Alert was shown" ) ;
$ d - > fill_element ( '//*[@id="ncos_level_table_filter"]/label/input' , 'xpath' , 'thisshouldnotexist' ) ;
ok ( $ d - > find_element_by_css ( '#ncos_level_table tr > td.dataTables_empty' , 'css' ) , 'Garbage text was not found' ) ;
$ d - > fill_element ( '//*[@id="ncos_level_table_filter"]/label/input' , 'xpath' , $ ncosname ) ;
@ -148,7 +148,7 @@ $d->fill_element('//*[@id="description"]', 'xpath', 'Austrian Premium Numbers');
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Check pattern details" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS pattern successfully created" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS pattern successfully created" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="number_pattern_table"]/tbody/tr/td[contains(text(), "^439")]' ) , "Pattern is correct" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="number_pattern_table"]/tbody/tr/td[contains(text(), "Austrian Premium Numbers")]' ) , "Description is correct" ) ;
@ -159,7 +159,7 @@ $d->fill_element('//*[@id="description"]', 'xpath', 'German Premium Numbers');
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Check pattern details" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS pattern successfully updated" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS pattern successfully updated" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="number_pattern_table"]/tbody/tr/td[contains(text(), "^491")]' ) , "Pattern is correct" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="number_pattern_table"]/tbody/tr/td[contains(text(), "German Premium Numbers")]' ) , "Description is correct" ) ;
@ -176,7 +176,7 @@ $d->fill_element('//*[@id="description"]', 'xpath', 'Rule for LNP Carrier 1');
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Check LNP details" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS lnp entry successfully created" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS lnp entry successfully created" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="lnp_carriers_table"]/tbody/tr/td[contains(text(), "' . $ lnpcarrier . '")]' ) , "LNP Carrier is correct" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="lnp_carriers_table"]/tbody/tr/td[contains(text(), "Rule for LNP Carrier 1")]' ) , "Description is correct" ) ;
@ -186,7 +186,7 @@ $d->fill_element('//*[@id="description"]', 'xpath', 'Rule for LNP Carrier 2');
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Check LNP details" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS lnp entry successfully updated" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS lnp entry successfully updated" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="lnp_carriers_table"]/tbody/tr/td[contains(text(), "' . $ lnpcarrier . '")]' ) , "LNP Carrier is correct" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="lnp_carriers_table"]/tbody/tr/td[contains(text(), "Rule for LNP Carrier 2")]' ) , "Description is correct" ) ;
@ -196,7 +196,7 @@ $d->select_if_unselected('//*[@id="local_ac"]');
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Check if NCOS settings have been applied" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS level setting successfully updated" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS level setting successfully updated" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_xpath ( '//*[@id="local_ac"][@checked="checked"]' ) , 'Setting "Include local area code" was applied' ) ;
diag ( "Creating Domain to add NCOS Level" ) ;
@ -221,7 +221,7 @@ $d->find_element('//*[@id="ncos"]/option[contains(text(), "' . $ncosname . '")]'
$ d - > find_element ( '//*[@id="save"]' ) - > click ( ) ;
diag ( "Check if NCOS Level was applied" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "Preference ncos successfully updated" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "Preference ncos successfully updated" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_xpath ( '//table//tr//td[contains(text(), "ncos")]/../td/select/option[contains(text(), "' . $ ncosname . '")][@selected="selected"]' ) , 'NCOS Level was applied' ) ;
diag ( 'Go back to NCOS interface' ) ;
@ -242,7 +242,7 @@ $d->move_and_click('//*[@id="number_pattern_table"]//tr//td//a[contains(text(),
$ d - > find_element ( '//*[@id="dataConfirmOK"]' ) - > click ( ) ;
diag ( "Check if NCOS Number pattern was deleted" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS pattern successfully deleted" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS pattern successfully deleted" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_css ( '#number_pattern_table tr > td.dataTables_empty' , 'css' ) , 'NCOS Number pattern was deleted' ) ;
diag ( "Delete LNP Entry" ) ;
@ -250,7 +250,7 @@ $d->move_and_click('//*[@id="lnp_carriers_table"]//tr//td//a[contains(text(), "D
$ d - > find_element ( '//*[@id="dataConfirmOK"]' ) - > click ( ) ;
diag ( "Check if LNP Entry was deleted" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS lnp entry successfully deleted" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS lnp entry successfully deleted" , "Correct Alert was shown" ) ;
ok ( $ d - > find_element_by_css ( '#lnp_carriers_table tr > td.dataTables_empty' , 'css' ) , 'LNP Entry was deleted' ) ;
diag ( "Go back to NCOS page" ) ;
@ -275,7 +275,7 @@ $d->move_and_click('//*[@id="ncos_level_table"]/tbody/tr[1]/td/div/a[contains(te
$ d - > find_element ( '//*[@id="dataConfirmOK"]' ) - > click ( ) ;
diag ( "Check if Entry was deleted" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "NCOS level successfully deleted" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "NCOS level successfully deleted" , "Correct Alert was shown" ) ;
$ d - > fill_element ( '//*[@id="ncos_level_table_filter"]/label/input' , 'xpath' , $ ncosname ) ;
ok ( $ d - > find_element_by_css ( '#ncos_level_table tr > td.dataTables_empty' , 'css' ) , 'NCOS was deleted' ) ;
@ -302,7 +302,7 @@ $d->move_and_click('//*[@id="lnp_carriers_table"]//tr[1]//td//a[contains(text(),
$ d - > find_element ( '//*[@id="dataConfirmOK"]' ) - > click ( ) ;
diag ( "Check if Entry was deleted" ) ;
is ( $ d - > get_text ( '//*[@id="content"]//div[contains(@class, "alert")]' ) , "LNP carrier successfully deleted" , "Correct Alert was shown" ) ;
is ( $ d - > find_element_by_xpath ( '//*[@id="content"]//div[contains(@class, "alert")]' ) - > get_text ( ) , "LNP carrier successfully deleted" , "Correct Alert was shown" ) ;
$ d - > fill_element ( '//*[@id="lnp_carriers_table_filter"]/label/input' , 'xpath' , $ lnpcarrier ) ;
$ d - > move_and_click ( '//*[@id="lnp_numbers_table_filter"]//label//input' , 'xpath' , '//*[@id="content"]/div/h3[contains(text(), "LNP Numbers")]' ) ;
ok ( $ d - > find_element_by_css ( '#lnp_carriers_table tr > td.dataTables_empty' , 'css' ) , 'Entry was deleted' ) ;