This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function counterstringWrapper(input: string) { | |
| const numericalInput = Number(input); | |
| if (!isNaN(numericalInput)) { | |
| if (numericalInput > 999_999) { | |
| return "Better try something smaller."; | |
| } | |
| if (numericalInput >= 0) { | |
| return counterstring(numericalInput); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.common.keys import Keys | |
| def test_simplest(): | |
| driver = webdriver.Chrome() | |
| driver.implicitly_wait(10) | |
| driver.get("https://todomvc.com/examples/vanillajs/") | |
| input_field = driver.find_element(By.CLASS_NAME, "new-todo") | |
| input_field.send_keys("Learning Selenium") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from playwright.sync_api import expect | |
| def test_add_todo(page): | |
| page.goto("https://todomvc.com/examples/vanillajs/") | |
| input_field = page.get_by_placeholder("What needs to be done?") | |
| input_field.fill("Learning Playwright") | |
| input_field.press("Enter") | |
| expect(page.locator(".todo-list li label")).to_have_text("Learning Playwright") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pytest | |
| from playwright.sync_api import Page, expect | |
| url = "https://www.exploratorytestingacademy.com/app/" | |
| def this_is_sample(): | |
| with open('bible.txt') as f: | |
| lines = f.readlines() | |
| return str(lines) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pytest | |
| from playwright.sync_api import Page, expect | |
| url = "https://www.exploratorytestingacademy.com/app/" | |
| @pytest.mark.parametrize('input_text, expect_wordcount, expect_discouraged, expect_violation', | |
| [ | |
| ("word", "1", "0", "0"), | |
| ("If programming's the act of teaching a computer to have a conversation with a user, it most useful to first teach the computer how to speak.","26","0","1"), | |
| #bug: incorrectly recognized - should be recognized and isn't. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: User management | |
| As an administrator, | |
| I can define users selecting roles with every role able to view observations, | |
| So that users have access to intended information. | |
| @todo | |
| Scenario: User with admin rights can create users | |
| Given User has admin rights | |
| When User logs in to user management | |
| Then User can create other users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: User management | |
| As an administrator, | |
| I can define users selecting roles with every role able to view observations, | |
| So that users have access to intended information. | |
| Scenario: Admin can create admins | |
| Given Default admin logs in to user management | |
| Then Admin can create admin users | |
| Then New admin user exists on the users list | |
| And New admin user can login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| args: (0,) => 'zero' | |
| args: (1,) => ' one' | |
| args: (2,) => ' two' | |
| args: (3,) => ' three' | |
| args: (4,) => ' four' | |
| args: (5,) => ' five' | |
| args: (6,) => ' six' | |
| args: (7,) => ' seven' | |
| args: (8,) => ' eight' | |
| args: (9,) => ' nine' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.gildedrose; | |
| import org.approvaltests.combinations.CombinationApprovals; | |
| import org.approvaltests.legacycode.Range; | |
| import junit.framework.TestCase; | |
| public class GildedRoseApprovalTest extends TestCase { | |
| public void testSomething() throws Exception { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.gildedrose; | |
| import static org.junit.Assert.assertEquals; | |
| import org.junit.Test; | |
| public class GildedRoseTest { | |
| @Test | |
| public void AfterSellByDateDegradeDouble() { |
NewerOlder