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 { test, expect } from '@playwright/test'; | |
import * as fs from 'fs'; | |
import * as path from 'path'; | |
const TOKEN_PATH = '../playwright/.auth/user.json' | |
let access_token: string; // Declare accessToken | |
// This hook runs before all tests in THIS specific file | |
test.beforeAll(async () => { |
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
// global-setup.ts (or .js) | |
import { request, expect } from '@playwright/test'; | |
import * as fs from 'fs'; | |
import * as path from 'path'; | |
// Credentials for Basic Authentication | |
const LOGIN_EMAIL = '[email protected]'; | |
const LOGIN_PASSWORD = 'changeme'; | |
async function globalSetup() { |
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 { defineConfig, devices } from '@playwright/test'; | |
/** | |
* Read environment variables from file. | |
* https://github.com/motdotla/dotenv | |
*/ | |
// import dotenv from 'dotenv'; | |
// import path from 'path'; | |
// dotenv.config({ path: path.resolve(__dirname, '.env') }); |
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
namespace LearnAsync; | |
class Program | |
{ | |
static async Task Main(string[] args) | |
{ | |
var start = DateTime.Now; | |
var taskEgg = FryEggAsync(2); // declaring task at the top | |
var taskBacon = FryBaconAsync(3); // declaring task at the top |
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
namespace LearnAsync; | |
class Program | |
{ | |
static async Task Main(string[] args) | |
{ | |
var start = DateTime.Now; | |
Coffee coffee = PourCoffee(); | |
Console.WriteLine("coffee is ready"); |
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
namespace LearnAsync; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var start = DateTime.Now; | |
Coffee coffee = PourCoffee(); | |
Console.WriteLine("coffee is ready"); |
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 stepDefinitions; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.Assert; | |
import io.cucumber.java.en.Given; | |
import io.cucumber.java.en.Then; | |
import io.cucumber.java.en.When; |
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: Wikipedia search | |
Scenario: Search with title | |
Given User is at home page | |
When User searched for a title "iPhone" | |
Then User found the page |
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 cucumberOptions; | |
import io.cucumber.testng.AbstractTestNGCucumberTests; | |
import io.cucumber.testng.CucumberOptions; | |
@CucumberOptions(features="src/test/java/features", glue="stepDefinitions", monochrome=true) | |
public class TestNGRunner extends AbstractTestNGCucumberTests { | |
} |
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 org.example; | |
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import org.bouncycastle.openssl.jcajce.JcaPEMWriter; | |
import org.bouncycastle.util.io.pem.PemObject; | |
import java.io.*; | |
import java.security.Key; | |
import java.security.KeyStore; | |
import java.security.KeyStoreException; |
NewerOlder